Rotation Matrix

A rotation matrix represents the linear transformation of rotation.


Description

A rotation matrix is defined for a specific number of dimensions. In two dimensions, a rotation matrix is:

R(θ) = \begin{bmatrix} cos(\theta) & -sin(\theta) \\ sin(\theta) & cos(\theta) \end{bmatrix}

where θ is the angle of counter-clockwise rotation. Note that a negative θ represents clockwise rotation.

As an example, a counter-clockwise rotation of 90 degrees (or π/2 radians) is represented by:

R(\frac{\pi}{2}) = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}

In three dimensions, the rotation matrix depends on the axis along which rotation is performed.

R_x(\gamma) = \begin{bmatrix} 1 & 0 & 0 \\ 0 & cos(\gamma) & -sin(\gamma) \\ 0 & sin(\gamma) & cos(\gamma) \end{bmatrix}

R_y(\beta) = \begin{bmatrix} cos(\beta) & 0 & sin(\beta) \\ 0 & 1 & 0 \\ -sin(\beta) & 0 & cos(\beta) \end{bmatrix}

R_z(\alpha) = \begin{bmatrix} cos(\alpha) & -sin(\alpha) & 0 \\ sin(\alpha) & cos(\alpha) & 0 \\ 0 & 0 & 1 \end{bmatrix}

where α, β, and γ represent yaw, pitch, and roll in the Z, Y, and X dimensions respectively. A complete rotation matrix in three dimensions can then be calculated as R = Rz(α)Ry(β)Rx(γ).

Properties

A rotation matrix is always an orthogonal matrix. It follows that RT = R-1.

The determinant of a rotation matrix is either 1 or -1.


CategoryRicottone