Skip to main content

3D rotation matrices (clockwise)

Short answer

Clockwise rotation matrices use −θ. x-axis: |1 0 0 0; 0 cosθ sinθ 0; 0 −sinθ cosθ 0; 0 0 0 1|; y-axis: |cosθ 0 −sinθ 0; 0 1 0 0; sinθ 0 cosθ 0; 0 0 0 1|; z-axis: |cosθ sinθ 0 0; −sinθ cosθ 0 0; 0 0 1 0; 0 0 0 1|.

Write rotation matrix in clockwise direction with respect to x-axis, y-axis and z-axis.

Standard (anti-clockwise) rotation matrices use positive θ. For clockwise rotation replace θ by −θ, using cos(−θ) = cosθ and sin(−θ) = −sinθ.

About the x-axis (clockwise)

Rx(−θ) = | 1  0      0     0 |
         | 0  cosθ   sinθ  0 |
         | 0 -sinθ   cosθ  0 |
         | 0  0      0     1 |

y' = y cosθ + z sinθ, z' = −y sinθ + z cosθ, x' = x

About the y-axis (clockwise)

Ry(−θ) = | cosθ  0 -sinθ  0 |
         | 0     1  0     0 |
         | sinθ  0  cosθ  0 |
         | 0     0  0     1 |

x' = x cosθ − z sinθ, z' = x sinθ + z cosθ, y' = y

About the z-axis (clockwise)

Rz(−θ) = |  cosθ  sinθ  0  0 |
         | -sinθ  cosθ  0  0 |
         |  0     0     1  0 |
         |  0     0     0  1 |

x' = x cosθ + y sinθ, y' = −x sinθ + y cosθ, z' = z

Each is the transpose (and inverse) of the matching anticlockwise matrix.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 4 questions →