## Quaternions: 3D rotations

The discovery of the quaternion algebra inspired one of the most famous acts of mathematical vandalism in history. This algebra is defined by the equation $i^2=j^2=k^2=ijk=-1$, which Sir William Rowan Hamilton carved into the Brougham Bridge in Dublin Ireland when the moment of epiphany hit him during a walk with his wife.

This definition differs slightly from the form that would be derived from the Cayley-Dickson construction presented here by the handedness of the cross product terms. This change does not alter the underlying algebra, so the conventional sign conventions will be used.

A more significant change in notation is made, as $j$ is reserved for hyperbolic roots in this notation. Additional basis of the same type are distinguished by their basis direction, or by a unit vector, as a subscript. This gives us the following multiplication table.

$\begin{array}{cccc}1&i_x&i_y&i_z\\i_x&-1&i_z&-i_y\\i_y&-i_z&-1&i_x\\i_z&i_y&-i_x&-1\end{array}$

Alternately, a quaternion can be represented by $a+\vec{B}i$, or $a+Bi_{\vec{u}}$, where $\vec{u}$ is a unit vector in the direction of the quaternion. A unit quaterion has norm 1, requireing $a^2+B^2=1$.

Within this notation was the birth of both the dot and cross products. Eventually the idea of a vector and scalar as a unified quaternion was broken, and this product viewed as two separate operations on two distinct types of objects.

Today, quaternions are making a comeback for the naturalness, and computational efficiency, with which they represent spatial rotations in 3D. In particular, changing a vector $\vec{V}$ to a coordinate system rotated by an angle $\theta$ about an axis along the unit vector $\vec{u}$ can be represented by $qVq^*$ for:

$q=\cos\frac{\theta}{2}-\sin\frac{\theta}{2}i_{\vec{u}}$

The process of multiplying a value by an object on one side and its conjugate on the other is called conjugating. For example, here we have conjugated $V$ by $q$.

In this case, a single multiplication could implement a rotation in the normal plane, but inadvertently causes a reflection along the axis. Conjugating causes half the rotation with each part, but provides a double reflection to properly orient the axis.

Note that this also provides a double cover of the rotation space, as $q$ and $-q$ define the same rotation. This provides us our first peek at a general phenomenon of the hyper complex algebras, and into the world of spinors.

Hamilton’s definition of a quaternion as the ratio of two vectors is an elegant insight into the structure of space. It will become clear, however, that Hamilton was wrong about a quaternion being the sum of a scalar and an axial spatial vector. This introduces a new form of vector to our vocabulary, a polar vector.