Rotation Matrices
To rotate the whole plane about the origin by an angle \theta, we
only need to know where \hat{\imath} and
\hat{\jmath} go — and trigonometry tells us exactly. The vector
\hat{\imath} swings to
(\cos\theta, \sin\theta), and
\hat{\jmath} swings to
(-\sin\theta, \cos\theta). Stacking those as columns gives the
rotation matrix:
R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}.
Turn the dial
Spin the angle below. The grid rotates rigidly — distances and angles are perfectly preserved,
nothing stretches. At \theta = 90^\circ the matrix becomes
\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, the quarter-turn that
sends \hat{\imath} straight up.
Rotations that don't distort
A rotation is a rigid motion: it preserves every length and every angle, so it
never changes area — its
determinant
is exactly 1. Its columns are perpendicular unit vectors, which makes
it an orthogonal matrix, and undoing a rotation is simply rotating back:
R(\theta)^{-1} = R(-\theta). Rotations are the workhorses of computer
graphics, robotics and any place a thing needs to turn without warping.