# Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.
BUILT-IN WOLFRAM LANGUAGE SYMBOL

# RollPitchYawMatrix

RollPitchYawMatrix[{α,β,γ}]
gives the 3D rotation matrix formed by rotating by α around the initial axis, then by β around the initial axis, and then by γ around the initial axis.

RollPitchYawMatrix[{α,β,γ},{a,b,c}]
gives the 3D rotation matrix formed by rotating by α around the fixed a axis, then by β around the fixed b axis, and then by γ around the fixed c axis.

## DetailsDetails

• RollPitchYawMatrix is also known as bank-elevation-heading matrix or Cardan matrix. The angles {α,β,γ} are often referred to as Cardan angles, nautical angles, bank-elevation-heading, or roll-pitch-yaw.
• RollPitchYawMatrix is typically used to specify a rotation as a sequence of basic rotations around coordinate axes where each rotation is referring to the initial or extrinsic coordinate frame.
• RollPitchYawMatrix[{α,β,γ}] is equivalent to RollPitchYawMatrix[{α,β,γ},{3,2,1}].
• RollPitchYawMatrix[{α,β,γ},{a,b,c}] is equivalent to where Rα,a=RotationMatrix[α,UnitVector[3,a]] etc.
• The default z-y-x rotation RollPitchYawMatrix[{α,β,γ},{3,2,1}]:
• The rotation axes a, b, and c can be any integer 1, 2, or 3, but there are only twelve combinations that are general enough to be able to specify any 3D rotation.
• Rotations with the first and last axis repeated:
•  {3,2,3} z-y-z rotation {3,1,3} z-x-z rotation {2,3,2} y-z-y rotation {2,1,2} y-x-y rotation {1,3,1} x-z-x rotation {1,2,1} x-y-x rotation
• Rotations with all three axes different:
•  {1,2,3} x-y-z rotation {1,3,2} x-z-y rotation {2,1,3} y-x-z rotation {2,3,1} y-z-x rotation {3,1,2} z-x-y rotation {3,2,1} z-y-x rotation (default)
• Rotations with subsequent axes repeated still produce a rotation matrix, but cannot be inverted uniquely using RollPitchYawAngles.

## ExamplesExamplesopen allclose all

### Basic Examples  (2)Basic Examples  (2)

The standard roll-pitch-yaw matrix:

 In[1]:=
 Out[1]//MatrixForm=

Rotate an axes-aligned unit cube:

 In[1]:=
 In[2]:=
 Out[2]=