# Dual number

In linear algebra, the dual numbers extend the real numbers by adjoining one new element ε with the property ε2 = 0 (ε is nilpotent). The collection of dual numbers forms a particular two-dimensional commutative unital associative algebra over the real numbers. Every dual number has the form z = a + bε where a and b are uniquely determined real numbers. The dual numbers can also be thought of as the exterior algebra of a one-dimensional vector space; the general case of n dimensions leads to the Grassmann numbers.

The algebra of dual numbers is a ring that is a local ring since the principal ideal generated by ε is its only maximal ideal. Dual numbers form the coefficients of dual quaternions.

## History

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 ${\displaystyle \vartheta +d\varepsilon }$, where ${\displaystyle \vartheta }$ is the angle between the directions of two lines in three-dimensional space and ${\displaystyle d}$ is a distance between them. The n-dimensional generalization, the Grassmann number, was introduced by Hermann Grassmann in the late 19th century.

## Linear representation

Using matrices, dual numbers can be represented as

${\displaystyle \varepsilon ={\begin{pmatrix}0&1\\0&0\end{pmatrix}}\quad {\text{and}}\quad a+b\varepsilon ={\begin{pmatrix}a&b\\0&a\end{pmatrix}}}$.

The sum and product of dual numbers are then calculated with ordinary matrix addition and matrix multiplication; both operations are commutative and associative within the algebra of dual numbers.

This correspondence is analogous to the usual matrix representation of complex numbers. However, it is not the only representation with 2 × 2 real matrices, as is shown in the profile of 2 × 2 real matrices. Like the complex plane and split-complex number plane, the dual numbers are one of the realizations of planar algebra.

## Geometry

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

${\displaystyle \exp(b\varepsilon )=\left(\sum _{n=0}^{\infty }(b\varepsilon )^{n}/n!\right)=1+b\varepsilon }$,

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) ε.

${\displaystyle (t',x')=(t,x){\begin{pmatrix}1&v\\0&1\end{pmatrix}}\ ,}$ that is ${\displaystyle \ \ t'=t,\ \ x'=vt+x,}$

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 ε).

### Cycles

Given two dual numbers p, and q, they determine the set of z such that the difference in slopes ("Galilean angle") between the lines from z to p and q is constant. This set is a cycle in the dual number plane; since the equation setting the difference in slopes of the lines to a constant is a quadratic equation in the real part of z, a cycle is a parabola. The "cyclic rotation" of the dual number plane occurs as a motion of the projective line over dual numbers. According to Yaglom (pp. 92,3), the cycle Z = {z : y = α x2} is invariant under the composition of the shear

${\displaystyle x_{1}=x,\ \ y_{1}=vx+y}$ with the translation
${\displaystyle x'=x_{1}=v/2a,\ \ y'=y_{1}+v^{2}/4a}$.

This composition is a cyclic rotation; the concept has been further developed by V. V. Kisil.[1]

## Algebraic properties

In abstract algebra terms, the dual numbers can be described as the quotient of the polynomial ring R[X] by the ideal generated by the polynomial X2,

R[X]/(X2).

The image of X in the quotient is the unit ε. With this description, it is clear that the dual numbers form a commutative ring with characteristic 0. The inherited multiplication gives the dual numbers the structure of a commutative and associative algebra over the reals of dimension two. The algebra is not a division algebra or field since the elements of the form 0 + bε are not invertible. All elements of this form are zero divisors (also see the section "Division"). The algebra of dual numbers is isomorphic to the exterior algebra of ${\displaystyle \mathbb {R} ^{1}}$.

## Generalization

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 (X2): the image of X then has square equal to zero and corresponds to the element ε from above.

This ring and its generalisations play an important part in the algebraic theory of derivations and Kähler differentials (purely algebraic differential forms).

Over any ring R, the dual number a + bε is a unit (i.e. multiplicatively invertible) if and only if a is a unit in R. In this case, the inverse of a + bε is a−1ba−2ε. As a consequence, we see that the dual numbers over any field (or any commutative local ring) form a local ring, its maximal ideal being the principal ideal generated by ε.

A narrower generalization is that of introducing n anti-commuting generators; these are the Grassmann numbers or supernumbers, discussed below.

## Superspace

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.

## Differentiation

One application of dual numbers is automatic differentiation. Consider the real dual numbers above. Given any real polynomial P(x) = p0+p1x+p2x2+...+pnxn, it is straightforward to extend the domain of this polynomial from the reals to the dual numbers. Then we have this result:

{\displaystyle {\begin{aligned}P(a+b\varepsilon )=&p_{0}+p_{1}(a+b\varepsilon )+\ldots +p_{n}(a+b\varepsilon )^{n}\\=&p_{0}+p_{1}a+p_{2}a^{2}+\ldots +p_{n}a^{n}\\&+p_{1}b\varepsilon +2p_{2}ab\varepsilon +\ldots +np_{n}a^{n-1}b\varepsilon \\=&P(a)+bP^{\prime }(a)\varepsilon ,\end{aligned}}}

where ${\displaystyle P^{\prime }}$ is the derivative of ${\displaystyle P}$.[2]

By computing over the dual numbers, rather than over the reals, we can use this to compute derivatives of polynomials.

More generally, we can extend any (smooth) real function to the dual numbers by looking at its Taylor series: ${\displaystyle f(a+b\varepsilon )=\sum _{n=0}^{\infty }{{f^{(n)}(a)b^{n}\varepsilon ^{n}} \over {n!}}=f(a)+bf'(a)\varepsilon }$.
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.

## Division

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.

Therefore, to divide an equation of the form:

${\displaystyle {a+b\varepsilon \over c+d\varepsilon }}$

We multiply the top and bottom by the conjugate of the denominator:

${\displaystyle ={(a+b\varepsilon )(c-d\varepsilon ) \over (c+d\varepsilon )(c-d\varepsilon )}={ac-ad\varepsilon +bc\varepsilon -bd\varepsilon ^{2} \over (c^{2}+cd\varepsilon -cd\varepsilon -d^{2}\varepsilon ^{2})}={ac-ad\varepsilon +bc\varepsilon -0 \over c^{2}-0}}$
${\displaystyle ={ac+\varepsilon (bc-ad) \over c^{2}}}$
${\displaystyle ={a \over c}+{(bc-ad) \over c^{2}}\varepsilon }$

Which is defined when c is non-zero.

If, on the other hand, c is zero while d is not, then the equation

${\displaystyle {a+b\varepsilon =(x+y\varepsilon )d\varepsilon }={xd\varepsilon +0}}$
1. has no solution if a is nonzero
2. is otherwise solved by any dual number of the form
${\displaystyle {b \over d}+{y\varepsilon }}$.

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.

## Projective line

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. [5]

Suppose D is the ring of dual numbers x + y ε and U is the subset with x ≠ 0. Then U is the group of units of D. Let B = {(a,b) in D x D : a ∈ U or b ∈ U}. A relation is defined on B as follows: (a,b) ~ (c,d) when there is a u in U such that ua=c and ub=d. This relation is in fact an equivalence relation. The points of the projective line over D are equivalence classes in B under this relation: P(D) = B/ ~.

Consider the embedding D → P(D) by z → U(z,1) where U(z,1) is the equivalence class of (z,1). Then points U(1,n), n2 = 0, are in P(D) but are not the image of any point under the embedding. P(D) is projected onto a cylinder by projection: Take a cylinder tangent to the double number plane on the line {y ε: y ∈ ℝ}, ε2 = 0. Now take the opposite line on the cylinder for the axis of a pencil of planes. The planes intersecting the dual number plane and cylinder provide a correspondence of points between these surfaces. The plane parallel to the dual number plane corresponds to points U(1,n), n2 = 0 in the projective line over dual numbers.