The unit quaternions and three-dimensional rotations
(Disclaimer: This series assumes some familiarity with linear algebra and Lie groups.)
In the previous part of this series, we introduced quaternions as a natural extension of the real numbers. Now, we’ll present them explicitly and examine them more closely. Quaternions are the algebra spanned by four linearly independent numbers: $1,i,j,k$, subject to the relations
\[i^{2} = j^{2} = k^{2} = ijk = -1\,.\]These rules, combined with the distributive and associative properties, uniquely determine the multiplication of any two quaternions.
In analogy with complex numbers, we define the real and imaginary quaternions as follows:
\[\operatorname{Re}(\mathbb{H}) = \lbrace a1 \in \mathbb{H}\colon a \in \mathbb{R} \rbrace\,,\] \[\operatorname{Im}(\mathbb{H}) = \lbrace ai + bj + ck \in \mathbb{H}\colon a,b,c \in \mathbb{R} \rbrace\,.\]For any quaternion $w = a+bi+cj+dk$ with $a,b,c,d \in \mathbb{R}$, the conjugate is defined as
\[\overline{w} = a-bi-cj-dk\,.\]The quaternion norm can be expressed as
\[\|w\|^2 = w \overline{w} = a^2 + b^2 + c^2 + d^2 \,.\]Therefore, as a smooth manifold, the unit sphere within the quaternions
Let’s now derive the Lie algebra of $\mathrm{Spin}(3)$. The tangent space to $\mathrm{Spin}(3)$ at $1$, $T_1 (\mathrm{Spin}(3))$, is naturally identified with the pure imaginary quaternions.
\begin{equation} \label{commutation-relations} [i,j]=2k\,, \quad [j,k]=2i\,, \quad [k,i]=2j\,, \end{equation}
and the commutator is a Lie bracket.
Remarkably, from equation \eqref{commutation-relations} it’s immediately apparent that $\mathfrak{spin}(3)$ is isomorphic to $\mathfrak{su}(2)$, arguably the most conspicuous Lie algebra. The corresponding identifications are
\[i \mapsto -i\sigma_1\,, \quad j \mapsto -i\sigma_2\,, \quad k \mapsto -i\sigma_3\,,\]where $\sigma_i$ are the Pauli matrices. Therefore, since $\mathrm{Spin}(3)$ and $\mathrm{SU}(2)$ are both simply connected Lie groups,
An important implication of this isomorphism is that $\mathrm{Spin}(3)$, like $\mathrm{SU}(2)$, is a double cover of $\mathrm{SO}(3)$, the group of three-dimensional rotations. This is the defining property of the spin groups. In general, the group $\mathrm{Spin}(n)$ is a double cover of $\mathrm{SO}(n)$.
This remarkable property makes quaternions useful to compute three-dimensional rotations of vectors, because multiplication of numbers is much easier to handle computationally than composition of matrices. This is critical in computer graphics, computer vision, robotics, and many other applied fields, where three-dimensional rotations are intensively performed.
Let’s examine how this works in practice. A unit quaternion can be expressed as:
\[q = \cos(\theta/2) + \sin(\theta/2) (u_x i + u_y j + u_z)\,,\]which represents a rotation by an angle $\theta$ around the unit vector $ \mathbf{u} = (u_x,u_y,u_z) \in \mathbb{R}^3$. Indeed, if we represent a vector $ \mathbf{v} = (v_x, v_y, v_z) \in \mathbb{R}^3$ as a pure imaginary quaternion $v_x i + v_y j + v_z k$, the rotation of $\mathbf{v}$ by an angle $\theta$ around $\mathbf{u}$ is calculated as
\[v' = q v \overline{q}\,,\]where $q$ is the unit quaternion given above. This is a compact way to encode rotations, requiring only four numbers, as opposed to the nine needed by rotation matrices. Notice that $q$ and $-q$ represent the same rotation, reflecting the fact that the covering of $\mathrm{SO}(3)$ by $\mathrm{Spin}(3)$ is double.
Unlike Euler angles, which have singularities and are susceptible to gimbal lock when rotation axes align, quaternions don’t have singularities and solve the gimbal lock problem.
Furthermore, practical applications often require interpolating between rotations, for instance, to animate transitions, for aircraft navigation, and more. Quaternions make this easy through the slerp technique (spherical linear interpolation). Given two unit quaternions, $q_1$ and $q_2$, the shortest path between them on the unit quaternion sphere is easily parameterized as
\[q(t) = \frac{\sin((1-t)\theta)}{\sin(\theta)} q_1 + \frac{\sin(t\theta)}{\sin(\theta)} q_2\,,\]with $\theta$ being the angle between $q_1$ and $q_2$. This path is an arc of great circle
In the next part, we’ll introduce the compact symplectic groups, the quaternionic analogues to the unitary and orthogonal groups, and we’ll discuss the fundamental role they have in the classification of simple Lie groups.