|
A single unit quaternion represents one spatial rotation. In applications, however, one usually performs successive rotations: a body is rotated by one command, then by another; one frame is related to a second, then that frame to a third; or one attitude update is followed by another. The central question is therefore not only how one quaternion rotates a vector, but also how several quaternion rotations compose.
This entry derives the composition law for active rotations, explains why the product order matters, connects quaternion chains to direction-cosine-matrix chains, and clarifies the intrinsic and extrinsic language commonly used in mechanics, robotics, and aerospace work.
This article uses the PhysicsLibrary house convention:
- right-handed orthonormal frames;
- Hamilton multiplication, so
;
- scalar-first display notation,
 |
(1) |
- active vector rotation by a unit quaternion,
 |
(2) |
When a software library stores components in scalar-last order
, the storage layout changes but the multiplication law and composition rules do not.
Let and be unit quaternions. Suppose that acts first on the vector , and then acts on the result. The intermediate vector is
 |
(3) |
and the final vector is
 |
(4) |
Substituting equation (3) into equation (4) gives
 |
(5) |
Associativity of quaternion multiplication allows the factors to be regrouped:
 |
(6) |
Because conjugation reverses order,
 |
(7) |
so the final result can be written as
 |
(8) |
Therefore the single unit quaternion equivalent to “first , then ” is
 |
(9) |
This is the fundamental composition rule for active rotations in the PhysicsLibrary convention.
Quaternion multiplication is associative but not commutative. Therefore,
 |
(10) |
in general. The corresponding finite rotations need not commute either. Changing the order changes the physical result.
A simple example uses two quarter-turns. Let
 |
(11) |
represent a rotation about the axis, and let
 |
(12) |
represent a rotation about the axis.
For the initial vector
,
 |
(13) |
whereas
 |
(14) |
Thus
 |
(15) |
and the two orders send the same initial vector to different final vectors. Figure illustrates this noncommutativity.
Figure: Composition of two active quarter-turn rotations. The initial vector is
. Rotating first about and then about gives
, while rotating first about and then about gives
. For active rotations the net quaternion is ordered in time as
, where acts first.
|
|
If denotes the direction-cosine matrix corresponding to the active unit quaternion , then
 |
(16) |
Applying and then gives
 |
(17) |
Comparing equations (7) and (15), one obtains the homomorphism property
 |
(18) |
Thus quaternion composition follows the same written order as active matrix composition: the factor nearest the vector acts first.
The same physical sequence can often be described in two ways.
An extrinsic description rotates an object about axes fixed in the reference frame. In this language, “rotate by about a fixed axis, then rotate by about another fixed axis” leads directly to
.
An intrinsic description rotates an object about axes attached to the body after the previous rotations have occurred. The sequence of axis labels is then read in the moving frame. Intrinsic and extrinsic descriptions can denote the same overall orientation, but one must be precise about which frame each axis belongs to.
For quaternion algebra, the safest practice is to avoid relying only on the words intrinsic and extrinsic. Instead, write either the explicit active rotation chain or the explicit frame chain.
For frame transformations it is helpful to write the source and target frames in the quaternion symbol. Let denote the unit quaternion that maps coordinates from frame to frame . If a vector has coordinates
in frame , then
 |
(19) |
If one then maps from frame to frame , the second rotation is , and the full chain is
 |
(20) |
By the same regrouping argument used earlier,
 |
(21) |
so the frame-chain rule is
 |
(22) |
This mirrors the familiar matrix relation
.
In a passive interpretation one changes the coordinates used to describe the same geometric vector rather than physically rotating the vector itself. With PhysicsLibrary's active convention as primary, the passive change associated with is expressed by the inverse action,
 |
(23) |
The active and passive viewpoints are equivalent descriptions of the same orientation change, but the order of factors and the meaning of the axis labels must be handled consistently.
If
 |
(24) |
with both quaternions unit, then their product is
 |
(25) |
Thus the composed axis-angle pair may be extracted from the scalar and vector parts of . There is no simple rule saying “add the axes” or “add the angles” except in special commuting cases such as repeated rotations about the same axis.
Several checks are worth memorizing.
- If
, then
.
- If
, then
.
- If and are rotations about the same axis,
 |
(26) |
so the physical angles add.
- If
, then
 |
(27) |
so the second rotation exactly undoes the first.
The most common mistakes are:
- reversing the order and using
when the intended sequence is first , then ;
- mixing active and passive interpretations without inverting the quaternion;
- confusing scalar-first display with scalar-last storage;
- describing an intrinsic sequence but computing an extrinsic one;
- assuming finite rotations commute because small-angle infinitesimal rotations often appear to commute to first order.
The next entry derives the direction-cosine matrix associated with a unit quaternion and shows how matrix and quaternion composition are related in component form.
The active composition rule follows directly from quaternion associativity and conjugate order reversal. The engineer-facing convention discipline is closely aligned with the modern discussion by Sommer and coauthors on quaternion multiplication conventions and homomorphism properties. The use of frame-chain notation is also consistent with standard multibody and navigation practice.
This article is an original synthesis prepared for PhysicsLibrary and intended for release under CC BY-SA 4.0.
|