The Many Modern Uses of Quaternions

Hamiltons-Bridge-PlaqueThe story of William Rowan Hamilton’s discovery of new four-dimensional numbers called quaternions is familiar. The solution of a problem that had bothered him for years occurred to him in a flash of insight as he walked along the Royal Canal in Dublin. But this Eureka moment did not arise spontaneously: it was the result of years of intense effort. The great French mathematician Henri Poincaré also described how sudden inspiration occurs unexpectedly, but always following a period of concentrated research [TM148, or search for “thatsmaths” at].

Hamilton carved his quaternion formula on Broombridge, where the answer had come to him. This was on 16 October 1843 and a plaque on the bridge commemorates the event. Every year, Hamilton’s many contributions to mathematics and science are celebrated on this day by a walk, retracing Hamilton’s steps from Dunsink Observatory to Broombridge. Click “events” at for details of this year’s walk.

Uses of Quaternions

Hamilton knew immediately that his discovery would keep him occupied for many years. He and his followers used quaternions for solving problems in mechanics and optics. Quaternions were popular for a time but could be cumbersome to use and were supplanted by more manageable objects called vectors. They languished in obscurity for a century or more but have re-emerged recently in several contexts. Today, quaternions have applications in astronautics, robotics, navigation, computer visualization, animation and special effects in movies, and many other areas.


Apollo 13 computer guidance console. Note “Gimbal Lock” warning light.

Gimbal Lock

Quaternions are vital for the control systems that guide aircraft and rockets. Let us think of an aircraft in flight. Changes in its orientation can be given by three rotations known as pitch, roll and yaw, represented by three arrays of numbers called matrices. But when two rotation axes align, an ambiguity arises that can result in catastrophic loss of control. This is called gimbal lock, and can lead to disaster. During the Apollo 11 Moon mission, the spaceflight that landed the first two people on the Moon, an incident involving gimbal lock occurred on the inertial measurement unit of the Luner Module.

More Applications

The mathematical properties of unit quaternions (those with length equal to 1) make them ideal for representing rotations in three dimensions. Each quaternion has an axis giving its direction and a magnitude giving the size of the rotation. Instead of representing a change of orientation by three separate rotations, quaternions use just one rotation. This saves time and storage and also solves the problem of gimbal lock.


Electric toothbrush with quaternion-controlled tracking system.
Image from: Fuelling Innovation and Discovery: Mathematics in the 21st Century. National Research Council, 2012.

One surprising application of quaternions is to electric toothbrushes. Tooth brushing is a blind process: you cannot easily see what you are doing or gauge the results of brushing. Quaternions have been used in the design of a system that tracks the position of a toothbrush in the mouth relative to the user’s teeth. It automatically compensates for movements of the head during brushing.

Finally, the thirteenth annual Maths Week Ireland runs from 13 to 21 October. Yes, this is nine days, not the seven in a typical week. But then, mathematicians are notoriously poor at arithmetic.

1 Response to “The Many Modern Uses of Quaternions”

  1. 1 Some More Mathematics I’ve Been Reading, 6 October 2018 – nebusresearch Trackback on October 6, 2018 at 19:01
Comments are currently closed.

Last 50 Posts