All courses › Robotics › Rotation Matrix

Rotation Matrix

A rotation matrix turns a vector or a point about the origin without changing its length. It is orthogonal, so the inverse rotation is simply its transpose. Two rotations can be combined by matrix multiplication, but in 3D the order usually matters.

R(θ)=(cos⁡θ−sin⁡θsin⁡θcos⁡θ)R(\theta)=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}rotation matrix in the plane
R−1=RT, det⁡R=1R^{-1}=R^T,\ \det R=1rotation matrices are orthogonal

Symbols

θ\thetarotation angle°
RRrotation matrix

Example

The point (1,0)(1,0) is rotated 90°90° counterclockwise:

(cos⁡90∘,sin⁡90∘)=(0,1)(\cos90^\circ,\sin90^\circ)=(0,1).

R−1=RTR^{-1}=R^T – transposing is a cheap way to find the opposite rotation.
Practise rotations and transformations for free →

Homogeneous Transformation →

Part of Robotics: Rotations and transformations.