Rotation matrix
Also: direction-cosine matrix
A matrix that changes vector coordinates between rotated axes.
A proper rotation matrix is orthogonal with determinant +1, so its transpose is its inverse and it preserves lengths.
- Formula
R(θ) = [[cosθ, −sinθ], [sinθ, cosθ]]
Example Rotating [1,0] by 90° produces [0,1] up to rounding.
Common misconception A rotation matrix does not translate a point or change a vector's magnitude.