# What is the minimum number of rotations about axes in a plane that can describe an arbitrary rotation in 3D?

I'm trying to decompose an arbitrary rotation of a 3D sphere into a series of rotations about any axes that lie in the equatorial plane.

I know I can factor the arbitrary rotation into three rotations in the equatorial plane using Euler angle formulas. Can I factor into two rotations if I allow any choice of axis in the equatorial plane? If it exists, is this factorization unique?

## migrated from mathoverflow.netAug 2 '16 at 14:05

This question came from our site for professional mathematicians.

• There is a unique rotation mapping one unit vector into a distinct vector. Take one of the vectors of your basis, and apply this rotation. Now hopefully you can see that once one axis is coincidental, you only need another rot. in the orthogonal plane. This means at two rotations are necessary and sufficient in general. – Real Aug 2 '16 at 3:48
• what do you understand by equatorial plane (is it the xy-plane)? – Manfred Weis Aug 2 '16 at 7:22
• @ManfredWeis Yes by equatorial plane I mean the xy-plane. – Talon Chandler Aug 2 '16 at 12:28
• Talon, I thought the answer is yes and that I have a simple proof for it. But the question might not be appropriate for this site. If you ask over at Mathematics StackExchange and then let me know here (with a link) when you have posted, I'd be happy to give more details. – user43208 Aug 2 '16 at 13:49
• On second thought, let me migrate it for you... – user43208 Aug 2 '16 at 14:05

My answer is that you can.

If you know about quaternions, then you know that a rotation about a unit vector $v \in \mathbb{R}^3$ through an angle $\theta$ can be accomplished by regarding elements $w = (a, b, c) \in \mathbb{R}^3$ as purely quaternionic elements $ai + bj + ck$, and then mapping $w \mapsto uwu^{-1}$ where $u = \cos(\frac{\theta}{2})\cdot 1 + \sin(\frac{\theta}{2})v$. Such $u$ are precisely quaternions of unit norm.

Let us denote the rotation above by $R_u$ (so $R_u(w) := uwu^{-1}$). Notice that a composition of two rotations $R_u \circ R_v$ is just $R_{u v}$; this follows by associativity of quaternionic multiplication.

So we can translate your problem into the following: for any rotation $R_w \in SO(3)$ given by a nonzero quaternion $w$, show that there exist quaternions $u, v$ in the linear span of $1, i, j$ such that $u v = w$. For these $u, v$ describe rotations about vectors in the equatorial plane spanned by $i, j$.

Now this is not difficult. Let us write $u = a + bi + cj$ and $v = a' + b'i + c'j$. We compute

$$(a + bi + cj)(a' + b'i + c'j) = aa' - bb' - cc' + (ab' + a'b)i + (ac' + a'c)j + (bc' - b'c)k$$

and so given a nonzero quaternion $w = p + qi + rj + sk$, our task is to cook up parameters $a, b, c, a', b', c'$ such that

$$p = aa' - bb' - cc'$$

$$q = a b' + a'b$$

$$r = ac' + a'c$$

$$s = bc' - b'c$$

In fact, let's make our life easier and simply set $b = 0, b' = 1$. Then $a = q$, $c = -s$, and we can solve for $a', c'$ in the linear system

$$p = qa' + sc'$$ $$r = -sa' + qc'$$

provided the determinant $q^2 + s^2$ is nonzero, i.e., provided one of $q, s$ is nonzero. If both $q, s = 0$, then of course $w = p + rj$ corresponds to a rotation about the vector $j$ which is already in the equatorial plane, so there was nothing to do in this case.

Once you have solutions $u = a + bi + cj, v = a' + b'i + c'j$ to the equation $uv = w$ in your hands, the rotations $R_u, R_v$ are rotations about the vectors $bi + cj$ and $b'i + c'j$, respectively. If you want the rotation angles, then normalize $u$ and $v$ (i.e. divide by their norms $(a^2 + b^2 + c^2)^{1/2}$ and $(a')^2 + (b')^2 + (c')^2)^{1/2}$) and use the fact that $R_u = R_{\frac{u}{\|u\|}}$. You can then read off the desired angles by writing e.g. $\frac{u}{\|u\|} = \cos(\frac{\theta}{2}) + \sin(\frac{\theta}{2})\frac{bi + cj}{(b^2 + c^2)^{1/2}}$, so for instance $\cos(\frac{\theta}{2}) = \frac{a}{(a^2 + b^2 + c^2)^{1/2}}$.

By the way, this solution also shows that the decomposition is in general non-unique. For example, we could have also chosen $c = 0, c' = 1$ and arrive at quaternionic solutions.

• Do we need to constrain $u$, $v$, and $w$ to be unit quaternions so they represent rotations? If this is the case, then we have 7 equations with 6 unknowns which might have a unique solution. – Talon Chandler Aug 2 '16 at 18:10
• No, you don't need to, but you can assume they are unit quaternions if you like because $R_u = R_{\frac{u}{\|u\|}}$ for any nonzero quaternion $u$. If $w$ is constrained to the unit sphere in the quaternions (3-dimensional $S^3$) and $u, v$ are each constrained to the unit sphere in the span of $\{1, i, j\}$ (so $(u, v)$ parametrizes a space that looks like $S^2 \times S^2$, which is 4-dimensional), then we are asking about surjectivity of a multiplication map $S^2 \times S^2 \to S^3$, so 3 equations in 4 variables by my count. – user43208 Aug 2 '16 at 18:24
• Okay that makes sense. What if we consider only infinitesimal rotations? Can we uniquely decompose an arbitrary rotation into infinitesimal rotations in the plane spanned by $i,j$? In this case we can make the approximations: $$\cos\left(\frac{\theta}{2}\right) \approx 1$$ $$\sin\left(\frac{\theta}{2}\right) \approx \frac{\theta}{2}$$ So $p=a=a'=1$ and we have four equations with three unknowns which gives a unique solution---i.e. an infinitesimal rotation about an arbitrary axis can be decomposed uniquely into two infinitesimal rotations about axes in the span of $i,j$. – Talon Chandler Aug 2 '16 at 19:28
• Well, the answer to the third sentence in your last comment would be 'no'. But why is getting uniqueness important to you? I think in fact the method I gave you gives virtual uniqueness of a solution if you constrain the first rotation $R_u$ to rotate about $j$. That is: unit quaternions $u$ of the form $a + bj$ form a circle $S^1$, and the unit $v$ for rotations about a second axis in the $ij$-plane form a sphere $S^2$, and the multiplication map $S^1 \times S^2 \to S^3: (u, v) \mapsto w = uv$ is onto, and unless $w$ itself is a rotation about $j$, only one pair $(u, v)$ satisfies $w = uv$. – user43208 Aug 2 '16 at 20:35
• I'm interested in uniqueness because I'm working on a reconstruction problem. I have measurements that correspond to a known rotation about an arbitrary axis, and I want to reconstruct the set of rotations in the $ij$-plane that gave rise to the "total" rotation. I'm hoping to find the conditions under which this reconstruction is possible. Can you expand on why we can't decompose an arbitrary infinitesimal rotation into two unique infinitesimal rotations in the $ij$-plane? – Talon Chandler Aug 2 '16 at 21:03

The answer is no, because when letting $v$ be an arbitrary direction about which to rotate by an angle $\rho$, that rotation can only then be realized with a rotation around an axis in the xy-plane if $v^Tz=0$; that shows that at least three rotations are necessary

1. rotate about $v\times z$ to bring $v$ into the $xy$-plane
2. rotate about the image of $v$ in the $xy$-plane
3. rotate the image of $v$ back around $v\times z$ to bring the image back to the original direction of $v$
• I agree that this set of rotations in the xy-plane can describe an arbitrary rotation, but how can we be sure there isn't a shortcut with just two rotations? – Talon Chandler Aug 2 '16 at 12:32