Online Encyclopedia
Quaternion
 For other uses, see Quaternion (disambiguation).
In mathematics, the quaternions are a noncommutative extension of the complex numbers. They were first described by William Rowan Hamilton of Ireland in 1843. At first, the quaternions were regarded as pathological, because they disobeyed the commutative law ab = ba. However, today they find many uses in both theoretical and applied mathematics.
Contents 
1.1 Example 
Definition
·  1  i  j  k 
1  1  i  j  k 
i  i  −1  k  −j 
j  j  −k  −1  i 
k  k  j  −i  −1 
While the complex numbers are obtained by adding the element i to the real numbers which satisfies i^{2} =  1, the quaternions are obtained by adding the elements i, j and k to the real numbers which satisfy the following relations.
Every quaternion is a real linear combination of the basis quaternions 1, i, j, and k, i.e. every quaternion is uniquely expressible in the form a + bi + cj + dk. In other words, as a vector space over the real numbers, the set H of all quaternions has dimension 4, whereas the complex number plane has dimension 2. Addition of quaternions is accomplished by adding corresponding coefficients, as with the complex numbers. By linearity, multiplication of quaternions is completely determined by the multiplication table for the basis quaternions; this table is given at the right. Under this multiplication, the basis quaternions, with their negatives, form the quaternion group of order 8, Q_{8}.The scalar part of the quaternion is a while the remainder is the vector part.Thus a vector in the context of quaternions has zero for scalar part.
Example
Let
 x = 3 + i
 y = 5i + j − 2k
Then
 x + y = 3 + 6i + j − 2k

xy = (3 + i)(5i + j − 2k)
 = 15i + 3j − 6k + 5i^{2} + ij − 2ik
 = 15i + 3j − 6k − 5 + k + 2j
 = − 5 + 15i + 5j − 5k

yx = (5i + j − 2k)(3 + i)
 = 15i + 5i^{2} + 3j + ji − 6k − 2ki
 = 15i − 5 + 3j − k − 6k − 2j
 = − 5 + 15i + j − 7k
Properties
Unlike real or complex numbers, multiplication of quaternions is not commutative: e.g.
The quaternions are an example of a division ring, an algebraic structure similar to a field except for commutativity of multiplication. In particular, multiplication is still associative and every nonzero element has a unique inverse.
Quaternions form a 4dimensional associative algebra over the reals (in fact a division algebra) and contain the complex numbers, but they do not form an associative algebra over the complex numbers. The quaternions, along with the complex and real numbers, are the only finitedimensional associative division algebras over the field of real numbers. The noncommutativity of multiplication has some unexpected consequences, among them that polynomial equations over the quaternions can have more distinct solutions than the degree of the polynomial.
The equation z^{2} + 1 = 0, for instance, has the infinitelymany quaternion solutions z = bi + cj + dk with b^{2} + c^{2} + d^{2} = 1. The conjugate z ^{*} of the quaternion z = a + bi + cj + dk is defined as
and the absolute value of z is the nonnegative real number defined by
Note that (wz) ^{*} = z ^{*} w ^{*} , which is not in general equal to w ^{*} z ^{*} . The multiplicative inverse of the nonzero quaternion z can be conveniently computed as z^{−1} = z^{*} / z^{2}.
By using the distance function d(z, w) = z − w, the quaternions form a metric space (isometric to the usual Euclidean metric on R^{4}) and the arithmetic operations are continuous. We also have zw = z w for all quaternions z and w. Using the absolute value as norm, the quaternions form a real Banach algebra.
Profile
The set of quaternions that square to 1 is the set of vectors of absolute value 1, that is
From this set equality one can view H as the union of complex planes sharing the same real line and taking an imaginary unit from the set.Furthermore, the unit sphere in H, the 3sphere, is formed by the collection of unit circles in these complex planes.As the general point on a circle is
e^{ai} = cosa + isina
(known as Euler's formula). The general point on the 3sphere is e^{ar} where r is a unit vector of H, .
Group rotation
As is explained in more detail in quaternions and spatial rotation, the multiplicative group of nonzero quaternions acts by conjugation on the copy of R^{3} consisting of quaternions with real part equal to zero. The conjugation by a unit quaternion (a quaternion of absolute value 1) with real part cos(t) is a rotation by an angle 2t, the axis of the rotation being the direction of the imaginary part. The advantages of Quaternions are:
 Non singular representation (compared with Euler angles for example)
 More compact (and faster) than matrices
 Pairs of unit quaternions can represent a rotation in 4d space.
The set of all unit quaternions forms a 3dimensional sphere S^{3} and a group (a Lie group) under multiplication. S^{3} is the double cover of the group SO(3,R) of real orthogonal 3×3 matrices of determinant 1 since two unit quaternions correspond to every rotation under the above correspondence. The group S^{3} is isomorphic to SU(2), the group of complex unitary 2×2 matrices of determinant 1. Let A be the set of quaternions of the form a + bi + cj + dk where a, b, c and d are either all integers or all rational numbers with odd numerator and denominator 2. The set A is a ring and a lattice. There are 24 unit quaternions in this ring, and they are the vertices of a 24cell regular polytope with Schläfli symbol {3,4,3}.
Representing quaternions by matrices
There are at least two ways of representing quaternions as matrices, in such a way that quaternion addition and multiplication correspond to matrix addition and matrix multiplication (i.e., quaternionmatrix homomorphisms). One is to use 2×2 complex matrices, and the other is to use 4×4 real matrices.
In the first way, the quaternion a + bi + cj + dk is represented as
This representation has several nice properties.
 All complex numbers (c = d = 0) correspond to matrices with only real entries.
 The square of the absolute value of a quaternion is the same as the determinant of the corresponding matrix.
 The conjugate of a quaternion corresponds to the conjugate transpose of the matrix.
 Restricted to unit quaternions, this representation provides the isomorphism between S^{3} and SU(2). The latter group is important in quantum mechanics when dealing with spin; see also Pauli matrices.
In the second way, the quaternion a + bi + cj + dk is represented as
In this representation, the conjugate of a quaternion corresponds to the transpose of the matrix.
Quaternion operations
Quaternion operations have extended applications in electrodynamics and general relativity. The use of quaternions can replace tensors in representation. It is sometimes easier to use quaternions with complex elements, leading to a form that is not a division algebra. However, the same operations can be performed using a combination of conjugate operations. Only quaternions with real elements will be discussed here. The discussion will involve describing quaternions in two forms. One as a combination of a vector and a scalar, and the other as a combination of the two constructors and the bivector (i, j, and k).
Define two quaternions:
where represents the vector <b, c, d>, and represents the vector <x, y, z>.
Addition, Products, and General functions
 Quaternion addition: p + q
Like complex numbers, vectors, and matrices, the addition of two quaternions is equivalent to summing the elements together:
Addition follows all of the commutativity and associativity rules of real and complex number.
 Quaternion multiplication: pq
The usual noncommutative multiplicaton between two quaternions is termed the Grassman product. This product has been described briefly above. The complete form is described below:
pq = (at  bx  cy  dz) + (bt + ax + cz  dy)i + (ct + ay + dx  bz)j + (dt + za + by  xc)k
Due to the noncommutativite nature of the quaternion multiplication, pq is not equivalent to qp. The Grassman product is useful to describe many other algebraic functions. The vector portion of the multiplication of qp follows:
 Quaternion dotproduct: p · q
The dotproduct is also referred to as the Euclidean inner product, and is equivalent to a 4vector dot product. The dot product is the sum of the quatity of each element of p multiplied by each element of q. It is a commutative product between quaternions, and returns a scalar quantity.
The dotproduct can be rewritten using the Grassman product:
This product is useful to find isolate an element from a quaternion. For instance, the i term can be pulled out from p:
 Quaternion outerproduct: Outer(p,q)
The Euclidean outerproduct is not used often; however, it is mentioned as a pair with the innerproduct because of the similarity in the Grassman product form:
 Quaternion evenproduct: Even(p,q)
The evenproduct of quaternions is also not widely used, but it mentioned due to the similarity between it and the odd product. It is the purely symmetric product; therefore, it is completely commutative.
 Quaternion crossproduct: p × q
The crossproduct of quaternions is also known as the oddproduct. It is equivalent to the vector crossproduct, and returns a vector quantity only:
 Quaternion inverse: p^{−1}
The inverse of a quaternion is defined in a way that that p^{−1}p = 1. It is defined above in the definition section, under properties (note the difference in variable notation). It is formed the same way that the complex inverse is found:
The dot product of a quaternion is a scalar. The division of a quaternion by a scalar is equivalent to multiplication by the scalar inverse, such that each element of the quaternion is divided by the divisor.
 Quaternion division: p^{−1}q
The noncommutativity of quaternions allows for two divisions of numbers p^{−1}q and qp^{−1}. This means that the notation of q/p cannot be used unless p is a scalar only.
 Quaternion scalar: Scalar(p)
The scalar of a quaternion can be isolated in the same way that was described earlier with the dotproduct:
 Quaternion vector: Vector(p)
The vector of a quaternion can be isolated using the outerproduct in the same way the inner product is used to isolate the scalar:
 Quaternion modulus:  p 
The absolute value of a quaternion is the scalar quantity that determines the length of the quaternion from the origin.
 Quaternion sign: sgn(p)
The sign of a complex number finds the complex number of the same direction found on the unit circle. The quaternion sign also produces the unit quaternion:
 Quaternion argument: arg(p)
The argument finds the angle of the 4vector quaternion from the unit scalar (i.e. 1). This returns a scalar angle.
Exponentials and Logarithms
Exponential and logarithmic functions can be defined, because quaternions have a division algebra.
 Natural exponential:
 Natural logarithm:
 Power: p^{q} = exp(ln(p)q)
Trigonometry
 Sine:
 Cosine:
 Tangent:
Hyperbolic
 Hyperbolic sine:
 Hyperbolic cosine:
 Hyperbolic tangent:
Inverse Hyperbolic functions
 Inverse hyperbolic sine:
 Inverse hyperbolic cosine:
 Inverse hyperbolic tangent:
Inverse trigonometric functions
This was listed last, because the inverse hyperbolic functions needed to be defined over quaternions first.
 Inverse sine:
 Inverse cosine:
 Inverse tangent:
Generalizations
If F is any field with characteristic different from 2, and a and b are elements of F, one may define a fourdimensional unitary associative algebra over F by using two generators i and j and the relations i^{2} = a, j^{2} = b and ij = −ji. These algebras are either isomorphic to the algebra of 2×2 matrices over F, or they are division algebras over F. They are called quaternion algebra s.
History
Quaternions were introduced by William Rowan Hamilton of Ireland in 1843. Hamilton was looking for ways of extending complex numbers (which can be viewed as points on a plane) to higher spatial dimensions. He could not do so for 3dimensions, but 4dimensions produce quaternions. According to the story Hamilton told, on October 16 Hamilton was out walking along the Royal Canal in Dublin with his wife when the solution in the form of the equation
suddenly occurred to him; Hamilton then promptly carved this equation into the side of the nearby Brougham Bridge (now called Broom Bridge). This involved abandoning the commutative law, a radical step for the time. Vector algebra and matrices were still in the future.
Not only this, but Hamilton had in a sense invented the cross and dot products of vector algebra. Hamilton also described a quaternion as an ordered quadruple (4tuple) of real numbers, and described the first coordinate as the 'scalar' part, and the remaining three as the 'vector' part. If two quaternions with zero scalar parts are multiplied, the scalar part of the product is the negative of the dot product of the vector parts, while the vector part of the product is the cross product. But the significance of these was still to be discovered. Hamilton proceeded to popularize quaternions with several books, the last of which, Elements of Quaternions, had 800 pages and was published shortly after his death.
Use controversy
Even by this time there was controversy about the use of quaternions. Some of Hamilton's supporters vociferously opposed the growing fields of vector algebra and vector calculus (developed by Oliver Heaviside and Willard Gibbs among others), maintaining that quaternions provided a superior notation. While this is debatable in three dimensions, quaternions cannot be used in other dimensions (though extensions like octonions and Clifford algebras may be more applicable). Vector notation had nearly universally replaced quaternions in science and engineering by the mid20th century.
Some early formulations of Maxwell's equations used a quaternionbased notation (although Maxwell's original formulation simply used 20 equations in 20 variables), but it proved unpopular compared to the vectorbased notation of Heaviside. (All of these formulations were mathematically equivalent.)
Recent years
Quaternions are often used in computer graphics (and associated geometric analysis) to represent rotations (see quaternions and spatial rotation) and orientations of objects in 3d space. They are smaller than other representations such as matrices, and operations on them such as composition can be computed more efficiently. Quaternions also see use in control theory, signal processing, attitude control, physics, and orbital mechanics, mainly for representing rotations/orientations in three dimensions. For example, it is common for spacecraft attitudecontrol systems to be commanded in terms of quaternions, which are also used to telemeter their current attitude. The rationale is that combining many quaternion transformations is more numerically stable than combining many matrix transformations, avoiding such phenomena as gimbal lock.
Since 1989, the National University of Ireland, Maynooth has organized a pilgrimage, where mathematicians (including Murray GellMann in 2002 and Andrew Wiles in 2003) take a walk from Dunsink observatory to the Royal Canal bridge where, unfortunately, no trace of Hamilton's carving remains.
See also
 associative algebra
 complex number
 division algebra
 hypercomplex number
 octonion
 quaternions and spatial rotation
 biquaternion
 hyperbolic quaternion
External links and resources
 The Matrix and Quaternions FAQ http://www.j3d.org/matrix_faq/matrfaq_latest.html
 Doing Physics with Quaternions http://world.std.com/~sweetser/quaternions/qindex/qindex.html
 Quaternion Calculator http://theworld.com/~sweetser/java/qcalc/qcalc.html [Java]
 The Physical Heritage of Sir W. R. Hamilton http://arxiv.org/pdf/mathph/0201058 (PDF)
 Kuipers, Jack (2002). Quaternions and Rotation Sequences: A Primer With Applications to Orbits, Aerospace, and Virtual Reality (Reprint edition). Princeton University Press. ISBN 0691102988
 "Quaternion http://31.1911encyclopedia.org/Q/QU/QUATERNIONS.htm ". 1911 encyclopedia.
 Tait, Peter Guthrie, "Quaternion http://www.ugcs.caltech.edu/~presto/papers/QuaternionsBritannica.ps ". M.A. Sec. R.S.E. Encyclopaedia Britannica, Ninth Edition, 1886, Vol. XX, pp. 160164. (PostScript file)
Topics in mathematics related to quantity 