# Quaternions and spatial translations

From my understanding, in spatial applications (3D rendering, games and similar applications) quaternions can only be used to describe rotations/orientations and not translations (like a transformation matrix does).

This seems to be backed up by the fact that most 3D frameworks that use quaternions (OGRE3D for example), use quaternions together with vectors to describe an orientation and translation (which in other frameworks would only need a single transformation matrix).

• Did I understand it correctly?
• Why can't they describe translations together with rotations?

An argument that I am having trouble countering is: you can describe a translation as a series of rotations around multiple axes and combine those rotations in a single quaternion.

Further research showed me that double quaternions can be used to describe rotation and translation, but I am interested in "single" quaternions.

-
How would you change rotation axis in practice when implementing it? By translating. – Raskolnikov Apr 4 '12 at 10:40
@Raskolnikov I guess I forgot to account for the fact that If I don't do translations the vector around which I rotate around works as if it was placed in the origin? Right? – João Portela Apr 4 '12 at 10:55
Yes, that's what I meant. – Raskolnikov Apr 4 '12 at 11:02

In a sense, there "aren't enough" unit quaternions to describe translations. Let me try to make this more precise, if not completely rigorous.

Conventionally, we can describe rotations using the set of unit quaternions $H = \{a+bi+cj+dk: a,b,c,d\in\mathbb{R}, a^2+b^2+c^2+d^2=1\}$; each such quaternion can be written in the form $\cos(\frac\alpha 2) + \sin(\frac\alpha 2)(xi + yj + zk)$, representing a rotation by angle $\alpha$ around the axis given by $(x,y,z)$.

Just as the unit circle in $\mathbb{R}^2$ is described by the equation $a^2+b^2=1$, and the unit sphere in $\mathbb{R}^3$ is described by the equation $a^2+b^2+c^2=1$, the above description of $H$ identifies it as the unit hypersphere in $\mathbb{R}^4$. It is thus a compact space, which means that it is "small" in a certain precise sense. As a consequence of this, if you choose any sequence of unit quaternions, then it will have a convergent subsequence - that is, you can throw out enough points from that original sequence and thereby obtain a sequence which converges to a unit quaternion.

Now suppose we choose a way to describe rotations and/or translations by means of unit quaternions. This means that to each quaternion $q$ we associate a rotation or translation $f(q)$. In order to be useful for computation, this association should be a homomorphism: it should satisfy the rule $f(q_1q_2) = f(q_1)\circ f(q_2)$. This ensures that $f$ relates the multiplication of quaternions to the composition of transformations, which is what we usually mean by the quaternions "describing" a set of transformations.

This map $f$ should also be continuous: if $q_1,q_2,\ldots$ is a sequence of unit quaternions which converges to some unit quaternion $q$, then the sequence $f(q_1),f(q_2),\ldots$ should converge to $f(q)$. We impose this continuity condition to avoid strange behaviour, and because in practice just about any reasonable $f$ you can come up with will be continuous.

I claim that no matter how you choose such an $f$, it cannot produce any translation. On the contrary, suppose that we had some $q$ such that $f(q)$ is a translation. Precisely, suppose that $f(q)$ is the translation "add $v$" where $v$ is some nonzero vector in $\mathbb{R}^3$. Since $f$ is a homomorphism, it follows that $f(q^2)$ is the translation "add $v$, then add $v$ again", i.e. "add $2v$". Likewise, for any $n>0$ we have that $f(q^n)$ is the translation "add $nv$".

Consider the sequence $q,q^2,q^3,\ldots$ of unit quaternions. Since $H$ is compact, there are positive integers $n_1< n_2< n_3\cdots$ such that the sequence $q^{n_1}, q^{n_2}, q^{n_3}, \ldots$ converges to a unit quaternion $\bar q$.

Now since $f$ is continuous, it follows that the sequence "add $n_1v$", "add $n_2v$", "add $n_3v$", $\ldots$ converges to $f(\bar q)$, which is some transformation of $\mathbb{R}^3$. But this sequence can't possibly converge to anything, because the sequence of vectors $n_1v,n_2v,\ldots$ shoots off to infinity and so the corresponding sequence of translations does, too. By this contradiction, we conclude that $f(q)$ could not have been a translation.

-
Alternatively, they are "small" in the sense of dimension. The unit quaternions (the only ones that give rise to isometries or $\mathbb{R}^3$) form a 3 dimensional subset of all quaternions. The dimension of all isometries of $\mathbb{R}^3$ is 5. Two of the dimensions come from translating in the $x$ and $y$ direction, and 3 for rotating (2 to pick an axis, 1 to determine how much to spin). – Jason DeVito Apr 4 '12 at 12:57
True, but the dimension of a group doesn't constrain whether it can act by translations (of course it will constrain whether it can produce all translations). For example, the additive group $\mathbb{R}^n$ can act by translations on $\mathbb{R}^3$ for any $n>0$, by projecting onto the first coordinate to get a number $a$ and translating by $(a,0,0)$. – Brad Apr 4 '12 at 13:51
Sure, dimension can go down easily, but it cannot go up easily (and cannot go up by smooth maps). – Jason DeVito Apr 4 '12 at 14:22

Basically you don't want to mix rotations with translations, because rotations are composed by multiplying quaternions while translations are composed by adding vectors.

-

It is true that you get a translation by combining two rotations around different axes, but these axes need to be parallel.

On the other hand the group of rotations of $\Bbb R^3$ (after its identification with the $3$-dimensional space $\Bbb H_0$ of traceless quaternions) defined by $\Bbb H^\times$, the multiplicative group of quaternions, is that described by the transformations $$x\mapsto hxh^{-1}$$ where $x\in\Bbb H$ and $h\in\Bbb H^\times$. The axes of two rotations of this kind are never parallel since they always meet in $0\in\Bbb H_0$ which is fixed by any of them.

This explains why translations do not occur in this group of transformations.

-

Translations are rotations around axes in the plane at infinity. They can be described by means of unit quaternions once you define such a rotation as $[1, \epsilon \vec{t} ]$ where $\epsilon$ has the property $\epsilon^2=0$.

$\epsilon$ is an infinitesimal quantity that in combination with an axis at infinity gives a finite translation along a straight line.

You can also translate through infinity by means of the unit quaternion $[\epsilon t, \hat{t} ]$, where $t$ is the length of $\vec{t}$ and $\hat{t} = \vec{t} / t$.

-