logo

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

3D Rotation Transformation Matrix: Roll, Pitch, Yaw

Definition 1

In a 3-dimensional space R3\mathbb{R}^{3}, a matrix RxR_{x}, RyR_{y}, RzR_{z} that rotates a vector around the xx axis, yy axis, and zz axis in a counterclockwise direction by θ\theta is as follows. Rx=[1000cosθsinθ0sinθcosθ]Ry=[cosθ0sinθ010sinθ0cosθ]Rz=[cosθsinθ0sinθcosθ0001] \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, RxR_{x} is called Roll, RyR_{y} is called Pitch, and RzR_{z} is called Yaw.

Properties

Orthogonality

  • [1]: The 3-dimensional rotation transformation matrix RR is an orthogonal matrix. In other words, the following holds. R1=RT 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 R1R_{1} and R2R_{2}, it could be that R1R2R2R1R_{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 R3×3\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 RxR_{x} and Yaw RzR_{z} seem to fill in 2-dimensional rotational transformations leaving only the corresponding axis, Pitch RyR_{y} has the opposite sign in sin\sin.

Proof

[1]

It is geometrically trivial. If the rotational transformation matrix RR rotates around an axis by θ\theta, then R1R^{-1} is a matrix that rotates in the opposite direction by θ-\theta, and since sin(θ)=sinθ\sin \left( - \theta \right) = - \sin \theta, all three types of rotation transformation matrices satisfy R1=RTR^{-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 Ry(π/2)R_{y} \left( \pi / 2 \right) and Rz(π/2)R_{z} \left( \pi / 2 \right), it is as follows. Ry(π2)Rz(π2)=[001010100][010100001]=[001100010][010001100]=[010100001][001010100]=Rz(π2)Ry(π2) \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 ↩︎