The rotation of a body can be specified by the direction of the axis of rotation, and the angle of rotation about the axis. Does that make any rotation a vector?
Can any rotation be a vector?
412 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
I really like Emilio Novati's answer: it is concise but thorough. However, for us non-mathematicians, the terms in it may make it hard to understand. Let me elaborate. Do not consider this an answer per se, just an extended comment for non-mathematicians, who nevertheless benefit from understanding the whole picture here.
To describe a rotation, we need basically four numbers: one for the rotation angle, and three to describe a unit vector around which the rotation is done.
(Technically, we only need three numbers and one sign, because if the unit vector is $\hat{a} = (x, y, z)$, then $x^2 + y^2 + z^2 = 1$, and we can omit any one of them, for example $z$, via $z = \pm\sqrt{1 - x^2 - y^2}$. Also, the two others unit vector components are limited to range $-1$ to $+1$. So, it's somewhat less than four numbers, really.)
A single 3D rotation can be described using a single 3D vector, by multiplying the unit axis vector with the rotation angle (in say radians). However, basic vector algebra operations like vector addition and subtraction, dot product, and cross product, on such "rotation vectors" do not correspond to any geometric operations. In mathematical terms, this is expressed by noting that 3D rotations form a group, special orthogonal group in three dimensions SO(3), which cannot be described using a vector space.
If you are a programmer, then you can of course create functions that convert your "rotation vectors" to a suitable form, say unit quaternions, do the operations in those suitable forms, and finally converting the result back to the "rotation vector" form. However, the "rotation vectors" are then not really vectors, are they? No, they're not used as vectors, and are just a way to describe how you store them in memory, while all the math done is done using those unit quaternions instead. In other words, don't let yourself be confused by storage tricks: that which matters, is the rules by which the operations are actually done.
(For programmers, a good example of this is the standard IEEE-754 Binary32 (float) and Binary64 (double) floating-point formats. They approximate any finite real number $r$ (within limits of both range and precision!) using two integers, mantissa m and exponent p, via $r \approx m \times 2^p$. However, for all nonzero $r$, the most significant binary digit of $m$ is omitted, because it is one for all nonzero $r$! This gives us an extra bit of precision in the mantissa, worth almost a third of a decimal digit in precision; very useful. This does not affect the math at all, however; it is just a storage or programming quirk. Similarly, describing a rotation using a 3D vector is just a storage quirk, because the math says we cannot use basic vector algebra operations in any meaningful ways.)
Unit quaternions, also called versors, on the other hand are very, very useful in describing rotations. They have four real components, for example $$\mathbf{q} = (r, i, j, k) \tag{1}\label{BtV1}$$ with $$r^2 + i^2 + j^2 + k^2 = \left\lVert \mathbf{q} \right\rVert^2 = 1 \tag{2}\label{BtV2}$$ The "no rotation" unit quaternion is $\mathbf{q}_0 = (1, 0, 0, 0)$. It corresponds to a rotation of zero degrees, with the axis undefined; i.e. no actual rotation at all.
Unit quaternions are numerically stable, and do not have any directional bias. In a computer program, you can safely normalize your unit quaternions by dividing each component with the square root of the sum of squares of the components: $$\mathbf{q}^\prime = \frac{\mathbf{q}}{\left\lVert\mathbf{q}\right\rVert} \quad \iff \quad \left\lbrace ~ \begin{aligned} r^\prime &= \frac{r}{\sqrt{r^2 + i^2 + j^2 + k^2}} \\ i^\prime &= \frac{i}{\sqrt{r^2 + i^2 + j^2 + k^2}} \\ j^\prime &= \frac{j}{\sqrt{r^2 + i^2 + j^2 + k^2}} \\ k^\prime &= \frac{k}{\sqrt{r^2 + i^2 + j^2 + k^2}} \\ \end{aligned} \right . \tag{3}\label{BtV3}$$ Note that if the divisor is zero (or numerically so close to zero that the division cannot be performed), you can use $\mathbf{q}^\prime = \mathbf{q}_0$ as the result in such cases in a computer program.
To describe a rotation by angle $\theta$ around a unit axis vector $\hat{a}$, $\left\lVert \hat{a} \right\rVert = \sqrt{\hat{a}_x^2 + \hat{a}_y^2 + \hat{a}_z^2} = 1$, you use $$\mathbf{q} = \cos\left(\frac{\theta}{2}\right) + \sin\left(\frac{\theta}{2}\right) \hat{a} \quad \iff \quad \left\lbrace ~ \begin{aligned} r &= \cos\left(\frac{\theta}{2}\right) \\ i &= \sin\left(\frac{\theta}{2}\right) \hat{a}_x \\ j &= \sin\left(\frac{\theta}{2}\right) \hat{a}_y \\ k &= \sin\left(\frac{\theta}{2}\right) \hat{a}_z \\ \end{aligned} \right. \tag{4}\label{BtV4}$$
The fact that quaternions are generalizations of complex numbers with four components defines the basic operations we can do with them.
Negating all components of a unit quaternion does not change the rotation it describes. It does change how the rotation is done, however; the same difference as in a rotation by $\varphi$ and a rotation by $360^o - \varphi$ around the very same axis.
When interpolating between rotations, this means that if the two quaternions $r$ components have the same sign, points rotated using the interpolated quaternion draw the shorter arcs of the great circle; if they have different signs, the longer arcs of the great circle.
You can interpolate unit quaternions, with the result describing the rotation between the two unit quaternions in a logical manner, if you normalize the result (back into a unit quaternion). Let $0 \le \lambda \le 1$, with $\lambda = 0$ referring to rotation $\mathbf{q}_0$, and $\lambda = 1$ referring to rotation $\mathbf{q}_1$. The interpolated quaternion is then simply $$\mathbf{q}_i = (1 - \lambda)\mathbf{q}_0 + \lambda \mathbf{q}_1 \quad \iff \quad \left\lbrace ~ \begin{aligned} r &= (1 - \lambda) r_0 + \lambda r_1 = r_0 + \lambda (r_1 - r_0) \\ i &= (1 - \lambda) i_0 + \lambda i_1 = i_0 + \lambda (i_1 - i_0) \\ j &= (1 - \lambda) j_0 + \lambda j_1 = j_0 + \lambda (j_1 - j_0) \\ k &= (1 - \lambda) k_0 + \lambda k_1 = k_0 + \lambda (k_1 - k_0) \\ \end{aligned} \right. \tag{5a} \label{BtV5a}$$ and normalizing it yields the interpolated unit quaternion, $$\mathbf{q} = \frac{\mathbf{q}_i}{\left\lVert \mathbf{q}_i \right\rVert} \tag{5b}\label{BtV5b}$$as described in $\eqref{BtV3}$. In fact, you can filter or interpolate between multiple unit quaternions this way, and the result will be intuitively what you expect (noting the quirk about the sign of the $r$ components above).
Adding or subtracting two unit quaternions by itself does not yield a unit quaternion, but when (all components) multiplied by a scalar, and normalizing the result, the result does describe the intuitive combination of the rotations the unit quaternions represent.
Quaternion multiplication is done using Hamilton product: $$\mathbf{q} = \mathbf{q}_2 \mathbf{q}_1 \quad \iff \quad \left\lbrace ~ \begin{aligned} r &= r_2 r_1 - i_2 i_1 - j_2 j_1 - k_2 k_1 \\ i &= r_2 i_1 + i_2 r_1 + j_2 k_1 - k_2 j_1 \\ j &= r_2 j_1 - i_2 k_1 + j_2 r_1 + k_2 i_1 \\ k &= r_2 k_1 + i_2 j_1 - j_2 i_1 + k_2 r_1 \\ \end{aligned} \right . \tag{6}\label{BtV6}$$
If $\mathbf{q}_1$ and $\mathbf{q}_2$ are unit quaternions describing rotations, then $\mathbf{q} = \mathbf{q}_2 \mathbf{q}_1$ describes the combined rotation: first by $\mathbf{q}_1$, then by $\mathbf{q}_2$. (That is, the first rotation is the rightmost, the last leftmost.)
The conjugate of quaternion $\mathbf{q}$ is $\mathbf{q}^{*}$, negating the vector components: $$\mathbf{q} = (r, i, j, k) \quad \iff \mathbf{q}^{*} = (r, -i, -j, -k)$$
The inverse of quaternion $\mathbf{q}$ is $$\mathbf{q}^{-1} = \frac{\mathbf{q}^{*}}{\left\lVert \mathbf{q} \right\rVert^2}$$ This means to invert a rotation described by a unit quaternion, you just take the conjugate of said unit quaternion, i.e. negate the vector components: $$\left\lVert \mathbf{q} \right\rVert = 1, \quad \mathbf{q}^{-1} = \mathbf{q}^{*} = (r, -i, -j, -k) \tag{7}\label{BtV7}$$Since negating all the components yields an unit quaternion that describes the same rotation, unit quaternion $(-r, i, j, k)$ also describes that same inverse rotation.
While one can apply a rotation described by unit quaternion $\mathbf{q}$ to a vector $\vec{v}$ via $\vec{v}^\prime = \mathbf{q}\vec{v}\mathbf{q}^{-1}$, it almost always takes fewer basic operations (scalar multiplications, additions, and subtractions) to convert the unit quaternion to a 3D rotation matrix:$$\mathbf{q} = (r, i, j, k) \quad \iff \mathbf{R} = \left[ \begin{matrix} 1 - 2(j^2 + k^2) & 2(i j - k r) & 2(i k + j r) \\ 2(i j + k r) & 1 - 2(i^2 + k^2) & 2(j k - i r) \\ 2(i k - j r) & 2(j k + i r) & 1 - 2(i^2 + j^2) \\ \end{matrix} \right] \tag{8}\label{BtV8}$$ It is also possible to convert a pure rotation matrix back to a quaternion, but the numerically stable version has three branches, and is a bit long, so I'll omit it here.
One might ask, what value does describing the unit quaternions aka versors, when the discussion is about whether a rotation can be a vector or not?
The idea for this extended comment is to show why not, via how. Emilio Novati's answer I linked to at the beginning of this extended comment answers the question quite well, but us non-mathematicians cannot grasp its meaning; we require further elaboration to understand this intuitively.
I'm sure mathematicians see this as unnecessary waffle that deserves a downvote, but as a non-mathematician, programmer type myself, I sure wish somebody had told me the above when I was starting with descriptive geometry and 3D visualization, and had exactly the same question in my mind!
The rotations on $\mathbb R^3$ have the structure of a group and are not a vector space, so rotations cannot be vectors. This is because the combination of two rotations depends from the order (it is not commutative) so it cannot be represented as an addition operation of vectors.
As you noted we need three numbers $(v_1,v_2,v_3)$ for a vector that identifies the axis of rotation with the condition that te vector is normalized: $v_1^2+v_2^2+v_3^2=1$ and a fourth number for the angle of rotation around this axis. So we need four numbers with a condition about tree of them. These four numbers can form the objects of different mathematical structures that are possible representations of the group of rotations. Possible representations are the $3\times3$ orthogonal matrices with unit determinant or the unit quaternions, that are a generalization of the complex numbers with four components.