3D Rotation Matrices
In 3D, an orientation is a 3 by 3 rotation matrix whose columns are the body's x, y, and z axes written in the world frame. Unlike 2D, the order you apply rotations in changes where you end up.
Drag the 3D view to look from another angle.
The basic rotations
Rotating first about x, then y, then z, all about the fixed world axes, gives \(R = R_z(\gamma)\,R_y(\beta)\,R_x(\alpha)\). The first rotation sits on the right.
What to notice
Start with 90° about x and 90° about z, then switch the order. The same two rotations put the body in a completely different pose, shown by the faint copy. Matrix multiplication does not commute in 3D, and neither do rotations.
Every rotation matrix is orthonormal: its columns have length 1 and are at right angles to each other, and its inverse is its transpose, \(R^{-1} = R^\top\). The readout shows each column as one of the body's axes.