From Wikipedia, the free encyclopedia
General 3D rotations [ edit ]
Other 3D rotation matrices can be obtained from these three using matrix multiplication . For example, the product
R
=
R
z
(
α
)
R
y
(
β
)
R
x
(
γ
)
=
[
cos
α
−
sin
α
0
sin
α
cos
α
0
0
0
1
]
yaw
[
cos
β
0
sin
β
0
1
0
−
sin
β
0
cos
β
]
pitch
[
1
0
0
0
cos
γ
−
sin
γ
0
sin
γ
cos
γ
]
roll
=
[
cos
α
cos
β
cos
α
sin
β
sin
γ
−
sin
α
cos
γ
cos
α
sin
β
cos
γ
+
sin
α
sin
γ
sin
α
cos
β
sin
α
sin
β
sin
γ
+
cos
α
cos
γ
sin
α
sin
β
cos
γ
−
cos
α
sin
γ
−
sin
β
cos
β
sin
γ
cos
β
cos
γ
]
{\displaystyle {\begin{aligned}R=R_{z}(\alpha )\,R_{y}(\beta )\,R_{x}(\gamma )&={\overset {\text{yaw}}{\begin{bmatrix}\cos \alpha &-\sin \alpha &0\\\sin \alpha &\cos \alpha &0\\0&0&1\\\end{bmatrix}}}{\overset {\text{pitch}}{\begin{bmatrix}\cos \beta &0&\sin \beta \\0&1&0\\-\sin \beta &0&\cos \beta \\\end{bmatrix}}}{\overset {\text{roll}}{\begin{bmatrix}1&0&0\\0&\cos \gamma &-\sin \gamma \\0&\sin \gamma &\cos \gamma \\\end{bmatrix}}}\\&={\begin{bmatrix}\cos \alpha \cos \beta &\cos \alpha \sin \beta \sin \gamma -\sin \alpha \cos \gamma &\cos \alpha \sin \beta \cos \gamma +\sin \alpha \sin \gamma \\\sin \alpha \cos \beta &\sin \alpha \sin \beta \sin \gamma +\cos \alpha \cos \gamma &\sin \alpha \sin \beta \cos \gamma -\cos \alpha \sin \gamma \\-\sin \beta &\cos \beta \sin \gamma &\cos \beta \cos \gamma \\\end{bmatrix}}\end{aligned}}}
represents a rotation whose yaw, pitch, and roll angles are α , β and γ , respectively. More formally, it is an intrinsic rotation whose Tait–Bryan angles are α , β , γ , about axes z , y , x , respectively.
Similarly, the product
R
=
R
z
(
γ
)
R
y
(
β
)
R
x
(
α
)
=
[
cos
γ
−
sin
γ
0
sin
γ
cos
γ
0
0
0
1
]
roll
[
cos
β
0
sin
β
0
1
0
−
sin
β
0
cos
β
]
pitch
[
1
0
0
0
cos
α
−
sin
α
0
sin
α
cos
α
]
yaw
=
[
cos
β
cos
γ
sin
α
sin
β
cos
γ
−
cos
α
sin
γ
cos
α
sin
β
cos
γ
+
sin
α
sin
γ
cos
β
sin
γ
sin
α
sin
β
sin
γ
+
cos
α
cos
γ
cos
α
sin
β
sin
γ
−
sin
α
cos
γ
−
sin
β
sin
α
cos
β
cos
α
cos
β
]
{\displaystyle {\begin{aligned}\\R=R_{z}(\gamma )\,R_{y}(\beta )\,R_{x}(\alpha )&={\overset {\text{roll}}{\begin{bmatrix}\cos \gamma &-\sin \gamma &0\\\sin \gamma &\cos \gamma &0\\0&0&1\\\end{bmatrix}}}{\overset {\text{pitch}}{\begin{bmatrix}\cos \beta &0&\sin \beta \\0&1&0\\-\sin \beta &0&\cos \beta \\\end{bmatrix}}}{\overset {\text{yaw}}{\begin{bmatrix}1&0&0\\0&\cos \alpha &-\sin \alpha \\0&\sin \alpha &\cos \alpha \\\end{bmatrix}}}\\&={\begin{bmatrix}\cos \beta \cos \gamma &\sin \alpha \sin \beta \cos \gamma -\cos \alpha \sin \gamma &\cos \alpha \sin \beta \cos \gamma +\sin \alpha \sin \gamma \\\cos \beta \sin \gamma &\sin \alpha \sin \beta \sin \gamma +\cos \alpha \cos \gamma &\cos \alpha \sin \beta \sin \gamma -\sin \alpha \cos \gamma \\-\sin \beta &\sin \alpha \cos \beta &\cos \alpha \cos \beta \\\end{bmatrix}}\end{aligned}}}
represents an extrinsic rotation whose (improper) Euler angles are α , β , γ , about axes x , y , z .
These matrices produce the desired effect only if they are used to premultiply column vectors , and (since in general matrix multiplication is not commutative ) only if they are applied in the specified order (see Ambiguities for more details). The order of rotation operations is from right to left; the matrix adjacent to the column vector is the first to be applied, and then the one to the left.[ 1]