Euler angles are three angles used to describe the orientation of a rigid body. They are typically denoted α,β,γ. These angles represent a sequence of three elemental rotations about the axes of some coordinate system.

Intrinsic and Extrinsic Rotations

Intrinsic Rotations

A set of intrinsic rotations represents rotations relative to the object space, which changes after each rotation.

If the axes of some coordinate system are X,Y,Z (note that initially, the axes are aligned with the axes of a fixed coordinate system x,y,z), one of the most conventional sets of intrinsic rotations is zxz. It’s computed as follows:

  • Perform a rotation of α around the z-axis. The resulting set of axes is x,y,z (note that z=z).
  • Perform a rotation of β around the x-axis. The resulting set of axes is x,y,z (note that x=x).
  • Perform a rotation of γ around the z-axis. The resulting set of axes is x,y,z (note that z=z and that the object space z-axis is used twice in the overall rotation).
Intrinsic rotation zxz. Note that the +z-axis points upward, the +x-axis points left, and the +y-axis points right (all shown in blue). The rotated system X,Y,Z is shown in red.

A rotation matrix (used to pre-multiply column vectors) can be used to represent a sequence of intrinsic rotations. For example, the extrinsic rotations xyz with angles α,β,γ are represented as a multiplication of the following rotation matrices:

R=X(α)Y(β)Z(γ)

Where X(α), Y(β), and Z(γ) are rotation matrices that represent a rotation around the x-axis by α, around the y-axis by β, and around the z-axis by γ, respectively.

Extrinsic Rotations

A set of extrinsic rotations represents rotations relative to a fixed coordinate system (typically the world coordinate system). For example, the set of extrinsic rotations zxz works as follows:

  • Perform a rotation of α around the z-axis. The resulting set of axes is x,y,z (note that z=z).
  • Perform a rotation of β around the x-axis. The resulting set of axes is x,y,z.
  • Perform a rotation of γ around the z-axis. The resulting set of axes is x,y,z.

A rotation matrix (used to pre-multiply column vectors) can be used to represent a sequence of intrinsic rotations. For example, the extrinsic rotations xyz with angles α,β,γ are represented as a multiplication of the following rotation matrices:

R=Z(γ)Y(β)X(α)

Where X(α), Y(β), and Z(γ) are rotation matrices that represent a rotation around the x-axis by α, around the y-axis by β, and around the z-axis by γ, respectively.

Conversion Between Intrinsic and Extrinsic Rotations

Any intrinsic rotation is equivalent to an extrinsic rotation by the same angles but with an inverted order of rotations.

For example, the intrinsic rotations xyz by the angles α,β,γ are equivalent to the extrinsic rotations zyx by the angles γ,β,α, both represented by:

R=X(α)Y(β)Z(γ)

Proper Euler Angles

A sequence of three elemental rotations is called proper Euler angles when the first and third rotation axes are the same.

Proper Euler angles representing rotations about zxz by the angles α,β,γ. The rotated system X,Y,Z is shown in red.

There are six possibilities for choosing the rotation axes for proper Euler angles, which are intrinsic rotations. In a similar way, there are six other possibilities for choosing the rotation axes, which are extrinsic rotations.

Intrinsic Rotations Extrinsic Rotations
xyx xyx
xzx xzx
yxy yxy
yzy yzy
zxz zxz
zyz zyz

Tait-Bryan Angles

A sequence of three elemental rotations is called Tait-Bryan angles when the angles represent rotations about three distinct axes.

Just like proper Euler angles, there are six possible intrinsic rotations and six possible extrinsic rotations.

Intrinsic Rotations Extrinsic Rotations
xyz zyx
xzy yzx
yxz zxy
yzx xzy
zxy yxz
zyx xyz

The set of intrinsic rotations zyx is known as yaw, pitch, and roll. These angles are also known as nautical angles because they can describe the orientation of a ship or aircraft.

Tait–Bryan angles representing the sequence zyx

The rotation matrix for the sequence zyx (or xyz), which is known as yaw, pitch, and roll, is given by:

R=Z(α)Y(β)X(γ)

Extrinsic Rotations Expressed in Upright Space

An important thing to note is that the standard rotation matrices work in upright space. If the object space axes are not aligned with the upright space axes (different direction), then the sequence of extrinsic rotations must be done on the axes expressed in upright space.

For example, given that world space is:

Chosen world space: +x (right), +y (up), and +z (backward). Note that the choice is just personal preference.

If there’s an object whose object space axes are +x (backward), +y (right), and +z (up), then a sequence of intrinsic rotations zyx by the angles α,β,γ (equivalent to the extrinsic rotation xyz by the angles γ,β,α, which is also known as yaw, pitch, and roll) is equivalent to the multiplication of the following rotation matrices:

R=R(w,α)R(v,β)R(u,γ)

Where:

  • R(s,t) is the general rotation matrix used to rotate around the axis s by the angle t.
  • u,v,w are the columns of the transformation matrix used to transform any point p expressed in object space to upright space.
pupright=Muprightobjectpobject=[u3×1v3×1w3×1]pobject

The problem can be simplified when the frame is somewhat aligned with the upright space (the order might be different, and the axis directions might be reversed, but it’s still aligned). The following diagram shows some of these simplifications:

To/from Description Intrinsic/Extrinsic
rotations
Equivalence in world space
yaw, pitch, roll yxzzxy Y(α)X(β)Z(γ)
yaw, pitch, roll zyxxyz Z(α)Ywld(α)Y(β)Xwld(β)X(γ)Zwld(γ)
yaw, pitch, roll yxzzxy Y(α)Ywld(α)X(β)Xwld(β)Z(γ)Zwld(γ)
Equivalence of common extrinsic rotations in world space