article

A rotation matrix is a matrix which when multiplied by a vector has the effect of changing the direction of the vector but not its magnitude.

Properties


\mathcal{M}\in\mathbb{R}^{N\times N} is a rotation matrix if and only if \mathcal{M} is orthonormal.

\mathcal{M} is orthonormal if its column vectors form an orthonormal basis of \mathbb{R}^{N}, that is, the scalar product between any two column vectors is zero (orthogonality) and the scalar product of a column vector with itself is unity (normalization).

The inverse of a rotation matrix is its transpose:

\mathcal{M}\,\mathcal{M}^{-1}=\mathcal{M}\,\mathcal{M}^\top=\mathcal{I} where \mathcal{I} is the identity matrix.

Two dimensions


In two dimensions, a rotation can be defined by a single angle, \theta. Conventionally, positive angles represent anti-clockwise rotation.

The matrix to rotate a column vector in cartesian coordinates about the origin is:

M(\theta) = \begin{pmatrix} \cos{\theta} & -\sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{pmatrix}

Three dimensions


In three dimensions, a rotation can be defined by three Euler angles, (\alpha,\beta,\gamma), or by a single angle of rotation, \theta, and the direction of a vector, \hat{\mathbf{v}} = (x,y,z), about which to rotate.

The matrix to rotate a column vector in cartesian coordinates about the origin is:

M(\alpha,\beta,\gamma) = \begin{bmatrix}

\cos \alpha \cos \gamma - \sin \alpha \cos \beta \sin \gamma & - \sin \alpha \cos \gamma - \cos \alpha \cos \beta \sin \gamma & \sin \beta \sin \gamma \\ \cos \alpha \sin \gamma + \sin \alpha \cos \beta \cos \gamma & - \sin \alpha \sin \gamma + \cos \alpha \cos \beta \cos \gamma & - \sin \beta \cos \gamma \\ \sin \alpha \sin \beta & \cos \alpha \sin \beta & \cos \beta

\end{bmatrix}

or:

M(\hat{\mathbf{v}},\theta) = \begin{bmatrix}
\cos \theta + (1 - \cos \theta) x^2 & (1 - \cos \theta) x y + (\sin \theta) z & (1 - \cos \theta) x z - (\sin \theta) y \\ (1 - \cos \theta) y x - (\sin \theta) z & \cos \theta + (1 - \cos \theta) y^2 & (1 - \cos \theta) y z + (\sin \theta) x \\ (1 - \cos \theta) z x + (\sin \theta) y & (1 - \cos \theta) z y - (\sin \theta) x & \cos \theta + (1 - \cos \theta) z^2 \end{bmatrix}

Roll, Pitch and Yaw

Taking the second form of this matrix, and substituting the unit vectors \mathbf{i}, \mathbf{j} and \mathbf{k} gives the following matricies for rotation about the cartesian axes:

  • Rotation around the x-axis:

\mathcal{R}(\theta_R):= \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos{\theta_R} & \sin{\theta_R} \\ 0 & - \sin{\theta_R} & \cos{\theta_R} \end{pmatrix} where \theta_R is the roll angle.

  • Rotation around the y-axis:

\mathcal{P}(\theta_P):= \begin{pmatrix} \cos{\theta_P} & 0 & - \sin{\theta_P} \\ 0 & 1 & 0 \\ \sin{\theta_P} & 0 & \cos{\theta_P} \end{pmatrix} where \theta_P is the pitch angle.

  • Rotation about the z-axis:

\mathcal{Y}(\theta_Y):= \begin{pmatrix} \cos{\theta_Y} & \sin{\theta_Y} & 0 \\ - \sin{\theta_Y} & \cos{\theta_Y} & 0 \\ 0 & 0 & 1 \end{pmatrix} where \theta_Y is the yaw angle.

In flight dynamics, the roll, pitch and yaw angles are usually given the symbols \gamma, \beta, and \alpha, respectively, however here the symbols \theta_R, \theta_P, and \theta_Y are used to avoid confusion with the Euler angles.

Any 3-dimensional rotation matrix \mathcal{M}\in\mathbb{R}^{3\times 3} can be characterised by the three angles \theta_R, \theta_P, and \theta_Y, and

\mathcal{M} is rotation matrix in

\mathbb{R}^{3\times 3}\,\Leftrightarrow\,\exist\,\theta_R,\theta_P,\theta_Y\in[0\ldots\pi):\,\mathcal{M}=\mathcal{Y}(\theta_Y)\,\mathcal{P}(\theta_P)\,\mathcal{R}(\theta_R)

The set of all rotations about a given axis, together with the operation of composition, form a continuous group. The matrices discussed here then provide a representation of the group.

See also


External links


Rotational symmetry

Drehmatrix | Rotatiematrix | Матрица вращения

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Rotation matrix".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld