Skip to content

Dual number

An element a+b epsilon of a two-dimensional commutative algebra with nonzero nilpotent epsilon satisfying epsilon squared equals zero.

Version
v2 · 2026-09-19 · History
Domain-specific #
4270
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomain
Algebra and Automatic Differentiation → Mathematics

Core Idea

Dual numbers encode first-order infinitesimals: evaluating a differentiable expression at x+epsilon carries the function value in the real part and its derivative in the epsilon coefficient. Arithmetic expands bilinearly and discards every second-order epsilon term; elementary functions extend by first-order Taylor rules, propagating derivatives exactly through composed operations. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

How would you explain it like I'm…

Numbers with a Sidekick

Imagine a number that carries a little sidekick number along with it. Every time you do math with it, the main number gives the answer, and the sidekick keeps track of exactly how much that answer would change if you nudged the starting number. That special kind of number is a dual number.

Numbers That Track Slopes

A dual number looks like a + b·ε, where ε (epsilon) is a special new symbol with one strange rule: ε times ε equals zero. It is not a small ordinary number; it's a new kind of symbol, like the i in imaginary numbers but with a different rule. You add and multiply dual numbers normally and throw away any ε·ε part. The amazing trick: if you plug x + ε into a formula, the regular part of the answer is the formula's value, and the ε part is exactly how fast the formula is changing at x, called the derivative. Computers use this to find derivatives automatically.

Exact-Derivative Numbers

Dual numbers are expressions a + bε with real (or other) coefficients a and b, where ε is a new element satisfying ε² = 0 but ε ≠ 0. Addition works component by component, and multiplication expands normally, with every ε² term dropped: (a + bε)(c + dε) = ac + (ad + bc)ε. Because of this rule, evaluating a function at x + ε gives f(x) + f'(x)ε, so the ε-coefficient carries the derivative exactly, not as an approximation. Functions like sine or exponential are extended using their first-order Taylor rule, f(a + bε) = f(a) + f'(a)bε, and derivatives flow correctly through compositions, which is the basis of forward-mode automatic differentiation. Dual numbers differ from complex numbers, where i² = -1, and split-complex numbers, where j² = +1.

 

The dual numbers over a coefficient field or ring are the algebra with basis {1, ε} subject to ε² = 0, i.e. elements a + bε with componentwise addition and multiplication (a + bε)(c + dε) = ac + (ad + bc)ε, discarding the second-order term. Equality is componentwise; a + bε is invertible exactly when a is invertible, with inverse a⁻¹ − ba⁻²ε, so the pure ε multiples are nilpotent zero divisors. Elementary functions extend by the first-order Taylor rule f(a + bε) = f(a) + b f′(a)ε, and because the arithmetic and extension rules compose consistently, evaluating an expression at x + ε carries the value in the real part and the exact derivative in the ε coefficient, the chain rule being propagated automatically. This is the algebraic core of forward-mode automatic differentiation. Dual numbers must be distinguished from complex numbers (i² = −1) and split-complex numbers (j² = +1); only the nilpotent relation ε² = 0 yields exact first-order infinitesimals.

Scope of Application

Dual number belongs to algebra and automatic differentiation and is useful where the analyst can specify the typed algebra and automatic differentiation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers are explicit. The scope is broad within that domain but bounded by the need for the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers are explicit.

Clarity

The abstraction clarifies a crowded vocabulary by making the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers are explicit the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Dual number. Dual number compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed algebra and automatic differentiation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers are explicit independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of algebra and automatic differentiation because they reuse the typed algebra and automatic differentiation carrier, defining objects and relations, parameters, conventions, evidence, boundary cases, and comparison targets, Arithmetic expands bilinearly and discards every second-order epsilon term; elementary functions extend by first-order Taylor rules, propagating derivatives exactly through composed operations., and type the carrier, state every parameter and convention in the definition, test that the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers are explicit, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Dual numberParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Dual numberDOMAINPrime abstraction: Transformation — is a kind ofTransformationPRIME

Current abstraction Dual number Domain-specific

Parents (1) — outgoing typed relations

  • Dual number is a kind of Transformation Prime

    It remains its own entry because its identity is fixed by the coefficient field or ring, basis one and epsilon, relation epsilon squared equals zero, addition and multiplication, equality, invertibility, function-extension rule, and distinction from complex and split-complex numbers.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Dual number sits in a crowded region of the domain-specific corpus (10th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Polynomial Functions & Field Structures (21 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25