3.5.8 · D5Guidance, Navigation & Control (GNC)
Question bank — Quaternion rotation formula — rotating vector v by quaternion q
Before we start, the symbols and words this whole bank leans on. Meet each one before you use it:
Look at the picture of the sandwich acting on a vector before you start — it is the mental image behind almost every answer here:

And here is the half-angle idea in one glance — why the number inside is , not :

True or false — justify
True or false: (a single left-multiply) rotates the vector , just like a matrix does with .
False. A lone generally produces a nonzero scalar part, so the result isn't even a pure quaternion (a 3D vector). A rotation matrix is a grid that already maps 3-vectors to 3-vectors, so one multiply suffices; a quaternion instead needs the conjugate on the right to keep the output a valid vector.
True or false: and describe two different rotations because they are different 4-tuples.
False. Both signs cancel in the sandwich: . Quaternions double-cover rotations — every physical rotation has exactly two quaternion names.
True or false: The angle stored inside (via its cosine and sine) is the full rotation angle .
False. stores the half-angle: . Because acts twice in , each copy supplies , and double-angle identities glue them into .
True or false: A vector lying exactly along the rotation axis is unchanged by .
True. The parallel component satisfies , so the algebra returns untouched — you cannot spin a vector that already points down the spin axis.
True or false: Quaternion multiplication commutes, so the order of composed rotations doesn't matter.
False. The Hamilton product is non-commutative (), exactly like rotation matrices, where swapping the order of two matrix multiplies changes the result. Rotating "roll then pitch" differs from "pitch then roll."
True or false: For a unit quaternion, computing requires dividing by the norm.
False in practice. Since , the inverse is just the conjugate — you only flip the sign of the vector part, no division needed.
True or false: and Rodrigues' rotation give different results for the same axis and angle.
False. They are the same rotation written two ways; the sandwich algebraically collapses to Rodrigues' rotation formula, which spins by combining , a turning term , and the fixed axial part. The quaternion is just cheaper storage (4 numbers vs a formula on the axis).
True or false: To rotate a vector you must first normalize it.
False. The vector's length is preserved and irrelevant to how you rotate; only the axis must be a unit vector and must be unit. The vector itself can be any length.
Spot the error
" is unit, so ."
Wrong: the inverse is the conjugate , not itself. Only if the vector part is zero (a pure scalar quaternion) would hold.
"Rotating by after gives the combined quaternion ."
Wrong order. Write the action explicitly: rotate by first, giving ; then rotate that by , giving . So the combined quaternion is — the one acting first sits nearest the vector, on the right — and reverses the order.
"I embedded my vector as so the quaternion has the right length."
Wrong: the vector must be a pure quaternion with scalar part zero. Putting in the scalar slot corrupts the sandwich and the output is no longer a plain vector.
"Since a rotation preserves length, can change the direction but the scalar part stays whatever it was."
Wrong framing: the scalar part of the input is already (it's a pure quaternion). And the closure argument (see the "Why must the conjugate sit on the right?" item below) shows the output scalar part is also exactly . There is no nonzero scalar to worry about.
"The double-angle identity is just a coincidence that makes the answer look clean."
Wrong: it's structural. Writing and , the two half-angles from and must recombine, and the identities , are precisely the machinery that turns two half-angle contributions into one whole .
"For a rotation of , the quaternion equals the identity ."
Wrong: gives half-angle , so , not . It still acts as identity on vectors (signs cancel), but the quaternion itself is — the hallmark of the double cover.
"Normalizing a slightly-off quaternion changes the rotation a lot, so it's dangerous."
Wrong: renormalizing a near-unit quaternion nudges it back onto with a tiny change in the rotation — this cheapness is exactly why GNC systems favour quaternions (see Spacecraft attitude determination (GNC), where onboard filters renormalize every update).
Why questions
Why must the conjugate sit on the right rather than another copy of ?
Here is the full chain. We want the output to be pure (scalar part zero) so it is a genuine 3D vector. Take the conjugate of the sandwich using the rule "conjugate of a product reverses order and conjugates each factor": . For unit we have and ; and since is pure, . Substituting gives . An object equal to minus its own conjugate must have zero scalar part (because conjugation flips only the vector part; equalling your own negation forces the unflipped scalar to be ). Hence the output is pure. Using instead would break this cancellation.
Why does the perpendicular part of pick up a cross-product term while the parallel part does not?
The cross product vanishes when , so the parallel piece has nothing to rotate. Only the perpendicular piece lives in the plane of rotation, where it swings and gains the turning term.
Why do engineers prefer quaternions over Euler angles for attitude control?
Quaternions have no gimbal lock and use 4 numbers with 1 constraint, whereas Euler angles can lose a degree of freedom when two rotation axes line up. Quaternions also interpolate smoothly — a shortest-arc blend between two orientations, covered in SLERP — quaternion interpolation.
Why does the dot product appear in the Hamilton product's scalar slot and the cross product in the vector slot?
Multiply two pure quaternions and watch the units. Take and . Same-axis terms use : for instance , a pure scalar; summing all three gives — that's the dot product in the scalar slot. Cross-axis terms use : for instance , a pure vector along ; collecting all such terms gives exactly in the vector slot. So the split is just the table sorted into "scalar-making" and "vector-making" products — see Quaternion algebra & Hamilton product.
Why is the vector's magnitude unaffected by even though we multiply three quaternions?
A unit quaternion has norm 1, and quaternion multiplication is multiplicative over norms: . Length is conserved, as any true rotation demands.
Why does the composed rotation apply first even though is written on the left?
Because sits next to in the nested sandwich , so it touches the vector first. This is the general operator-action rule: in the quaternion nearest the vector acts first, and stacking sandwiches nests inward-to-outward. Left-to-right reading order and application order are therefore opposite, just like function composition where runs first.
Why can't we recover the axis from a quaternion whose angle is ?
At the quaternion is — the vector part vanishes, so is undefined. There's no rotation to speak of, hence no distinguished axis, just as a zero rotation has no meaningful direction.
Edge cases
Edge case: rotation angle . What is and what does do?
, the identity. The sandwich returns unchanged — no axis is even needed since nothing moves.
Edge case: rotation angle about . Is the axis recoverable, and what happens to ?
Yes — is a pure quaternion, so the axis is clearly readable. The perpendicular component flips sign (, ), reflecting through the axis.
Edge case: is the zero vector . What does the sandwich return?
The zero vector, always: . A point at the origin can't be moved by any rotation about an axis through it.
Edge case: the axis is given as a non-unit vector (say length 2). Is the formula still valid?
No — the half-angle form assumes . A non-unit axis makes , breaking and distorting the rotation. Normalize the axis first.
Edge case: you accumulate thousands of quaternion multiplications and drift to . Physical consequence?
The sandwich now slightly scales the vector (length no longer preserved) because . The fix is cheap renormalization , one of quaternions' key GNC advantages over accumulating rotation matrices.
Edge case: — does the vector return to itself, and does the quaternion?
The vector returns exactly to itself (a full turn is identity on 3D vectors). The quaternion does not: it becomes , needing to return to — the geometric fingerprint of the double cover.
Edge case: two axes and with angles and . Same or different rotation?
Same rotation. Flipping both the axis sign and the angle sign leaves unchanged and unchanged, so the quaternion — and the physical spin — is identical.