+ Quaternion multiplication table Left column shows the left factor, top row shows the right factor. Also, and for , .

In mathematics, the quaternions form a number system similar to the complex numbers, with the usual arithmetical operations of addition, subtraction, multiplication, and division, but with four real-number components instead of two. Unlike with the complex numbers, quaternion multiplication is not commutative, meaning that the result of multiplying two quaternions depends on their order. Quaternions can be used to represent vectors in three-dimensional space, which provides a definition of the quotient of two vectors.

Quaternions were first described by the Irish mathematician and physicist William Rowan Hamilton in 1843,Hamilton described quaternions in a letter to John Graves, 17 October 1843. It was published in . and in his honor the set of all quaternions is conventionally denoted by or . A generic quaternion is usually represented in the form

where the coefficients , , , are real numbers, and , are the basis vectors or basis elements.

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, robotics, magnetic resonance imaging and crystallographic texture analysis. 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.

As an abstract mathematical structure, quaternions form a four-dimensional associative normed division algebra over the real numbers, and therefore a ring, also a division ring and a domain. Because of their non-commutative multiplication, they do not form a field. The quaternions are also a special case of a Clifford algebra, classified as

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.

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

History

Quaternions were introduced by Hamilton in 1843.See Important precursors to this work included Euler's four-square identity (1748) and Olinde Rodrigues' parameterization of general rotations by four parameters (1840), but neither of these writers treated the four-parameter rotations as an algebra. Gauss had discovered quaternions in 1819, but this work was not published until 1900.

Hamilton knew that the complex numbers could be interpreted as points in a plane, and he was looking for a way to do the same for points in three-dimensional space. Points in space can be represented by their coordinates, which are triples of numbers, and for many years he had known how to add and subtract triples of numbers. However, for a long time, he had been stuck on the problem of multiplication and division of triples. In fact, Ferdinand Georg Frobenius later proved in 1877 that for a division algebra over the real numbers to be finite-dimensional and associative, it cannot be three-dimensional, and there are only three such division algebras: (complex numbers) and (quaternions) which have dimension 1, 2, and 4 respectively.

The great breakthrough in quaternions finally came on Monday 16 October 1843 in Dublin, when Hamilton was on his way to the Royal Irish Academy to preside at a council meeting. As he walked along the towpath of the Royal Canal with his wife, the concepts behind quaternions were taking shape in his mind. When the answer dawned on him, Hamilton could not resist the urge to carve the defining formula for the quaternions into the stone of Brougham Bridge with his pocket knife:Letter dated August 5, 1865 from Sir W. R. Hamilton to Rev. Archibald H. Hamilton describing the Discovery of Quaternions Trinity College, Dublin: School of Mathematics

Although the carving has since faded away, there has been an annual pilgrimage since 1989, called the Hamilton Walk, for scientists and mathematicians who process from the Dunsink Observatory to the Royal Canal bridge in remembrance of Hamilton's discovery.

On the following day, Hamilton wrote a letter to his friend and fellow mathematician, J.T. Graves, describing the train of thought that led to his discovery. The letter was later published in a letter to the Philosophical Magazine; Hamilton states:

Hamilton called a quadruple with these rules of multiplication a quaternion, and he devoted most of the remainder of his life to studying and teaching them. Hamilton's treatment is more geometric than the modern approach, which emphasizes quaternions' algebraic properties. He founded a school of "quaternionists", and he tried to popularize quaternions in several books. The last and longest of his books, Elements of Quaternions, was 800 pages long; it was edited by his son and published shortly after his death.

After Hamilton's death, the Scottish mathematical physicist Peter Tait became the chief proponent of quaternions. At this time, quaternions were a mandatory examination topic in Dublin. Topics in physics and geometry that would now be described using vectors, such as kinematics in space and Maxwell's equations, were described entirely in terms of quaternions. There was even a professional research association, the Quaternion Association, devoted to the study of quaternions and other hypercomplex number systems.The Quaternion Association at MacTutor History of Mathematics archive

From the mid-1880s, quaternions began to be displaced by vector analysis, which had been developed by Josiah Willard Gibbs, Oliver Heaviside, and Hermann von Helmholtz. Vector analysis described the same phenomena as quaternions, so it borrowed some ideas and terminology liberally from the literature on quaternions. However, vector analysis was conceptually simpler and notationally cleaner, and eventually quaternions were relegated to a minor role in mathematics and physics. A side-effect of this transition is that Hamilton's work is difficult to comprehend for many modern readers. Hamilton's original definitions are unfamiliar and his writing style was wordy and difficult to follow.

However, quaternions have had a revival since the late 20th century, primarily due to their utility in describing spatial rotations. The representations of rotations by quaternions are more compact and quicker to compute than the representations by matrices. In addition, unlike Euler angles, they are not susceptible to "gimbal lock". For this reason, quaternions are used in computer graphics, Presented at SIGGRAPH '85. computer vision, robotics, nuclear magnetic resonance image sampling, control theory, signal processing, attitude control, physics, bioinformatics, molecular dynamics, computer simulations, and orbital mechanics. For example, it is common for the attitude control systems of spacecraft to be commanded in terms of quaternions. Quaternions also have contributed to number theory, because of their relationships with the quadratic forms. — concerning Hurwitz quaternions

Quaternions in physics Hamilton had introduced biquaternions in his Lectures on Quaternions, and these were used by Ludwik Silberstein in 1914 to exhibit the Lorentz transformations of special relativity.Ludwik Silberstein (1914) The Theory of Relativity via Internet Archive This representation of Lorentz transformations was also used by Cornelius Lanczos in 1949.Cornelius Lanczos (1949) The Variational Principles of Mechanics, University of Toronto Press

The finding of 1924 that in quantum mechanics the spin of an electron and other matter particles (known as spinors) can be described using quaternions (in the form of the famous Pauli spin matrices) furthered their interest; quaternions helped to understand how rotations of electrons by can be discerned from those by (the "Plate trick"). , their use has not yet overtaken rotation groups.

W. K. Clifford/ (1845 − 1879) introduced his algebras as a tensor product ("compound of algebras") of quaternion algebras (and its even sub-algebra), a concept introduced by B. Peirce (1809 − 1880). R. Lipschitz (1832 − 1903) rediscovered independently the even subalgebra. In 1922, C. L. E. Moore (1876 − 1931) was to call Lipschitz' algebras "hyperquaternions". The term "hyperquaternion" designates nowadays both the tensor product of quaternion algebras and its even subalgebra .

Examples of hyperquaternions are: (isomorphic to the Clifford algebra and to real matrices ) leading to applications in special relativity. Its even subalgebra is (biquaternions).

Another example is yielding a quaternionic matrix and its even subalgebra (Dirac algebra).

Definition A quaternion is an expression of the form

where , , , , are real numbers, and , , , are symbols that can be interpreted as unit-vectors pointing along the three spatial axes. In practice, if one of , , , is , the corresponding term is omitted; if , , , are all zero, the quaternion is the zero quaternion, denoted ; if one of , , equals 1, the corresponding term is written simply , or .

A quaternion , can be decomposed into its scalar part (sometimes real part) and its vector part (sometimes imaginary part). A quaternion that equals its real part (that is, its vector part is zero) is called a (sometimes real quaternion or simply scalar), and is identified with the corresponding real number. That is, the real numbers are embedded in the quaternions. A quaternion that equals its vector part is called a (sometimes right quaternion).

Quaternions form a 4-dimensional vector space over the real numbers, with as a basis, by the component-wise addition

and the component-wise scalar multiplication

A multiplicative group structure, called the Hamilton product, denoted by juxtaposition, can be defined on the quaternions in the following way: The scalar quaternion is the identity element. The scalar quaternions commute with all other quaternions, that is for every quaternion and every scalar quaternion . In algebraic terminology this is to say that the field of the scalar quaternions is the center of the quaternion algebra. The product is first given for the basis elements, and then extended to all quaternions by using the distributive property and the center property of the scalar quaternions (see below for details). The Hamilton product is not commutative, but is associative, thus the quaternions form an associative algebra over the real numbers. Additionally, every nonzero quaternion has an inverse with respect to the Hamilton product: Thus the quaternions form a division algebra.

Multiplication of basis elements + Multiplication table Non-commutativity is emphasized by colored squares The multiplication of the basis elements, , and , with is defined by the fact that is a multiplicative identity. That is,

The remaining products that Hamilton used to define multiplication are:

From these, the additional rules can be derived:

Center The center of a noncommutative ring is the subring of elements such that for every . The center of the quaternion algebra is the subfield of scalar quaternions. In fact, it is a part of the definition that the scalar quaternions belong to the center. Conversely, if belongs to the center, then

and . A similar computation with instead of shows that one has also . Thus is a scalar quaternion.