I'm given a statement to prove:

A rotation of π/2 around the z-axis, followed by a rotation of π/2 around the x-axis = A rotation of 2π/3 around (1,1,1)

Where z-axis is the unit vector (0,0,1) and x-axis is the unit vector (1,0,0).

I want to prove this statement using quaternions, however, I'm not getting the expected answer:

The quaternion I calculate for the rotation of 2π/3 around (1,1,1) yields:

$ [\frac{1}{2},(\frac{1}{2},\frac{1}{2},\frac{1}{2})] $

The quaternion I calculate for a rotation of π/2 around the z-axis followed by the rotation of π/2 around the x-axis yields:

$ [\frac{1}{2},(\frac{1}{2},-\frac{1}{2},\frac{1}{2})] $

If I calculate the rotation π/2 around z-axis, followed by the rotation of π/2 around y-axis, then I get the equivalent quaternions I'm looking for. Is this an issue with the problem statement or am I simply making an error?

Note: That I also tried to prove the same statement using rotation matrices instead of quaternions and received the same result.


I think that the claim is wrong, so it was formulated. The given rotations correspond to the quaternions: $$ \begin{split} R_{\mathbf{z},\pi/2}\rightarrow e^{\mathbf{k}\pi/4}=\cos \dfrac{\pi}{4}+\mathbf{k}\sin \dfrac{\pi}{4}=\dfrac{\sqrt{2}}{2}+\mathbf{k}\dfrac{\sqrt{2}}{2}\\ R_{\mathbf{i},\pi/2}\rightarrow e^{\mathbf{i}\pi/4}=\cos \dfrac{\pi}{4}+\mathbf{i}\sin \dfrac{\pi}{4}=\dfrac{\sqrt{2}}{2}+\mathbf{i}\dfrac{\sqrt{2}}{2} \end{split} $$ so that: $$ R_{\mathbf{i},\pi/2}R_{\mathbf{z},\pi/2} \rightarrow (\dfrac{\sqrt{2}}{2}+\mathbf{k}\dfrac{\sqrt{2}}{2})(\dfrac{\sqrt{2}}{2}+\mathbf{i}\dfrac{\sqrt{2}}{2})=\dfrac{1}{2}(1+\mathbf{i}-\mathbf{j}+\mathbf{k}) $$ If we put this quaternion in exponential form we have: $$ e^{\mathbf{i}\pi/4}e^{\mathbf{k}\pi/4}=e^{\mathbf{u}\pi/3} $$ where $\mathbf{u}=\mathbf{i}-\mathbf{j}+\mathbf{k}$, i.e. a rotation of $2\pi/3$ around an axis passing through $(1,-1,1)$, which is the same result found by @Dash and is different from a rotation of the same angle about an axis passing through $(1,1,1)$ that corresponds to the quaternion $$ R_{\mathbf{v},2\pi/3} \rightarrow e^{\mathbf{v}\pi/3} \qquad \mathbf{v}=\dfrac{\mathbf{i}+\mathbf{j}+\mathbf{k}}{\sqrt{3}} $$ And there is no way to have a fair result inverting some rotation (i.e. changing active/passive).

  • $\begingroup$ Correct. However, If you perform a rotation of pi/2 on x, then a rotation of pi/2 on z, then the result is a rotation of 2pi/3 around (1,1,1). The order was incorrect in the claim. $\endgroup$ – DashControl Dec 8 '14 at 21:58

It looks like you are mixing up active v/s passive rotations in your calculations. In other words, you need to be consistent about whether a quaternion represents an operator that rotates a vector to a new position in the same coordinate frame, or represents a rotation of the frame itself, keeping the vector fixed with respect to its original frame. The two operations are inverses of each other.

Once you resolve this, I'm sure you'll get a consistent answer.

  • $\begingroup$ Could you explain how the two operations are inverses of each other? $\endgroup$ – DashControl Dec 2 '14 at 0:59
  • $\begingroup$ This offers a pretty nice explanation. $\endgroup$ – sid Dec 2 '14 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.