1. The quaternions
The quaternions $ {\mathbb{H}}$ (H for its discoverer, William Hamilton),
in Nathan Reed's own word, is like "complex numbers having eaten
a super mushroom''. Formally, it is an associative division algebra
over $ {\mathbb{R}}$, with the following relation on the four basis
vectors
$ \displaystyle
i^{2}=j^{2}=k^{2}=ijk=-1.
$
Observe that the quaternionic multiplication is not commutative. We
also see that a copy of complex numbers sits inside of it. The $ {i,j,k}$
part of a quaternion is called the imaginary part, and the space of
imaginary part is denoted $ {\text{Im}\mathbb{H}}$. The conjugate $ {\bar{q}}$
of a quaternion $ {q}$ has the negative of the imaginary part. The modulus
$ {|q|}$ of a quaternion $ {q}$ is equal to $ {\sqrt{\bar{q}q}}$.It has been a long time since computer graphics people using quaternions, because of their close relation with the 3D rotations. Multiplying by a unit quaternion, either on the left or on the right, is a simultaneous rotation of two independent planes (2D subspaces), by the same angle. The difference of left and right multiplicatoin by the same quaternion is that one of the planes rotates in the opposite direction:
$ \displaystyle \begin{array}{rcl}
(i)(w+ix+jy+kz) & = & -x+iw-jz+ky,\\
(w+ix+jy+kz)(i) & = & -x+iw+jz-ky.
\end{array} $
Using this fact and the associativity, we can check the conjugation
by quaternions results in a rotation that happens only for one plane:
$ \displaystyle
(i)(w+ix+jy+kz)(i^{-1})=(i)(w+ix+jy+kz)(-i)=w+ix-jy-kz,
$
here $ {wx}$ rotation is canceled out and the $ {yz}$ rotation is done
twice. In general,
Proposition 1 Conjugation by quaternions leave the imaginary subspace $ {\text{Im}\mathbb{H}\cong\mathbb{R}^{3}}$ invariant.Proof: It is enough to see that if $ {c\in\mathbb{R}}$, $ {qc\bar{q}=c|q|^{2}}$ for all $ {q\in\mathbb{H}}$. $ \Box$
This should be a first hint why quaternions are so intimatly related to 3D rotations, and in order to get , say a $ {\theta}$-angled 3D rotaton that fixes some plane, a$ {\theta}$-angled quaternion has to be applied twice (i.e. conjugation). We turn to these points next.