{
  "id": "dual-number",
  "title": "Dual Number",
  "lang": "en",
  "source_lang": "en",
  "summary": "A dual number has the form a + bε, where ε is nonzero but ε² = 0, providing an algebraic representation of first-order differential information.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "Dual numbers"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/dual-number/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/dual-number/",
      "json": "https://aiwiki.page/zh/dual-number.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A dual number is an expression \\(a+b\\varepsilon\\), where \\(a\\) and \\(b\\) are real numbers and \\(\\varepsilon\\) is a formal element satisfying \\(\\varepsilon^2=0\\) but \\(\\varepsilon\\ne 0\\). Dual numbers form a two-dimensional commutative algebra over the real numbers. Their arithmetic encodes the rules of first-order differentiation, making them useful in automatic differentiation, differential geometry, and the study of infinitesimal changes. Unlike the complex numbers, they do not form a field, because a nonzero multiple of \\(\\varepsilon\\) has no multiplicative inverse."
    },
    {
      "heading": "Definition and arithmetic",
      "text": "The real dual numbers are denoted by\n\n\\[\\mathbb D=\\{a+b\\varepsilon:a,b\\in\\mathbb R,\\ \\varepsilon^2=0\\}.\\]\n\nThe coefficient \\(a\\) is called the real part, scalar part, or primal part, while \\(b\\) is the dual coefficient or tangent component. Equality is coefficientwise:\n\n\\[a+b\\varepsilon=c+d\\varepsilon \\quad\\Longleftrightarrow\\quad a=c,\\qquad b=d.\\]\n\nAddition and multiplication are defined by\n\n\\[(a+b\\varepsilon)+(c+d\\varepsilon) =(a+c)+(b+d)\\varepsilon,\\]\n\n\\[(a+b\\varepsilon)(c+d\\varepsilon) =ac+(ad+bc)\\varepsilon.\\]\n\nThe term \\(bd\\varepsilon^2\\) vanishes. Multiplication is associative and commutative, and \\(1+0\\varepsilon\\) is the multiplicative identity.\n\nA dual number is invertible exactly when its real part is nonzero. For \\(a\\ne0\\),\n\n\\[(a+b\\varepsilon)^{-1} =\\frac1a-\\frac{b}{a^2}\\varepsilon.\\]\n\nConsequently, if \\(c\\ne0\\),\n\n\\[\\frac{a+b\\varepsilon}{c+d\\varepsilon} =\\frac ac+\\frac{bc-ad}{c^2}\\varepsilon.\\]\n\nThe symbol \\(\\varepsilon\\) is not a very small positive real number. It is an exact algebraic object whose square is zero. In particular, no nonzero real number can satisfy its defining relation."
    },
    {
      "heading": "Algebraic structure",
      "text": "As a vector space over \\(\\mathbb R\\), \\(\\mathbb D\\) has basis \\(\\{1,\\varepsilon\\}\\). As a ring, it can be constructed as the quotient ring\n\n\\[\\mathbb D\\cong\\mathbb R[t]/(t^2),\\]\n\nwhere two polynomials represent the same element when their difference is divisible by \\(t^2\\). Thus every class has a unique representative of degree at most one.\n\nThe element \\(\\varepsilon\\) is a nonzero nilpotent element: a positive power of it is zero. It is also a zero divisor, since \\(\\varepsilon\\varepsilon=0\\). More generally, every nonzero \\(b\\varepsilon\\) is a zero divisor. This prevents \\(\\mathbb D\\) from being a field and means that cancellation by a nonzero element is not always valid.\n\nThe map\n\n\\[\\pi:\\mathbb D\\longrightarrow\\mathbb R,\\qquad \\pi(a+b\\varepsilon)=a\\]\n\nis a surjective ring homomorphism. Its kernel,\n\n\\[(\\varepsilon)=\\{b\\varepsilon:b\\in\\mathbb R\\},\\]\n\nis the unique maximal ideal of \\(\\mathbb D\\), so \\(\\mathbb D\\) is a local ring. The product of any two elements of this ideal is zero.\n\nA faithful matrix representation is\n\n\\[a+b\\varepsilon \\longmapsto \\begin{pmatrix} a&b\\\\ 0&a \\end{pmatrix}.\\]\n\nMatrix addition and multiplication reproduce dual-number arithmetic. The determinant is \\(a^2\\), giving another verification that invertibility depends only on whether \\(a\\) is nonzero.\n\nDual conjugation is defined by\n\n\\[\\overline{a+b\\varepsilon}=a-b\\varepsilon.\\]\n\nIt satisfies\n\n\\[(a+b\\varepsilon)\\overline{(a+b\\varepsilon)}=a^2.\\]\n\nThis expression is degenerate: it vanishes for every pure dual number \\(b\\varepsilon\\), not only for zero."
    },
    {
      "heading": "Differentiation with dual numbers",
      "text": "The central identity is\n\n\\[f(a+b\\varepsilon)=f(a)+b f'(a)\\varepsilon.\\]\n\nFor a polynomial, this follows directly from dual-number arithmetic. In particular, for an integer \\(n\\ge1\\),\n\n\\[(a+b\\varepsilon)^n =a^n+n a^{n-1}b\\varepsilon.\\]\n\nAll terms containing two or more factors of \\(\\varepsilon\\) vanish.\n\nFor a differentiable real function, the same formula defines its first-order extension to dual numbers wherever its derivative exists. For an analytic function, the formula also follows from its Taylor series, since all terms of degree two and higher in \\(\\varepsilon\\) vanish. Analyticity is therefore sufficient but not necessary for the first-order extension.\n\nExamples include\n\n\\[\\exp(a+b\\varepsilon) =e^a+b e^a\\varepsilon,\\]\n\n\\[\\sin(a+b\\varepsilon) =\\sin a+b\\cos a\\,\\varepsilon,\\]\n\nand, for \\(a>0\\),\n\n\\[\\log(a+b\\varepsilon) =\\log a+\\frac ba\\varepsilon.\\]\n\nFor example, let \\(f(x)=x^3+2x\\). Then\n\n\\[f(2+\\varepsilon) =(2+\\varepsilon)^3+2(2+\\varepsilon) =12+14\\varepsilon.\\]\n\nThe real part gives \\(f(2)=12\\), and the dual coefficient gives the derivative \\(f'(2)=14\\).\n\nThis is not an approximation obtained by choosing a small step size. It is an exact identity in the dual-number algebra, subject in a computer implementation to ordinary rounding and evaluation errors."
    },
    {
      "heading": "Automatic differentiation",
      "text": "Dual numbers provide a direct implementation of forward-mode automatic differentiation. A program represents each intermediate quantity as a pair\n\n\\[(\\text{value},\\text{tangent}).\\]\n\nEach elementary operation propagates both components according to its differentiation rule. Multiplication, for example, uses\n\n\\[(u,\\dot u)(v,\\dot v) =(uv,u\\dot v+\\dot u\\,v),\\]\n\nwhich is precisely the product rule.\n\nEvaluating a composition of elementary operations automatically applies the chain rule. Seeding the input as \\(x+\\varepsilon\\) computes the derivative with respect to \\(x\\); seeding it as \\(x+v\\varepsilon\\) computes the derivative scaled by \\(v\\).\n\nFor a differentiable map \\(F:\\mathbb R^n\\to\\mathbb R^m\\), the corresponding extension is\n\n\\[F(x+\\varepsilon v) =F(x)+\\varepsilon J_F(x)v,\\]\n\nwhere \\(J_F(x)\\) is the Jacobian matrix. One evaluation therefore produces a Jacobian–vector product. For a scalar-valued function, the tangent component is the directional derivative\n\n\\[Df(x)[v]=\\nabla f(x)\\cdot v.\\]\n\nOrdinary dual numbers carry one tangent direction at a time. Computing a full Jacobian may require multiple evaluations or a generalized representation carrying several tangent components. Reverse-mode automatic differentiation uses a different propagation strategy and can be more efficient for scalar-valued functions with many inputs.\n\nUnlike finite-difference derivative estimates, dual-number differentiation introduces no step-size truncation error and does not estimate derivatives by subtracting nearby function values. Nevertheless, floating-point arithmetic still introduces rounding errors. Nondifferentiable operations, discrete decisions, and branch boundaries require care: propagating through the executed branch does not establish that the overall program is differentiable at that input."
    },
    {
      "heading": "Infinitesimal and geometric interpretation",
      "text": "Dual numbers describe first-order changes while discarding products of changes. An expression\n\n\\[x+\\varepsilon v\\]\n\ncan be interpreted as a point \\(x\\) equipped with a tangent vector \\(v\\). Under a differentiable map \\(F\\), it transforms into\n\n\\[F(x)+\\varepsilon\\,DF_x(v).\\]\n\nThis packages the action of the derivative on a tangent space into ordinary algebraic evaluation.\n\nIn algebraic geometry, dual numbers provide an algebraic description of tangent directions. Suppose a space is defined by polynomial equations\n\n\\[p_1(x)=\\cdots=p_r(x)=0.\\]\n\nA dual-number point \\(x+\\varepsilon v\\) satisfies these equations exactly when\n\n\\[p_i(x)=0,\\qquad Dp_i(x)[v]=0\\]\n\nfor every \\(i\\). The vectors \\(v\\) satisfying these linearized equations form the Zariski tangent space at \\(x\\). At a singular point, this tangent space can have greater dimension than the local dimension of the space.\n\nThis interpretation does not make \\(\\varepsilon\\) an ordinary real displacement. Its infinitesimal character comes from nilpotence, rather than from being a nonzero real quantity smaller than every positive real number."
    },
    {
      "heading": "History and related constructions",
      "text": "Dual numbers are generally credited to William Kingdon Clifford, who introduced them in 1873. They subsequently became useful in geometry, mechanics, and computational differentiation.\n\nSeveral related constructions retain different amounts of differential information:\n\n- Higher-order truncated polynomial algebras, such as \\(\\mathbb R[t]/(t^{k+1})\\), retain powers through \\(t^k\\) and can encode higher derivatives with appropriate factorial scaling.\n- Multiple independent first-order directions can be represented by generators \\(\\varepsilon_1,\\ldots,\\varepsilon_n\\) satisfying \\(\\varepsilon_i\\varepsilon_j=0\\) for every pair \\(i,j\\). These retain several first derivatives but no mixed second-order information.\n- Hyper-dual numbers use commuting generators whose individual squares vanish while certain mixed products remain nonzero. Those products can carry mixed second derivatives.\n- Dual quaternions have the form \\(p+\\varepsilon q\\), where \\(p\\) and \\(q\\) are quaternions and \\(\\varepsilon\\) commutes with them. With suitable constraints, they represent rigid-body rotations and translations.\n\nThe term “dual” here should not be confused with the dual space of a vector space, which consists of linear functionals, or with optimization duality. These are distinct mathematical constructions."
    }
  ],
  "links": [
    "real-number",
    "automatic-differentiation",
    "differential-geometry",
    "complex-number",
    "vector-space",
    "ring-mathematics",
    "field-mathematics",
    "homomorphism",
    "ideal-ring-theory",
    "matrix",
    "polynomial",
    "taylor-series",
    "derivative",
    "chain-rule",
    "jacobian-matrix",
    "directional-derivative",
    "floating-point-arithmetic",
    "tangent-space",
    "algebraic-geometry",
    "quaternion",
    "dual-space"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}