In a previous article, we showed how one can arrive at quaternions. They are exceptional at handling rotations in three-dimensional Euclidean space, providing an efficient and elegant representation free of mapping singularities. However, they're not very useful when it comes to handling other affine transformations, most notably translation and scaling. Scaling can be forgiven, but translation is crucial to enabling rigid transformations and applications in many fields from robotics to computer animation.
Concerning notation
We follow the convention established previously. Lowercase letters are used to denote all quaternions $q$ except for pure quaternions $\mathbf{p}$ (no scalar component) which are marked with an upright bold letter. Unit quaternions $\hat{q}$ are marked with a hat. Given that we'll be extending quaternions in this article, further notation will be exposed as we progress.
Bootstrapping translations
We already showed that the only way to procure a "proper" rotation with quaternions (the conical transformation you're used to from linear algebra) is to compute $\mathbf{p}' = r\mathbf{p}r^*$. Thus, it is reasonable to assume that our translation transformation should assume the same format in the interest of composition with rotations. In other words, we expect $\mathbf{p}' = t\mathbf{p}t^*$. We can also assume a double translation should occur just like with rotations. However, regular quaternion multiplication is unable to perform such a feat without augmentation facilitated by changing/adding rules.
Let us focus on the $t\mathbf{p}$ part of the transform. We represent the position as a pure quaternion (zero scalar component) and assume it makes some sense to have the translation quaternion be one as well, at least for now. We need to augment quaternion multiplication in some manner to enable the translation transformation. To see what we're working with, let's lay it out:
$$ tp = \mathbf{t}\mathbf{p} =(t_xi + t_yj + t_zk)(p_xi + p_yj + p_zk) = \mathbf{t}\times\mathbf{p} - \mathbf{t}\cdot\mathbf{p}$$
Obviously, this is far from the desired outcome. One way we can try to move in the right direction is to add a real scalar component to both quaternions, of value $1$:
$$ tp = [1 + \mathbf{t}][1 + \mathbf{p}] = 1 + (\mathbf{p} + \mathbf{t}) + \mathbf{p}\mathbf{t}$$
We could live with a constant scalar part of $1$, but that last term is expectedly just pushing our original problem deeper. However, given that it is a product of our imaginary vector components, if we were to augment them with an indeterminate, say, $\omega$... We could then posit that $\omega^2 = 0$. You might see where I am going with this:
$$ \begin{split} tp &= [1 + \omega\mathbf{t}][1 + \omega\mathbf{p}] \\ &= 1 + \omega\mathbf{p} + \omega\mathbf{t} + \omega^2\mathbf{p}\mathbf{t} \\ &= 1 + \omega(\mathbf{p} + \mathbf{t}) \\ \end{split}$$
It certainly worked out, but we now need to figure out the implications of introducing the indeterminate $\omega$ into the mix. We do notice that our result is attached to it, reminiscent of the way the imaginary component of a complex number is attached to the indeterminate $i$. Our next goal, in the interest of eventually ensuring proper composition, is to complete the transform. Thus, we need to ensure $tpt^*$ doesn't fail us:
$$ \begin{split} tpt^* &= [1 + \omega\mathbf{t}][1 + \omega\mathbf{p}][1 - \omega\mathbf{t}] \\ &= [1 + \omega\mathbf{p} + \omega\mathbf{t}][1 - \omega\mathbf{t}] \\ &= 1 + \omega\mathbf{p} + \omega\mathbf{t} - \omega\mathbf{t} \\ &= 1 + \omega\mathbf{p} \\ \end{split}$$
Well, that fell apart quickly. It would appear that the conjugate here doesn't behave in the usual way. It might be prudent for us to come to terms that we're no longer dealing with regular quaternions. To test this theory, we will use a non-trivial case of rotations, but this time performed on our generalized position quaternion (to not break emerging compatibility with translation):
$$ \Large { r(1 + \omega\mathbf{p})r^* = (r + \omega r\mathbf{p})r^* = rr^* + \omega r\mathbf{p}r^* = 1 + \omega r\mathbf{p}r^*} $$
A few things of note are happening here. In the case of rotation, we desire to multiply $r$ with $p$, hence we don't attach $\omega$ to $r$ in order for them not to annihilate. Notice the part of the equation before we apply the conjugate, $(r + \omega r\mathbf{p})$. We appear to be dealing with two quaternions. One that is free and the other which is attached to $\omega$. This leads us to posit that the initially assumed scalar component in the position and translation quaternions was and is actually a quaternion itself, a real quaternion (no imaginary vector component). For lack of a better term right now, we'll call these $\Omega$-quaternions, generically specified as $Q = q + \omega q_{\omega}$. One other thing that we may hazard a guess towards from our experience so far is that any properly transformed quaternion is going to have a free component consisting of a real quaternion valued $1$ and the useful result encoded in the $\omega$-component.
Furthermore, since we're talking about two quaternions, we've been going about conjugation all wrong. It stands to reason that $Q^* = q^* + \omega q_{\omega}^*$. Applying this to our original translation transform attempt, we get:
$$ \begin{split} TPT^* &= [1 + \omega\mathbf{t}][1 + \omega\mathbf{p}][1^* + \omega\mathbf{t}^*] \\ &= [1 + \omega\mathbf{p} + \omega\mathbf{t}][1 + \omega(-\mathbf{t})] \\ &= 1 + \omega\mathbf{p} + \omega\mathbf{t} - \omega\mathbf{t} \\ &= 1 + \omega\mathbf{p} \\ \end{split}$$
It might seem like we're back to square one, but we just have to keep molding it to meet our goals. Notice that we can conjugate the $\Omega$-quaternion as before, then conjugate its constituent regular quaternions! This would result in the desired double translation by avoiding inversion while still ensuring rotation gets inverted (as it isn't affected by $\Omega$-quaternion conjugation). To differentiate $\Omega$-quaternion conjugation from regular conjugation, we use an overline. For example, the conjugate of $Q$ is then $\overline{Q}$ and the combined conjugate of $Q$ and its constituent quaternions $(q,q_{\omega})$ is thus $\overline{Q^*} = \overline{Q}^*$. While you're working out the simple proof for that on your own, you might also want to prove that $\overline{(Q_1Q_2)^*} = \overline{Q_2^*}\space\overline{Q_1^*}$. Incorporating these changes, we get:
$$ \begin{split} TP\overline{T^*} &= [1 + \omega\mathbf{t}][1 + \omega\mathbf{p}][1^* - \omega\mathbf{t}^*] \\ &= [1 + \omega\mathbf{p} + \omega\mathbf{t}][1 - \omega(-\mathbf{t})] \\ &= 1 + \omega(\mathbf{p} + 2\mathbf{t}) \end{split}$$
We're almost ready to combine a rotation and a translation into a rigid transformation, and compute its conjugate. However, to verify the properties of rigid transformations, we will have to generalize the notion of the quaternion norm, usually computed a as $||q|| = \sqrt{qq^*}$. So, we compute:
$$ \begin{split} (q_0 + \omega q_{\omega})(q_0 + \omega q_{\omega})^* &= (q_0 + \omega q_{\omega})(q_0^* + \omega q_{\omega}^*) \\ &= q_0q_0^* - \omega q_0 q_{\omega}^* + \omega q_{\omega} q_0^* \\ &= ||q_0||^2 + \omega(q_{\omega} q_0^* + q_0 q_{\omega}^*) \\ &= ||q_0||^2 + \omega2\langle q_0, q_{\omega}\rangle \\ \end{split}$$
At this point, we need to take a squared root while being considerate of $\omega$. To this end, we rephrase the problem generically: $(a + \omega b)^2 = a^2 + \omega 2ab = c + \omega d$. From this, it follows trivially that $a = \sqrt{c}$ and $b = d / \sqrt{4c}$. Notice that when the constituent quaternions are real, this looks a lot like something that is kin to complex numbers. We'll cover this in the next section. Armed with these new relations, we conclude:
$$ ||Q|| = \sqrt{QQ^*} = ||q|| + \omega\frac{\langle q, q_{\omega}\rangle}{||q||} $$
We now know that the only way to have a unit $\Omega$-quaternion is for the inner product of its constituent quaternions to resolve to $0$. Vanilla rotation is encoded with unit quaternions and has a zero quaternion in the omega component when extended to $\Omega$-quaternions as it performs rotation directly through vanilla multiplication. Thus, the inner product is $0$ and it remains unit here as well. On the other hand, $\Omega$-quaternions encoding translation are composed of a real and pure quaternion which results in their inner product being $0$ as well, making the $\Omega$-quaternion unit if and only if the real quaternion is valued $1$. A fundamental property of normed division algebras is $||qp|| = ||q||||p||$ and this extends to $\Omega$-quaternion, allowing us to surmise the composition of rotation and translation will be a unit $\Omega$-quaternion. We now compute the composition $TR$:
$$\Large{TR = [1 + \omega\mathbf{t}][\hat{r} + \omega 0] = \hat{r} + \omega\mathbf{t}\hat{r}}$$
Its conjugate $(TR)^* = R^*T^*$ is given by $\hat{r}^* - \omega\hat{r}^*\mathbf{t}$ which allows us to compute the norm and confirm that it is indeed unit:
$$\Large{ \begin{split} ||TR||^2 &= [\hat{r} + \omega\mathbf{t}\hat{r}][\hat{r}^* - \omega\hat{r}^*\mathbf{t}] \\ &= \hat{r}\hat{r}^* - \omega\hat{r}\hat{r}^*\mathbf{t} + \omega\mathbf{t}\hat{r}\hat{r}^* \\ &= 1 - \omega\mathbf{t} + \omega\mathbf{t} = 1 \\ \end{split}}$$
Finally, we work out a rigid transformation $(TR)P\overline{(TR)^*}$ of a point $P$ and show mathematically that the point is indeed double rotated then double translated into its transformed position:
$$\Large{\begin{split} (TR)P\overline{(TR)^*} &= [\hat{r} + \omega\mathbf{t}\hat{r}][1 + \omega\mathbf{p}][\hat{r}^* + \omega\hat{r}^*\mathbf{t}] \\ &= [\hat{r} + \omega\hat{r}\mathbf{p} + \omega\mathbf{t}\hat{r}][\hat{r}^* + \omega\hat{r}^*\mathbf{t}] \\ &= [\hat{r} + \omega(\hat{r}\mathbf{p} + \mathbf{t}\hat{r})][\hat{r}^* + \omega\hat{r}^*\mathbf{t}] \\ &= \hat{r}\hat{r}^* + \omega\hat{r}\hat{r}^*\mathbf{t} + \omega(\hat{r}\mathbf{p}\hat{r}^* + \mathbf{t}\hat{r}\hat{r}^*) \\ &= 1 + \omega\mathbf{t} + \omega(\hat{r}\mathbf{p}\hat{r}^* + \mathbf{t}) \\ &= 1 + \omega(\hat{r}\mathbf{p}\hat{r}^* + 2\mathbf{t}) \\ \end{split}}$$
And there you have it! A rotation followed by a translation, stored in the omega component of our $\Omega$-quaternion. Historically, this result was first recorded in a journal by one Wiliam Kingdon Clifford in 1873. He based his work on Hamilton's quaternions, meaning he also adopted a lot of his preconceptions, including the iffy notion of dividing vectors which was discarded in modern mathematics, but is pervasive in the paper. He originally named the indeterminate $\omega$ which we've used in our derivation here as a nod to him. In his self-proclaimed "preliminary sketch", Clifford named his precursor "biquaternions". This work would later be picked up by Eduard Study who moved them in the direction of what would eventually become known as a dual quaternions. Our $\Omega$-quaternions are dual quaternions. Like us, Study was interested in applying this construct for rigid transformations. In modern times $\epsilon$ has superseded $\omega$ as the indeterminate element. In the next article, we will extract the notion of dual numbers from our "organically derived" dual quaternions... Which will allow us to consider some interesting properties dual numbers have over their "singular" counterparts.