Quaternions

published 2026-Feb-27 16:44:29
last edited on 2026-Feb-27 18:21:23

You learn about vectors in your first semester of college-level physics and for that reason I struggke imagine physics without them. And yet, the modern concept of a vector was formalized in the late 1800s (Vector Analysis by E.B. Wilson was published in 1901, but it was a summary of lecture notes provided by Josiah Williard Gibbs many years prior). Newton published his Philosophiæ Naturalis Principia Mathematica in 1687, meaning modern physics as we know it was done without vectors for over two hundred years!

I have not fully understood what physics looked like before vectors, but I have been learning about one of the ancestors of vectors: quaternions. Quaternions were introduced by William Rowan Hamilton in 1843 and gained rapid adoption by physicists after Maxwell used them to formulate the fundamental equations of electromagnetism. The prevalance of quaternions was short-lived as Oliver Heaviside and Josiah Williard Gibbs, taking inspiration from Hermann Grassmann’s Die lineale Ausdehnungslehre (the precursor of modern linear algebra), developed vector calculus. So we can say that quaternions were commonplace in physics for about 50 years.

A quaternion is an extenion of complex numbers. We can think of a complex number as a number in two parts, a real part and an imaginary part. We typically write complex numbers like

\[ z = x + y \boldsymbol i \]

where \(x\) is the real part and \(y\) is the imaginary part. For this reason we can think of complex numbers as “two-dimensional numbers” since we can visualize the real and imaginary parts of a complex number as \(x\) and \(y\) coordinates on a two-dimensional plane.

Complex numbers can be multiplied together and the real and imaginary parts obey the typical commutative and associated rules of algebra. So if we have two imaginary numbers \(z_{1} = x + y \boldsymbol i\) and \(z_{2} = a + b \boldsymbol i\), we can multiply them to get

\[ \begin{aligned} z_{1} \cdot z_{2} &= (x + y \boldsymbol i) \cdot (a + b \boldsymbol i) \\ &= xa + (xb + ay)\boldsymbol i + yb\boldsymbol i \cdot \boldsymbol i \end{aligned} \]

And now we introduce the final feature of complex numbers: \(\boldsymbol i \cdot \boldsymbol i\) is defined to be \(-1\). Hence,

\[ z_{1} \cdot z_{2} = (xa - yb) + (xb + ay) \boldsymbol i \]

And so the multiplication of two complex number always yields another complex number. Complex numbers are a rich number system with many interesting properties. For example, any two complex numbers \(z_{1}\) and \(z_{2}\) can be divided into another complex number with real part \(e\) and imaginary part \(f\):

\[ \begin{aligned} \frac{z_{1}}{z_{2}} &= \frac{(x + y \boldsymbol i)}{(a + b \boldsymbol i)} \\ &= \frac{(x + y \boldsymbol i) \cdot (a - b \boldsymbol i)} {(a + bi) \cdot (a - b \boldsymbol i)} \\ &= \frac{(xa + yb) + (ay - xb) \boldsymbol i} {a^{2} + b^{2}} \\ &= \left( \frac{xa + yb}{a^{2} + b^{2}} \right) + \left( \frac{ay - xb}{a^{2} + b^{2}} \right) \boldsymbol i \\ &= e + f \boldsymbol i. \end{aligned} \]

In modern mathematical language that I do not fully understand, complex numbers are said to be both a division algebra and an associative algebra. It is reasonable to wonder if we could create a three-dimensional number similar to complex numbers since the real world is three-dimensional. That is, create a new “super-complex number” \(s\) made of one real part and two imaginary parts. We could represent \(s\) like

\[ s = a + b \boldsymbol i + c \boldsymbol j \]

For multiplication of super-complex numbers to result in other super-complex numbers we would have to introduce rules for the multiplication of \(\boldsymbol i\) and \(\boldsymbol j\) with each other. Can we do this in a way such that super-complex numbers are, like complex numbers, both a division and associative algebra?

This was the question the mathematics community in the 1800s tried to answer asking, but their efforts yielded no fruit. In fact, we learned much later that it is impossible to create “super-complex” numbers that is both a division algebra and associative algebra.

Instead, the right answer was to explore a number in four parts, not three, called a quaternion. Instead of using the terminology “real” and “imaginary”, a quaternion \(q\) is said to be a number with one “scalar” part \(a\) and three “vector parts” \(b\), \(c\), and \(d\) like so:

\[ q = a + b \boldsymbol i + c \boldsymbol j + d \boldsymbol k \]

With quaternions, we can think of the vector part as representing three dimensions and the scalar part as an auxiliary piece of the number which gives it desirable algebraic qualities.

In order for multiplication to be defined we need all of the products between \(\boldsymbol i\), \(\boldsymbol j\), and \(\boldsymbol k\) to be defined. These rules are

\[ \begin{aligned} \boldsymbol i^{2} = \boldsymbol j^{2} = \boldsymbol k^{2} &= -1 \\ \boldsymbol i \cdot \boldsymbol j = \boldsymbol k, \;\;\; \boldsymbol j \cdot \boldsymbol k = \boldsymbol i, \;\;\; \boldsymbol k \cdot \boldsymbol i &= \boldsymbol j, \\ \boldsymbol j \cdot \boldsymbol i = - \boldsymbol k, \;\;\; \boldsymbol k \cdot \boldsymbol j = - \boldsymbol i, \;\;\; \boldsymbol i \cdot \boldsymbol k &= - \boldsymbol j . \end{aligned} \]

A common mnemonic for remembering these rules is to draw the three letters \(\boldsymbol i\), \(\boldsymbol j\), and \(\boldsymbol k\) in a circle:

Credit goes to Math Insight for this diagram.

If perform the multiplication \(\boldsymbol i \cdot \boldsymbol j\) we travel the circle from \(\boldsymbol i\) to \(\boldsymbol j\) which leads us to \(\boldsymbol k\). If we travel the circle clockwise then the result is positive, and if we travelled counterclockwise then the result is negative.

I will state without proof that multiplication and division of quaternions is possible with these rules, and that quaternions are a division algebra and an associative algebra.

Hamilton, one of the discoverers of quaternions, (Wikipedia claims that Gauss had unpublished work about quaternions in 1819) believed that quaternions would allow physicists to represent points in three dimensions in a tractable way. The best justification for this claim comes from the multiplication of two quaternions without any scalar parts. Let \(q_{1} = a \boldsymbol i + b \boldsymbol j + c \boldsymbol k\) and \(q_{2} = d \boldsymbol i + e \boldsymbol j + f \boldsymbol k\). Then we have that

\[ \begin{aligned} q_{1} \cdot q_{2} = &\;(a \boldsymbol i + b \boldsymbol j + c \boldsymbol k) \cdot (d \boldsymbol i + e \boldsymbol j + f \boldsymbol k) \\ = &\;ad \boldsymbol i^2 + ae \boldsymbol i \cdot \boldsymbol j + af \boldsymbol i \cdot \boldsymbol k \\ &\;bd \boldsymbol j \cdot \boldsymbol i + be \boldsymbol j^2 + bf \boldsymbol j \cdot \boldsymbol k + \\ &\;cd \boldsymbol k \cdot \boldsymbol i + ce \boldsymbol k \cdot \boldsymbol j + cf \boldsymbol k^2 \\ = &\;- ad + ae \boldsymbol k - af \boldsymbol j \\ &\;- bd \boldsymbol k - be \boldsymbol + bf \boldsymbol i \\ &\;+ cd \boldsymbol j - ce \boldsymbol i - cf \\ = &\;-(ad + be + cf) + (bf - ce)\boldsymbol i + (cd - af)\boldsymbol j + (ae - bd)\boldsymbol k. \end{aligned} \]

In modern vector notation letting \(\boldsymbol u = a \hat{i} + b \hat{j} + c \hat{k}\) and \(\boldsymbol v = d \hat{i} + e \hat{j} + f \hat{k}\), we can write this as

\[ q_{1} \cdot q_{2} = - \boldsymbol u \cdot \boldsymbol v + \boldsymbol u \times \boldsymbol v. \]

In fact, it was this very computation that inspired physicists to develop vector analysis since the scalar and vector parts of this computation were useful in applications to electromagnetism.