logo

3D Rotation Transformation Matrix: Roll, Pitch, Yaw 📂Matrix Algebra

3D Rotation Transformation Matrix: Roll, Pitch, Yaw

Definition 1

In a 3-dimensional space $\mathbb{R}^{3}$, a matrix $R_{x}$, $R_{y}$, $R_{z}$ that rotates a vector around the $x$ axis, $y$ axis, and $z$ axis in a counterclockwise direction by $\theta$ is as follows. $$ \begin{align*} R_{x} =& \begin{bmatrix} 1 & 0 & 0 \\ 0 & \cos \theta & - \sin \theta \\ 0 & \sin \theta & \cos \theta \end{bmatrix} \\ R_{y} =& \begin{bmatrix} \cos \theta & 0 & \sin \theta \\ 0 & 1 & 0 \\ - \sin \theta & 0 & \cos \theta \end{bmatrix} \\ R_{z} =& \begin{bmatrix} \cos \theta & - \sin \theta & 0 \\ \sin \theta & \cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{align*} $$

Conventionally, $R_{x}$ is called Roll, $R_{y}$ is called Pitch, and $R_{z}$ is called Yaw.

Properties

Orthogonality

  • [1]: The 3-dimensional rotation transformation matrix $R$ is an orthogonal matrix. In other words, the following holds. $$ R^{-1} = R^{T} $$

Non-Commutativity

  • [2]: In the set of rotation transformation matrices, the commutative law does not apply to matrix multiplication. In other words, for two rotation transformation matrices $R_{1}$ and $R_{2}$, it could be that $R_{1} R_{2} \ne R_{2} R_{1}$.

Explanation

The introduced matrices are nothing but 3-dimensional rotational transformations, which hold significant meaning. Mathematically, they are just matrices that belong to $\mathbb{R}^{3 \times 3}$, but this world is 3-dimensional and they are the most useful in our living world. They are indispensable, particularly in the control of machines, and the non-commutativity of matrices is significantly distinguished from translational symmetry matrices in the context of engineering applications.

A point to note in the equations is that while Roll $R_{x}$ and Yaw $R_{z}$ seem to fill in 2-dimensional rotational transformations leaving only the corresponding axis, Pitch $R_{y}$ has the opposite sign in $\sin$.

Proof

[1]

It is geometrically trivial. If the rotational transformation matrix $R$ rotates around an axis by $\theta$, then $R^{-1}$ is a matrix that rotates in the opposite direction by $-\theta$, and since $\sin \left( - \theta \right) = - \sin \theta$, all three types of rotation transformation matrices satisfy $R^{-1} = R^{T}$.

[2]

It suffices to show at least one combination where changing the order of multiplication results in a different outcome. When calculating the product of $R_{y} \left( \pi / 2 \right)$ and $R_{z} \left( \pi / 2 \right)$, it is as follows. $$ \begin{align*} R_{y} \left( {{ \pi } \over { 2 }} \right) R_{z} \left( {{ \pi } \over { 2 }} \right) =& \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{bmatrix} \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} \\ =& \begin{bmatrix} 0 & 0 & 1 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \end{bmatrix} \\ \ne & \begin{bmatrix} 0 & -1 & 0 \\ 0 & 0 & 1 \\ -1 & 0 & 0 \end{bmatrix} \\ =& \begin{bmatrix} 0 & -1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end{bmatrix} \\ =& R_{z} \left( {{ \pi } \over { 2 }} \right) R_{y} \left( {{ \pi } \over { 2 }} \right) \end{align*} $$


  1. Craig. (2013). Introduction to Robotics: Pearson New International Edition PDF eBook: Mechanics and Control: p40 ↩︎