# Dual number

Dual numbers can be added componentwise, and multiplied by the formula

which follows from the property *ε*^{2} = 0 and the fact that multiplication is a bilinear operation.

The dual numbers form a commutative algebra of dimension two over the reals, and also an Artinian local ring. They are one of the simplest examples of a ring that has nonzero nilpotent elements.

Dual numbers were introduced in 1873 by William Clifford, and were used at the beginning of the twentieth century by the German mathematician Eduard Study, who used them to represent the dual angle which measures the relative position of two skew lines in space. Study defined a dual angle as *ϑ* + *dε*, where ϑ is the angle between the directions of two lines in three-dimensional space and d is a distance between them. The n-dimensional generalization, the Grassmann number, was introduced by Hermann Grassmann in the late 19th century.

One application of dual numbers is automatic differentiation. Consider the real dual numbers above. Given any real polynomial *P*(*x*) = *p*_{0} + *p*_{1}*x* + *p*_{2}*x*^{2} + ... + *p*_{n}*x*^{n} , it is straightforward to extend the domain of this polynomial from the reals to the dual numbers. Then we have this result:

More generally, we can extend any (analytic) real function to the dual numbers by looking at its Taylor series:

since all terms of involving *ε*^{2} or greater are trivially 0 by the definition of ε.

By computing compositions of these functions over the dual numbers and examining the coefficient of ε in the result we find we have automatically computed the derivative of the composition.

A similar method works for polynomials of n variables, using the exterior algebra of an n-dimensional vector space.

The "unit circle" of dual numbers consists of those with *a* = ±1 since these satisfy *zz** = 1 where *z** = *a* − *bε*. However, note that

so the exponential map applied to the ε-axis covers only half the "circle".

Let *z* = *a* + *bε*. If *a* ≠ 0 and *m* = *b*/*a*, then *z* = *a*(1 + *mε*) is the polar decomposition of the dual number z, and the slope m is its angular part. The concept of a *rotation* in the dual number plane is equivalent to a vertical shear mapping since (1 + *pε*)(1 + *qε*) = 1 + (*p* + *q*)*ε*.

relates the resting coordinates system to a moving frame of reference of velocity v. With dual numbers *t* + *xε* representing events along one space dimension and time, the same transformation is effected with multiplication by 1 + *vε*.

Division of dual numbers is defined when the real part of the denominator is non-zero. The division process is analogous to complex division in that the denominator is multiplied by its conjugate in order to cancel the non-real parts.

This means that the non-real part of the "quotient" is arbitrary and division is therefore not defined for purely nonreal dual numbers. Indeed, they are (trivially) zero divisors and clearly form an ideal of the associative algebra (and thus ring) of the dual numbers.

Dual numbers find applications in mechanics, notably for kinematic synthesis. For example, the dual numbers make it possible to transform the input/output equations of a four-bar spherical linkage, which includes only rotoid joints, into a four-bar spatial mechanism (rotoid, rotoid, rotoid, cylindrical). The dualized angles are made of a primitive part, the angles, and a dual part, which has units of length.^{[2]} See screw theory for more.

This construction can be carried out more generally: for a commutative ring R one can define the dual numbers over R as the quotient of the polynomial ring *R*[*X*] by the ideal (*X*^{2}): the image of X then has square equal to zero and corresponds to the element ε from above.

Dual numbers find applications in physics, where they constitute one of the simplest non-trivial examples of a superspace. Equivalently, they are supernumbers with just one generator; supernumbers generalize the concept to n distinct generators ε, each anti-commuting, possibly taking n to infinity. Superspace generalizes supernumbers slightly, by allowing multiple commuting dimensions.

The motivation for introducing dual numbers into physics follows from the Pauli exclusion principle for fermions. The direction along ε is termed the "fermionic" direction, and the real component is termed the "bosonic" direction. The fermionic direction earns this name from the fact that fermions obey the Pauli exclusion principle: under the exchange of coordinates, the quantum mechanical wave function changes sign, and thus vanishes if two coordinates are brought together; this physical idea is captured by the algebraic relation *ε*^{2} = 0.

The idea of a projective line over dual numbers was advanced by Grünwald^{[3]} and Corrado Segre.^{[4]}

Just as the Riemann sphere needs a north pole point at infinity to close up the complex projective line, so a line at infinity succeeds in closing up the plane of dual numbers to a cylinder.^{[1]}^{: 149–153 }