Applications of Quaternions
real-world applications of the algebra of the quaternions:
electromechanics, quantum mechanics, 3D animation

Introduction

Quaternions have found a permanent place in engineering and computer description of moving objects. In physics, their use has been controversial. Although they appear natural to the description of 4-dimensional space and entities therein, they have not been widely used in the 20th century. However, in quantum field theory, quaternions have always been present in the guise of “spinors”.

Electromechanics

In Maxwell’s 1891 A Treatise on Electricity and Magnetism, quaternions are mentioned in several places, and quaternion references are cited, although the author says that he has “endeavoured to avoid any process demanding of the reader a knowledge of the Calculus of Quaternions” (see vol. II, art. 619).

Defining the conjugate quaternion gradient operator by

* = −(i / c) (∂/∂t) + ∇ ,

where c indicates the speed of light, Deavours writes Maxwell’s equations as

* (E + iH) = − ρ + iJ / c .

This amounts to a notational compression by a factor of four over the conventional notation, at least. But, do quaternions do more than provide a notational convenience (or create obfuscation)?

Quantum mechanics

The non-commutativity of quaternions has a deep consequence in quantum mechanics. The famous Heisenberg uncertainty principle can be expressed in a relation

PQQP = h,

where P and Q are linear operators that represent observations of momentum and position, respectively, and h is Planck’s constant.

It is easy to show, however, that if these are conventional linear operators over a field (the real or complex numbers), then they have to be from an infinite dimensional space (!). That they are from an infinite-dimensional space is usually taken as one of the starting points of the theory.

Physics isn’t restricted to conventional linear algebra, however. By relaxing the requirement that the operators are from a linear algebra over a field (which, by definition, has a commutative multiplication operator), so that instead the operators come from a linear algebra over the quaternions, the operator space no longer has to be infinite-dimensional, in order to be non-commutative. For many applications, such a relaxation is not appropriate, but for some, such as the solution of the equation for the electron, it is.

Objects related to quaternions arise from the solution of the Dirac equation for the electron. The non-commutativity is essential there.

The quaternions are closely related to the various “spin matrices” or “spinors” of quantum mechanics. Exactly how, I haven’t quite understood—partly, it seems, because the physics notion is a little hazy and refers to several different kinds of objects.

3D animation

The most widespread use of quaternions to date is in computer animation, where they represent transformations of orientations of graphical objects. They provide an elegant solution to problems that plagued early animated programs, gimbal lock, instability, and convenient interpolation.

A good starting point would be the problems encountered with more naive representation of orientation transformations.

The gimbal lock problem has been known for a long time, particularly from gyroscopic avionics controllers. Here, a gyro is mounted in two nested “gimbals”, each consisting of a ring with two pivots on which the next ring, is mounted. The pivots of the next ring are set at 90° from the ring on which it is mounted.

Now, it is possible to align the rings so that they are all in one plane. In this configuration, the gyro cannot rotate easily about the axis perpendicular to the rings. This situation is called gimbal lock. In practice, the effect of gimbal lock is that the gyro swings wildly when even a small change is made to its orientation.

An analogous effect occurs in 3D animation, from a naive use of 3×3 matrices to model changes of attitude of the viewer. Sometimes movement from one position to another will seem very unnatural, and sometimes gets stuck, or swings wildly.

Mathematically, what has happened is, in the vicinity of the configuration where gimbal lock occurs, the angles yield transformation matrices with unboundedly large elements.

One solution to the gimbal problem is to use instead three gimbals, and arrange that their pivots never line up in a plane. This has been done, but it raises several other complications. With the conventional gyro described above, each attitude of the gyro housing corresponds uniquely to angles between the gimbals; if the number of gimbals is increased, this uniqueness is lost.

The modern solution for the 3D animation problem is by far the simplest and most robust. It is to model the attitude of the viewer with quaternions.

Interpolating between quaternions produces smooth changes in attitude. Also, it is easy to compose quaternions to produce a composite rotation. Matrix and Quaternion FAQ

Topology

The loss of algebraic structure in each step of the Cayley-Dickson construction is not an isolated mathematical oddity. It is deeply related to the topological properties of manifolds (topological spaces that locally look like n). It turns out that, after 4, the topology of manifolds is greatly simplified. (3 is bad, but 4 is absolutely the worst.)

See also

Finkelstein, Jauch, Schiminovich, and Speiser (1962) “Foundations of Quaternion Quantum Mechanics", J. Math. Phys., 3 207–220

Finkelstein, Jauch, Schiminovich, and Speiser (1962) “Some Physical Consequences of General Q-Covariance”, Helvetica Physica Acta, 35 328–329

Finkelstein, Jauch, Schiminovich, and Speiser (1963) “Principle of General Q-Covariance”, J. Math. Phys., 4 788–796.

William Rowan Hamilton, On Quaternions

John Baez, The Octonions

Jack B. Kuipers (1998) Quaternions and rotation sequences: a primer with applications to orbits aerospace and virtual reality, Princeton University Press

Deavours, C. A. (1973) “The Quaternion Calculus”, Amer. Math. Monthly, 80 995–1008

F. Klein und A. Sommerfeld (1997) Über die Theorie des Kreisels, Leipzig