Let $P_o$ denote the position with the coordinates $(1,0,0)$ in the Descartes coordinate system $(x,y,z)$.

The point $P_o$ is rotated about the z-axis so that the line $OP$ turns directly towards the positive y-axis through an angle $\phi$. The position of the point after this rotation is denoted by $P_1$

$P_1$ is then rotated about the line in the x-y plane perpendicular to $OP_1$ so that the line $OP$ turns directly towards the positive z-axis through an angle $\lambda$, giving $P_2$. Find the coordinates of $P_2$

Initially I approached this question using the spherical coordinates: $$x=r\sin(\theta)\cos(\phi), y=r\sin(\theta)\sin(\phi), z=r\cos(\theta) \tag{1}$$ where $\theta$ is the polar angle and $\phi$ the azimuthal angle.

Setting $\theta=\frac{\pi}{2}-\lambda$ and $\phi=\phi$ gave me the correct the answer: $$P_2=(\cos(\phi)\cos(\lambda),\sin(\phi)\cos(\lambda),\sin(\lambda))\tag{2}$$

However, I then tried an alternative method by rotating the coordinate axes and an incorrect answer was obtained:

I rotated the coordinate axes $(x,y,z)$ by the angle $\phi$ anticlockwise about the z-axis. Denoting the new coordinate axes by $(\bar{x},\bar{y},\bar{z})$, we have $$\begin{align} x&=\bar{x}\cos(\phi)-\bar{y}\sin(\phi)\\ y&=\bar{x}\sin(\phi)+\bar{y}\cos(\phi)\\ z&=\bar{z}\end{align} \tag{3}$$

since $$ \left(\begin{matrix} x\\y\\z \end{matrix} \right)=\left(\begin{matrix} \cos{(\phi)}&-\sin(\phi)&0 \\ \sin(\phi)&\cos(\phi)&0\\0&0&1\end{matrix}\right) \left(\begin{matrix} \bar{x}\\ \bar{y} \\ \bar{z} \end{matrix}\right) \tag{4}$$

Now in the $(\bar{x},\bar{y},\bar{z})$ coordinate system, $P_1$ has the coordinates $(1,0,0)$.

Rotating $P_1$ through the angle $\lambda$ anticlockwise about $\bar{y}$ gives $P_2$

$$\left(\begin{matrix} \cos(\lambda)&0&\sin(\lambda)\\0&1&0\\-\sin{(\lambda)}&0&\cos(\lambda) \end{matrix}\right) \left( \begin{matrix}1\\0\\0 \end{matrix}\right)=\left(\begin{matrix}\cos(\lambda)\\0\\-\sin(\lambda) \end{matrix}\right)=\left(\begin{matrix}\bar{x}\\\bar{y}\\\bar{z}\end{matrix}\right) \tag{5}$$

Solving for $x,y$ and $z$ via $(3)$ in the original coordinate system yields


which is not the correct the answer and the problem seems to originate from the $z$ component which has an extra minus sign in front of it.

What conceptual errors are present in my working?


1 Answer 1


The angle in spherical coordinates is measured clockwise from the positive $z$ axis. Whereas the rotation angle is measured anti-clockwise about the rotation axis. So to take a vector to $\theta$ in the spherical coordinates, we must rotate clockwise about the $\bar y$ axis. This means your $\lambda$ must be negative in the second case.

enter image description here

  • $\begingroup$ Doesn't the second rotation matrix $(5)$ (i.e. the conventional rotation matrix about y R(y)) already take into account that the y-axis points into the page when looking at the Z-X plane (i.e. a clockwise rotation about y)? $\endgroup$ Feb 27, 2020 at 21:03
  • 1
    $\begingroup$ Yes. That’s what it represents. But in this case it’s rotating anti-clockwise about that reference. Or equivalently, a clockwise rotation about y sticking out of the plane. $\endgroup$ Feb 28, 2020 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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