Katana VentraIP

Quaternion

In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843[1][2] and applied to mechanics in three-dimensional space. The algebra of quaternions is often denoted by H (for Hamilton), or in blackboard bold by Quaternions are not a field, because multiplication of quaternions is not, in general, commutative. Quaternions provide a definition of the quotient of two vectors in a three-dimensional space.[3][4] Quaternions are generally represented in the form

This article is about quaternions in mathematics. For other uses, see Quaternion (disambiguation).

where the coefficients a, b, c, d are real numbers, and 1, i, j, k are the basis vectors or basis elements.[5]


Quaternions are used in pure mathematics, but also have practical uses in applied mathematics, particularly for calculations involving three-dimensional rotations, such as in three-dimensional computer graphics, computer vision, magnetic resonance imaging[6] and crystallographic texture analysis.[7] They can be used alongside other methods of rotation, such as Euler angles and rotation matrices, or as an alternative to them, depending on the application.


In modern terms, quaternions form a four-dimensional associative normed division algebra over the real numbers, and therefore a ring, also a division ring and a domain. It is a special case of a Clifford algebra, classified as It was the first noncommutative division algebra to be discovered.


According to the Frobenius theorem, the algebra is one of only two finite-dimensional division rings containing a proper subring isomorphic to the real numbers; the other being the complex numbers. These rings are also Euclidean Hurwitz algebras, of which the quaternions are the largest associative algebra (and hence the largest ring). Further extending the quaternions yields the non-associative octonions, which is the last normed division algebra over the real numbers. The next extension gives the sedenions, which have zero divisors and so cannot be a normed division algebra.[8]


The unit quaternions give a group structure on the 3-sphere S3 isomorphic to the groups Spin(3) and SU(2), i.e. the universal cover group of SO(3). The positive and negative basis vectors form the eight-element quaternion group.

The real quaternion 1 is the .

identity element

The real quaternions commute with all other quaternions, that is aq = qa for every quaternion q and every real quaternion a. In algebraic terminology this is to say that the field of real quaternions are the of this quaternion algebra.

center

The product is first given for the basis elements (see next subsection), and then extended to all quaternions by using the and the center property of the real quaternions. The Hamilton product is not commutative, but is associative, thus the quaternions form an associative algebra over the real numbers.

distributive property

Additionally, every nonzero quaternion has an inverse with respect to the Hamilton product:

Constraining any two of b, c and d to zero produces a representation of complex numbers. For example, setting c = d = 0 produces a diagonal complex matrix representation of complex numbers, and setting b = d = 0 produces a real matrix representation.

The norm of a quaternion (the square root of the product with its conjugate, as with complex numbers) is the square root of the of the corresponding matrix.[30]

determinant

The scalar part of a quaternion is one half of the .

matrix trace

The conjugate of a quaternion corresponds to the of the matrix.

conjugate transpose

By restriction this representation yields an between the subgroup of unit quaternions and their image SU(2). Topologically, the unit quaternions are the 3-sphere, so the underlying space of SU(2) is also a 3-sphere. The group SU(2) is important for describing spin in quantum mechanics; see Pauli matrices.

isomorphism

There is a strong relation between quaternion units and Pauli matrices. The 2 × 2 complex matrix above can be written as , so in this representation the quaternion units {±1, ±i, ±j, ±k} correspond to I, ,, } = I, ,, }, so multiplying any two Pauli matrices always yields a quaternion unit matrix, all of them except for −1. One obtains −1 via i2 = j2 = k2 = i j k = −1; e.g. the last equality is

The representation in M(2,C) is not unique. A different convention, that preserves the direction of cyclic ordering between the quaternions and the Pauli matrices, is to choose

Just as complex numbers can be represented as matrices, so can quaternions. 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. One is to use 2 × 2 complex matrices, and the other is to use 4 × 4 real matrices. In each case, the representation given is one of a family of linearly related representations. These are injective homomorphisms from to the matrix rings M(2,C) and M(4,R), respectively.


The quaternion a + bi + cj + dk can be represented using a 2 × 2 complex matrix as


This representation has the following properties:


Using 4 × 4 real matrices, that same quaternion can be written as


However, the representation of quaternions in M(4,R) is not unique. For example, the same quaternion can also be represented as


There exist 48 distinct matrix representations of this form in which one of the matrices represents the scalar part and the other three are all skew-symmetric. More precisely, there are 48 sets of quadruples of matrices with these symmetry constraints such that a function sending 1, i, j, and k to the matrices in the quadruple is a homomorphism, that is, it sends sums and products of quaternions to sums and products of matrices.[32] In this representation, the conjugate of a quaternion corresponds to the transpose of the matrix. The fourth power of the norm of a quaternion is the determinant of the corresponding matrix. The scalar part of a quaternion is one quarter of the matrix trace. As with the 2 × 2 complex representation above, complex numbers can again be produced by constraining the coefficients suitably; for example, as block diagonal matrices with two 2 × 2 blocks by setting c = d = 0.


Each 4×4 matrix representation of quaternions corresponds to a multiplication table of unit quaternions. For example, the last matrix representation given above corresponds to the multiplication table


which is isomorphic — through — to


Constraining any such multiplication table to have the identity in the first row and column and for the signs of the row headers to be opposite to those of the column headers, then there are 3 possible choices for the second column (ignoring sign), 2 possible choices for the third column (ignoring sign), and 1 possible choice for the fourth column (ignoring sign); that makes 6 possibilities. Then, the second column can be chosen to be either positive or negative, the third column can be chosen to be positive or negative, and the fourth column can be chosen to be positive or negative, giving 8 possibilities for the sign. Multiplying the possibilities for the letter positions and for their signs yields 48. Then replacing 1 with a, i with b, j with c, and k with d and removing the row and column headers yields a matrix representation of a + b i + c j + d k .

Square roots[edit]

Square roots of −1[edit]

In the complex numbers, there are exactly two numbers, i and i, that give −1 when squared. In there are infinitely many square roots of minus one: the quaternion solution for the square root of −1 is the unit sphere in To see this, let q = a + b i + c j + d k be a quaternion, and assume that its square is −1. In terms of a, b, c, and d, this means

Avoiding , a problem with systems such as Euler angles.

gimbal lock

Faster and more compact than matrices.

Nonsingular representation (compared with Euler angles for example).

Pairs of unit quaternions represent a rotation in space (see Rotations in 4-dimensional Euclidean space: Algebra of 4D rotations).

4D

The word "conjugation", besides the meaning given above, can also mean taking an element a to r a r−1 where r is some nonzero quaternion. All elements that are conjugate to a given element (in this sense of the word conjugate) have the same real part and the same norm of the vector part. (Thus the conjugate in the other sense is one of the conjugates in this sense.) [40]


Thus the multiplicative group of nonzero quaternions acts by conjugation on the copy of consisting of quaternions with real part equal to zero. Conjugation by a unit quaternion (a quaternion of absolute value 1) with real part cos(φ) is a rotation by an angle 2φ, the axis of the rotation being the direction of the vector part. The advantages of quaternions are:[41]


The set of all unit quaternions (versors) forms a 3-sphere S3 and a group (a Lie group) under multiplication, double covering the group of real orthogonal 3×3 matrices of determinant 1 since two unit quaternions correspond to every rotation under the above correspondence. See plate trick.


The image of a subgroup of versors is a point group, and conversely, the preimage of a point group is a subgroup of versors. The preimage of a finite point group is called by the same name, with the prefix binary. For instance, the preimage of the icosahedral group is the binary icosahedral group.


The versors' group 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 + b i + c j + d k where a, b, c, and d are either all integers or all half-integers. The set A is a ring (in fact a domain) and a lattice and is called the ring of Hurwitz quaternions. There are 24 unit quaternions in this ring, and they are the vertices of a regular 24 cell with Schläfli symbol {3,4,3}. They correspond to the double cover of the rotational symmetry group of the regular tetrahedron. Similarly, the vertices of a regular 600 cell with Schläfli symbol {3,3,5} can be taken as the unit icosians, corresponding to the double cover of the rotational symmetry group of the regular icosahedron. The double cover of the rotational symmetry group of the regular octahedron corresponds to the quaternions that represent the vertices of the disphenoidal 288-cell.[42]

Rotors are a natural part of geometric algebra and easily understood as the encoding of a double reflection.

In geometric algebra, a rotor and the objects it acts on live in the same space. This eliminates the need to change representations and to encode new data structures and methods, which is traditionally required when augmenting linear algebra with quaternions.

Rotors are universally applicable to any element of the algebra, not just vectors and other quaternions, but also lines, planes, circles, spheres, rays, and so on.

In the of Euclidean geometry, rotors allow the encoding of rotation, translation and scaling in a single element of the algebra, universally acting on any element. In particular, this means that rotors can represent rotations around an arbitrary axis, whereas quaternions are limited to an axis through the origin.

conformal model

Rotor-encoded transformations make interpolation particularly straightforward.

Rotors carry over naturally to , for example, the Minkowski space of special relativity. In such spaces rotors can be used to efficiently represent Lorentz boosts, and to interpret formulas involving the gamma matrices.

pseudo-Euclidean spaces

The usefulness of quaternions for geometrical computations can be generalised to other dimensions by identifying the quaternions as the even part of the Clifford algebra This is an associative multivector algebra built up from fundamental basis elements σ1, σ2, σ3 using the product rules


If these fundamental basis elements are taken to represent vectors in 3D space, then it turns out that the reflection of a vector r in a plane perpendicular to a unit vector w can be written:


Two reflections make a rotation by an angle twice the angle between the two reflection planes, so


corresponds to a rotation of 180° in the plane containing σ1 and σ2. This is very similar to the corresponding quaternion formula,


Indeed, the two structures and are isomorphic. One natural identification is


and it is straightforward to confirm that this preserves the Hamilton relations


In this picture, so-called "vector quaternions" (that is, pure imaginary quaternions) correspond not to vectors but to bivectors – quantities with magnitudes and orientations associated with particular 2D planes rather than 1D directions. The relation to complex numbers becomes clearer, too: in 2D, with two vector directions σ1 and σ2, there is only one bivector basis element σ1σ2, so only one imaginary. But in 3D, with three vector directions, there are three bivector basis elements σ2σ3, σ3σ1, σ1σ2, so three imaginaries.


This reasoning extends further. In the Clifford algebra there are six bivector basis elements, since with four different basic vector directions, six different pairs and therefore six different linearly independent planes can be defined. Rotations in such spaces using these generalisations of quaternions, called rotors, can be very useful for applications involving homogeneous coordinates. But it is only in 3D that the number of basis bivectors equals the number of basis vectors, and each bivector can be identified as a pseudovector.


There are several advantages for placing quaternions in this wider setting:[43]


For further detail about the geometrical uses of Clifford algebras, see Geometric algebra.

 – Mathematical strategy

Conversion between quaternions and Euler angles

 – Eight-dimensional algebra over the real numbers

Dual quaternion

 – Four-dimensional algebra over the real numbers

Dual-complex number

 – Algebra of exterior/ wedge products

Exterior algebra

 – Concept in mathematics

Hurwitz quaternion order

 – Mutation of quaternions where unit vectors square to +1

Hyperbolic quaternion

 – Transparent dry-erase sphere used to teach spherical geometry

Lénárt sphere

 – Matrices important in quantum mechanics and the study of spin

Pauli matrices

 – Concept in geometry

Quaternionic manifold

 – Concept in linear algebra

Quaternionic matrix

 – Concept in geometry

Quaternionic polytope

 – Concept in mathematics

Quaternionic projective space

 – Special orthogonal group

Rotations in 4-dimensional Euclidean space

 – Spherical linear interpolation in computer graphics

Slerp

 – Four-dimensional associative algebra over the reals

Split-quaternion

 – Four-dimensional analogue of the cube

Tesseract

Media related to Quaternions at Wikimedia Commons

Quaternions – Visualisation