Linear Algebra – Why is Rotation About the y Axis in $\mathbb{R^3}$ Different from Rotation About the x and y Axis?

linear algebra

In my textbook for a counterclockwise rotation about the x-axis we have $\begin{pmatrix}
1 & 0 & 0\\
0 & \cos\theta & -\sin\theta \\
0 & \sin\theta & \cos\theta
\end{pmatrix}$

For rotation about the z-axis we have
$\begin{pmatrix}
\cos\theta & -\sin\theta & 0 \\
\sin\theta & \cos\theta & 0 \\
0 & 0 & 1
\end{pmatrix}
$
. Now for rotation about the y-axis it's listed as $\begin{pmatrix}
\cos\theta & 0 & \sin\theta \\
0 & 1 & 0 \\
-\sin\theta & 0 & \cos\theta
\end{pmatrix} $
. I can see that they changed it to the rotational matrix for a clockwise matrix but it says right infront of these 3 matrices that they are all for counterclockwise rotations so I'm not entirely sure what's going on.

Best Answer

They are all three the same rotation direction. The thing at play here is orientations of coordinate systems.

What right rotation (if you point your right hand thumb along the axis and close your other fingers they will point to the direction of the rotation) around the X-axis does is rotate the Y axis towards the Z axis if XYZ is a right oriented coordinate system (if you take your right hand you can point the thumb in X direction, index finger in Y direction and middle finger in the Z direction).

Now similar is true for rotation about the Z axis, it rotates the X axis towards the Y axis because ZXY is also a right oriented coordinate system.

In fact reordering the axis by rotating/shifting the axes preserves the orientation so XYZ, YZX and ZXY are all positive oriented systems (but just swapping two axes makes it the opposite orientation - giving left orientation). You can also note that swapping twice gets back to the original orientation (all of XYZ, YZX and ZXY can be obtained by swapping two axes).

Now look at what happens to a matrix when you swap axes, then you swap both corresponding columns and rows. And if you do it twice you see that you actually arrive at the three possible matrixes (you can also rotate column- and row- wise if that suits your mind better).

Related Question