[Math] Rotation Equivalence using Quaternions

quaternionsrotations

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.

Best Answer

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).