Rotation Matrices
Definition
A rotation matrix is a special matrix that, when pre-multiplied by a vector in one reference frame, transforms that vector into the same vector expressed in a second rotated reference frame. For a matrix to be a valid rotation transformation it must be orthogonal:
The first condition ensures the transformed vector stays the same length. The second means the inverse transformation is simply the transpose — reversing the rotation costs nothing extra.
Let denote a rotation matrix that maps a vector from frame to frame :
Following the attitude convention , the attitude is encoded as .
Direct Cosine Matrix
The rotation matrix can be understood as an operation that projects the reference frame axes onto the rotated frame axes — a mapping of how much each axis is transferred to all other axes. This is called a Direct Cosine Matrix (DCM) because each element is the cosine of the unsigned angle between the corresponding frame axes:
where is the unsigned angle between the axis and the axis. This process effectively rotates the reference frame via the projection — it does not rotate the vector itself. Rather, it re-expresses the same vector as seen from a different frame.
Single Axis Transformations
The elementary single-axis frame rotation transformations are:
These transformations rotate the reference frame — they do not rotate the vector itself.
Active or Passive Rotations
A rotation can be considered active or passive depending on what moves:
- Passive rotation — the vector stays fixed, the frame rotates. The vector does not change; it is the frame of reference that rotates. This is the convention used throughout this site, as it is most closely aligned with engineering concepts.
- Active rotation — the frame stays fixed, the vector rotates.
Rotations have no absolute quantities — they are always relative to a reference. Therefore an active rotation can be considered as a passive rotation in the opposite direction. A passive rotation by is the same as an active rotation by .
Chaining Multiple Rotations
Multiple rotations can be chained together by multiplying the rotation matrices in order (right to left). Consider the rotation from to via the intermediate frame :
Substituting:
So the composite rotation matrix is formed by multiplying subsequent rotations on the left:
Note that matrix multiplication is not commutative — the order of rotations matters.
Intrinsic vs Extrinsic Rotations
When multiple rotations are chained by sequential operations, there are two ways to interpret the sequence:
Intrinsic — each successive rotation is applied to the intermediate frame from the previous rotation. The rotation axes themselves move with each step. For example:
The second rotation is about the new -axis. This is the convention used throughout this series.
Extrinsic — each successive rotation is applied to the original non-rotated fixed frame. For example:
The second rotation is about the original -axis.
To convert a chained intrinsic rotation sequence into an equivalent extrinsic sequence, reverse the order: . The opposite is also true.