
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the quaternion
number system extends the
complex numbers. Quaternions were first described by the Irish mathematician
William Rowan Hamilton in 1843 and applied to
mechanics in
three-dimensional space. The algebra of quaternions is often denoted by (for ''Hamilton''), or in
blackboard bold by
Quaternions are not a
field, because multiplication of quaternions is not, in general,
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a pr ...
. Quaternions provide a definition of the quotient of two
vectors in a three-dimensional space. Quaternions are generally 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.
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.
The
unit quaternions give a
group structure on the
3-sphere 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.
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.
Carl Friedrich 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
Space is a three-dimensional continuum containing positions and directions. In classical physics, physical space is often conceived in three linear dimensions. Modern physicists usually consider it, with time, to be part of a boundless ...
. 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. He could not figure out how to calculate the quotient of the coordinates of two points in space. 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
Dublin is the capital and largest city of Republic of Ireland, Ireland. Situated on Dublin Bay at the mouth of the River Liffey, it is in the Provinces of Ireland, province of Leinster, and is bordered on the south by the Dublin Mountains, pa ...
, 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 formula for the quaternions,
into the stone of
Brougham Bridge as he paused on it. Although the carving has since faded away, there has been an annual pilgrimage since 1989 called the
Hamilton Walk for scientists and mathematicians who walk from
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,
John T. Graves, describing the train of thought that led to his discovery. This letter was later published in a letter to the ''
London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science'';
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 exponent 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 physics, kinematics studies the geometrical aspects of motion of physical objects independent of forces that set them in motion. Constrained motion such as linked machine parts are also described as kinematics.
Kinematics is concerned with s ...
in space and
Maxwell's equations, were described entirely in terms of quaternions. There was even a professional research association, the
Quaternion Society, devoted to the study of quaternions and other
hypercomplex number systems.
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
Physics is the scientific study of matter, its Elementary particle, fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge whi ...
. 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
Gimbal lock is the loss of one degree of freedom (mechanics), degree of freedom in a multi-dimensional mechanism at certain alignments of the axes. In a three-dimensional three-gimbal mechanism, gimbal lock occurs when the axes of two of the gi ...
". For this reason, quaternions are used in
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
,
[ Presented at SIGGRAPH '85.] computer vision,
robotics,
nuclear magnetic resonance image sampling,
control theory
Control theory is a field of control engineering and applied mathematics that deals with the control system, control of dynamical systems in engineered processes and machines. The objective is to develop a model or algorithm governing the applic ...
,
signal processing
Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, Scalar potential, potential fields, Seismic tomograph ...
,
attitude control,
physics
Physics is the scientific study of matter, its Elementary particle, fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge whi ...
,
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 have received another boost from
number theory
Number theory is a branch of pure mathematics devoted primarily to the study of the integers and arithmetic functions. Number theorists study prime numbers as well as the properties of mathematical objects constructed from integers (for example ...
because of their relationships with the
quadratic forms.
Quaternions in physics
The finding of 1924 that in
quantum mechanics
Quantum mechanics is the fundamental physical Scientific theory, theory that describes the behavior of matter and of light; its unusual characteristics typically occur at and below the scale of atoms. Reprinted, Addison-Wesley, 1989, It is ...
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 360° can be discerned from those by 720° (the "
Plate trick"). , their use has not overtaken
rotation groups.
[A more personal view of quaternions was written by Joachim Lambek in 1995. He wrote in his essay ''If Hamilton had prevailed: quaternions in physics'': "My own interest as a graduate student was raised by the inspiring book by Silberstein". He concluded by stating "I firmly believe that quaternions can supply a shortcut for pure mathematicians who wish to familiarize themselves with certain aspects of theoretical physics." ]
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 0, the corresponding term is omitted; if , , , are all zero, the quaternion is the ''zero quaternion'', denoted 0; if one of , , equals 1, the corresponding term is written simply , or .
Hamilton describes a quaternion
, as consisting of a
scalar part and a vector part. The quaternion
is called the ''vector part'' (sometimes ''imaginary part'') of , and is the ''scalar part'' (sometimes ''real part'') of . A quaternion that equals its real part (that is, its vector part is zero) is called a ''scalar'' or ''real quaternion'', and is identified with the corresponding real number. That is, the real numbers are ''embedded'' in the quaternions. (More properly, the
field of real numbers is isomorphic to a subset of the quaternions. The field of complex numbers is also isomorphic to three subsets of quaternions.) A quaternion that equals its vector part is called a ''vector quaternion''.
The set of quaternions is 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 real quaternion is the
identity element.
*The real quaternions commute with all other quaternions, that is for every quaternion and every real quaternion . In algebraic terminology this is to say that the field of real quaternions are the
''center'' of this quaternion algebra.
*The product is first given for the basis elements (see next subsection), and then extended to all quaternions by using the
distributive property and the center property of the real quaternions. The Hamilton product is not
commutative
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a pr ...
, 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
The multiplication with of the basis elements , and is defined by the fact that is a
multiplicative identity, that is,
The products of other basis elements are
Combining these rules,
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 real quaternions. In fact, it is a part of the definition that the real 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 ''real'' quaternion.
The quaternions form a division algebra. This means that the non-commutativity of multiplication is the only property that makes quaternions different from a field. This non-commutativity has some unexpected consequences, among them that a
polynomial equation over the quaternions can have more distinct solutions than the degree of the polynomial. For example, the equation has infinitely many quaternion solutions, which are the quaternions such that . Thus these "roots of –1" form a
unit sphere in the three-dimensional space of vector quaternions.
Hamilton product
For two elements and , their product, called the Hamilton product () (), is determined by the products of the basis elements and the
distributive law. The distributive law makes it possible to expand the product so that it is a sum of products of basis elements. This gives the following expression:
Now the basis elements can be multiplied using the rules given above to get:
Scalar and vector parts
A quaternion of the form , where is a real number, is called scalar, and a quaternion of the form , where , , and are real numbers, and at least one of , , or is nonzero, is called a vector quaternion. If is any quaternion, then is called its scalar part and is called its vector part. Even though every quaternion can be viewed as a vector in a four-dimensional vector space, it is common to refer to the vector part as vectors in three-dimensional space. With this convention, a vector is the same as an element of the vector space
Hamilton also called vector quaternions right quaternions and real numbers (considered as quaternions with zero vector part) scalar quaternions.
If a quaternion is divided up into a scalar part and a vector part, that is,
then the formulas for addition, multiplication, and multiplicative inverse are
where "
" and "
" denote respectively the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
and the
cross product.
Conjugation, the norm, and reciprocal
Conjugation of quaternions is analogous to conjugation of complex numbers and to transposition (also known as reversal) of elements of Clifford algebras. To define it, let
be a quaternion. The
conjugate of is the quaternion
. It is denoted by , ''q
t'',
, or .
Conjugation is an
involution, meaning that it is its own
inverse, so conjugating an element twice returns the original element. The conjugate of a product of two quaternions is the product of the conjugates ''in the reverse order''. That is, if and are quaternions, then , not .
The conjugation of a quaternion, in contrast to the complex setting, can be expressed with multiplication and addition of quaternions:
Conjugation can be used to extract the scalar and vector parts of a quaternion. The scalar part of is , and the vector part of is .
The
square root of the product of a quaternion with its conjugate is called its
''norm'' and is denoted (Hamilton called this quantity the
''tensor'' of ''q'', but this conflicts with the modern meaning of "
tensor"). In formulas, this is expressed as follows:
This is always a non-negative real number, and it is the same as the Euclidean norm on
considered as the vector space
. Multiplying a quaternion by a real number scales its norm by the absolute value of the number. That is, if is real, then
This is a special case of the fact that the norm is ''multiplicative'', meaning that
for any two quaternions and . Multiplicativity is a consequence of the formula for the conjugate of a product.
Alternatively it follows from the identity
(where denotes the usual
imaginary unit) and hence from the multiplicative property of
determinant
In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
s of square matrices.
This norm makes it possible to define the distance between and as the norm of their difference:
This makes
a
metric space.
Addition and multiplication are
continuous in regard to the associated
metric topology.
This follows with exactly the same proof as for the real numbers
from the fact that
is a normed algebra.
Unit quaternion
A unit quaternion is a quaternion of norm one. Dividing a nonzero quaternion by its norm produces a unit quaternion called the ''
versor'' of :
Every nonzero quaternion has a unique
polar decomposition while the zero quaternion can be formed from any unit quaternion.
Using conjugation and the norm makes it possible to define the
reciprocal of a nonzero quaternion. The product of a quaternion with its reciprocal should equal 1, and the considerations above imply that the product of
and
is 1 (for either order of multiplication). So the ''
reciprocal'' of is defined to be
Since the multiplication is non-commutative, the quotient quantities or are different (except if and have parallel vector parts): the notation is ambiguous and should not be used.
Algebraic properties

The set
of all quaternions is a vector space over the real numbers with
dimension 4. Multiplication of quaternions is associative and distributes over vector addition, but with the exception of the scalar subset, it is not commutative. Therefore, the quaternions
are a non-commutative, associative algebra over the real numbers. Even though
contains copies of the complex numbers, it is not an associative algebra over the complex numbers.
Because it is possible to divide quaternions, they form a division algebra. This is a structure similar to a field except for the non-commutativity of multiplication. Finite-dimensional associative division algebras over the real numbers are very rare. The
Frobenius theorem states that there are exactly three:
,
, and
. The norm makes the quaternions into a
normed algebra, and normed division algebras over the real numbers are also very rare:
Hurwitz's theorem says that there are only four:
,
,
, and
(the octonions). The quaternions are also an example of a
composition algebra and of a unital
Banach algebra.

Because the product of any two basis vectors is plus or minus another basis vector, the set forms a group under multiplication. This
non-abelian group is called the quaternion group and is denoted . The real
group ring of is a ring