1
$\begingroup$

Consider the rotation matrices around e.g. the $z$-axis and the $y$-axis

$$ R_z(\phi) = \left[ \begin{matrix} \cos \phi & - \sin \phi & 0 \\ \sin \phi & \cos \phi & 0 \\ 0 & 0 &1 \end{matrix} \right] \quad , \qquad R_y(\phi) = \left[ \begin{matrix} \cos \phi & 0 & \sin \phi \\ 0 & 1 & 0 \\ -\sin \phi & 0 & \cos \phi \end{matrix} \right] $$

Deriving those matrices is no problem. However, for the sake of comprehension, I tried to obtain them differently. Let $v$ be the vector that I want to rotate. My thinking is, that if I

  1. switch $z$ and $y$ components,
  2. then rotate about the $z$-axis
  3. and switch components back again,

I should get the same result as if I had rotated around the $y$-axis. But if I calculate this, I get something different.

$$ R_y(\phi) \overset{!}{=} \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{matrix} \right] \cdot R_z(\phi) \cdot \left[ \begin{matrix} 1 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{matrix} \right] $$

$$\Longrightarrow \quad R_y(\phi) \overset{?}{=} \left[ \begin{matrix} \cos \phi & 0 & \color{red}{-}\sin \phi \\ 0 & 1 & 0 \\ \color{red}{+} \sin \phi & 0 & \cos \phi \end{matrix} \right]$$

$\endgroup$

1 Answer 1

2
$\begingroup$

The issue is that you did an unusual coordinate transform when you did switch the $z$ and $y$ components. I assume that you want to preserve rotations, so the determinant should be $1$. To achieve this, here are several options (choose only one):

  • switch $x$ to $-x$. You will then get a right hand coordinate system.
  • swap $z$ and $-y$.
  • when you switch to a left handed coordinate system, you rotate in the opposite direction.
$\endgroup$
1
  • 1
    $\begingroup$ Ahh, you are correct, I did not consider right-handedness. Thank you for your answer! $\endgroup$
    – Octavius
    Apr 19 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .