# Complex numbers in 2D, quaternions in 4D, why nothing in 3D?

I'm just trying to understand why quaternions are necessary. If I understand right, first off please check me on this, Hamilton kept trying to find ways to multiply triplets and found something satisfactory only when he escalated to four dimensions.

So game coders and spacecraft engineers extend a vector into four dimensions, then rotate it by a conjugation that takes it out of 3-D space with the first multiplication and pulls it back with the second. (And please check me on that too).

Is there an intuitive way to understand why that's necessary? Or is it one of those things that can only be explained formally?

## 2 answers

There is a famous result about finite-dimensional real associative division algebras. You may find that interesting, but I don't think it's what you want. It is a direct answer to the question of why we "can't" multiply "triplets of numbers" if you require that multiplication to satisfy certain properties. However, this wasn't what made the quaternions "satisfactory" to Hamilton. Instead, he was interested in an "algebra" of rotations. (Though, see addendum.)

Interpreting your question instead as "Why do we need a 4D (linear) space to represent 3D rotations?" the answer comes from the fact that rotation happens in planes, and while in 2D there is only one plane, in 3D there are 3 orthogonal planes.

Let's start with 2D. Fix an orthonormal basis set, $\mathbf e_1$ and $\mathbf e_2$. Orthonormal means $\mathbf e_i \cdot \mathbf e_j = \begin{cases}1, &\text{if } i=j \\ 0, &\text{if } i\neq j\end{cases}$. We'll implicitly define a bilinear, associative, distributive * but not closed* product of vectors. It's behavior is completely defined by its action on basis vectors (and that's all we'll need). We'll have $\mathbf e_i^2 = 1$ and $\mathbf e_i \mathbf e_j = -\mathbf e_j \mathbf e_i$ where $i \neq j$. $\mathbf e_1 \mathbf e_2$ is

*not*a vector (hence this product not being closed on vectors), but is what is known as a

**bivector**and, in this case, can be identified with the (oriented) plane spanned the vectors $\mathbf e_1$ and $\mathbf e_2$. To make it a closed operation, we'd need the entire (Euclidean) geometric algebra aka Clifford algebra, and what we've just defined is the geometric product.

The interesting this about this for us is that $(\mathbf e_1 \mathbf e_2)^2 = -1$. $$\begin{aligned} (\mathbf e_1 \mathbf e_2)^2 & = \mathbf e_1 \mathbf e_2 \mathbf e_1 \mathbf e_2 \\ & = -\mathbf e_1 \mathbf e_1 \mathbf e_2 \mathbf e_2 \\ & = -\mathbf e_1^2 \mathbf e_2^2 \\ & = -1 \end{aligned}$$

$\mathbf e_1\mathbf e_2$ behaves exactly like the complex imaginary $i$. Using Euler's formula, we can write $e^{\alpha \mathbf e_1 \mathbf e_2} = \cos\alpha + \mathbf e_1 \mathbf e_2\sin\alpha$. This represents a rotation by $\alpha$ radians in the $\mathbf e_1$-$\mathbf e_2$ plane. If $\mathbf v$ is a vector, then $e^{\alpha \mathbf e_1 \mathbf e_2}\mathbf v = \mathbf v \cos\alpha + \mathbf e_1\mathbf e_2\mathbf v\sin\alpha$ is $\mathbf v$ rotated by $\alpha$ radians. Notice how the above exponential has a scalar part and a bivector part. This combination of scalar and bivector is called a **rotor** or, more generally, a **spinor** if we don't require it to have unit norm.

When we move to 3D, we have 3 basis vectors, $\mathbf e_1$, $\mathbf e_2$, and $\mathbf e_3$. This gives rise to three orthonormal bivectors representing the 3 orthogonal (oriented) planes, $\mathbf e_1 \mathbf e_2$, $\mathbf e_2 \mathbf e_3$, and $\mathbf e_1 \mathbf e_3$. The exact same Euler formula logic works for each of these planes. However, we see that applying rotors doesn't quite work using the above formula. For example, $e^{\alpha \mathbf e_1 \mathbf e_2}\mathbf v$ *will* perform a rotation as expected * if* $\mathbf v$ is in the plane spanned by $\mathbf e_1$ and $\mathbf e_2$, but if it isn't, e.g. $\mathbf v = \mathbf e_3$, then you won't even end up with a vector. The correct formula is $e^{\alpha \mathbf e_1 \mathbf e_2 / 2}\mathbf v e^{-\alpha \mathbf e_1 \mathbf e_2 / 2}$. You can verify that this reduces to the other formula when $\mathbf v$ is in the plane spanned by $\mathbf e_1$ and $\mathbf e_2$. With that adjustment, a rotation is now represented by any unit spinor, i.e. rotor, and the spinors are the 4-dimensional linear space of the 1 scalar component and the 3 bivector components. This is the even subalgebra of the 3D geometric algebra – even meaning containing the parts corresponding to even dimensional objects, i.e. 0-dimensional for scalars and 2-dimensional for bivectors – and it corresponds

*exactly*to the quaternion algebra. The significance of the even dimensional subalgebra is that the geometric product (roughly speaking) multiplies dimensions and so the even subalgebra is closed under geometric product. This is just to say that the geometric product of spinors is a spinor, and thus the geometric product of rotors is a rotor.

If we move to 4D, everything works the same except now we'll have 6 planes. However, the even subalgebra of the 4D geometric algebra has 8 components, not 7 = 1 + 6. This is because there is now a single 4-dimensional component as well corresponding to $\mathbf e_1 \mathbf e_2 \mathbf e_3 \mathbf e_4$. We find that our rotor application formula was again a bit too specialized before. The final form (which generalizes all the others) is $R\mathbf v R^{-1}$ where $R$ is our rotor or spinor, e.g. $e^{\alpha \mathbf e_1 \mathbf e_2 / 2}$. This formula means a (non-zero) spinor acts the same as the corresponding rotor produced by normalizing the spinor. One thing worth pointing out is that the 8-dimensional vector space of spinors in 4D does NOT correspond to the octonions. Multiplication in the octonions is non-associative, while the geometric product is associative by definition.

Another route to rotations is the (special) orthogonal groups. In this case, the even subalgebra of 3D geometric algebra is closely related to the Lie algebra of the (Lie) group SO(3). The bivectors $\mathbf e_i \mathbf e_j$ for $i\neq j$ are the generators of this Lie algebra for Spin(3) or isomorphically SU(2). The exponential unsurprising corresponds to the exponential map for this Lie algebra. The rotors then correspond to elements of the Lie group. The reason we get Spin(3) or SU(2) instead of SO(3) directly is due to the fact that we have have *two* rotors that correspond to the same rotation, namely $R$ and $-R$. This leads to a "double cover" of SO(3). In general, the Lie algebra of Spin(n) is generated by the bivectors of the geometric algebra on $n$-dimensions, and the Lie group is the resulting rotors. In fact, the Lie algebra of SO(n) and Spin(n) agree, the resulting Lie groups differ because they have different (global) topologies.

So, ultimately, the reason there isn't a corresponding algebra with 3 components is that there isn't a (Euclidean) space with exactly two orthogonal planes. An $n$-dimensional Euclidean space will have it's space of bivectors spanned by $n \choose 2$ bivectors, and this will give rise to an even subalgebra containing $2^{n-1}$ components.

### Addendum

At the beginning I claim that Hamilton was looking for an "algebra" of rotations. I'm pretty certain this is, at best, a rationalization/retrospective clarification of Hamilton's thoughts which were likely much muddier at the time. More precisely, Hamilton was trying to do for spherical trigonometry what complex numbers did for planar trigonometry. Quoting section 6 of Hamilton's treatise:

"It is not difficult to prove this theorem otherwise, but it may be regarded as interesting to see that the four real equations (K.) are all included so simply in the single imaginary formula (I.), and can so easily be deduced from that formula by the rules of the

multiplication of quaternions; in the same manner as the fundamental theorems of plane trigonometry, for the cosine and sine of the sum of any two arcs, are included in the well-known formula for the multiplication ofcouples, that is, expressions of the form $x + iy$, or more particularly $\cos\theta + i \sin \theta$, in which $i^2 = −1$. A new sort of algorithm, orcalculus for spherical trigonometry, would seem to be thus given or indicated." [emphasis in original]

He is certainly sensitive to having a well-behaved algebra; begging allowance for the non-commutativity of his multiplication. That said, while division of quaternions is mentioned, it's never really explicitly and clearly defined and does not seem that emphasized. Meanwhile the connections to spherical trigonometry are present throughout the entire treatise.

#### 0 comment threads

Intuition is a personal thing, but here are some thoughts that might be useful. (Rigorous justifications for most claims are absent, to keep this post from getting too long. I intend to restrict myself merely to pointing suggestively and waggling my eyebrows.)

Don't think of the quaternion trick as taking 3-D space and extending it into a fourth dimension. Instead, think of the quaternions as a pre-existing four-dimensional algebra, and consider the three-dimensional subset with no real component. $i$, $j$, and $k$ are not *quite* interchangeable; you can give them an even permutation without changing the algebra, but an odd permutation does change the algebra. Let $P$ be a linear function on the quaternions that takes $i$ to $j$, $j$ to $i$, and $1$ and $k$ to themselves. Notice that $ijk = -1$, but:

$$P(ijk) = P(i)P(j)P(k) = jik = 1 \neq P(-1)$$

This fact is also true of rotations in 3-D space: you can give $x$, $y$, and $z$ even permutations with a rotation, but not odd ones.

Even permutations are a special case; more generally, you can replace $i$, $j$, and $k$ with certain linear combinations of themselves without changing the algebra—as long as those new basis elements obey the same multiplication laws (which amount to ensuring that the elements, when interpreted as vectors, are orthogonal, unit length, and have the same relative orientation). And of course, the same holds for 3-D rotations again.

The formal fact behind this intuition building is that the automorphism group of the quaternions is isomorphic to the rotation group of 3-D space, and that's why the quaternion trick works. Rotations represented by quaternions are just automorphisms of quaternions, and automorphisms must preserve the real subset. Conjugating one quaternion by another also preserves the real component of the inner one:

$$q(a + bi + cj + dk)q^{-1} = qaq^{-1} + \ldots = aqq^{-1} + \ldots = a + \ldots$$

so it's natural to represent the action of a quaternion automorphism via a conjugation. I find this to be a more helpful framing than transforming a vector into a fourth dimension and then back into three.

In order to use this trick, you can't just take any real vector space, slap an extra dimension on it, and start doing algebra. The algebra you use needs to be a normed division algebra, and those are in very short supply! By Hurwitz's theorem, there are only four: the reals themselves, complex numbers, quaternions, and octonions. The reals can't be used to represent rotations in this way because their automorphism group is trivial. The complex numbers can be used to represent a single reflection, or ‘rotations’ of a 1-D space if you like—but who would do that instead of just keeping a two-state bit? And the octonions have an automorphism group ($G_2$) that is isomorphic to only a *subset* of the rotations of 7-D space, so they won't even do for that purpose. The quaternions really are special!

## 1 comment thread