Why is rotation about the y axis in $\mathbb{R^3}$ different from rotation about the x and y axis.

If you sight back along the positive $y$-axis toward the origin with the positive $z$-axis pointed upward, the positive $x$-axis points to the left. I.e., taken by itself, the $xz$-plane has a left-handed coordinate system. This means that negative angles correspond to counterclockwise rotations, which is why the third rotation matrix looks like it’s backwards.

Another way to convince yourself that the matrix is correct is to look at the effect of a counterclockwise rotation through an angle of $\pi/2$: this takes the positive $x$-axis onto the negative $z$-axis and the positive $z$-axis onto the positive $x$-axis. If you plug $\pi/2$ into the third matrix, you’ll see that its first column is $(0,0,-1)^T$ and its third column is $(1,0,0)^T$ just as required.


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


In two dimensions the notion of clockwise and counter clockwise is well defined because all observers of the plane observe it from one direction only. In three dimensions you have two equally legitimate points of view: When rotating around the $z$-axis, for example, you may choose to place an observer at $(0,0,1)$, for whom the rotation about the $z$-axis you wrote will seem as counter clockwise, or you could put an observer at the opposite point $(0,0,-1)$ for whom the same rotation will seem a clockwise rotation. In your case, the rotation for the $y$ axis looks "wrong" to you because you are observing it's effect from the point $(0,-1,0)$. To "see" it correctly, switch to the opposite point, $(0,1,0)$.