3.5.6 · D2Guidance, Navigation & Control (GNC)

Visual walkthrough — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

3,428 words16 min readBack to topic

Before we touch four dimensions, we warm up in two — where a rotation is something you can literally draw on paper.


Step 1 — A rotation in 2D is a point on a circle

WHAT. Picture the flat page. Pick a direction and an amount to turn — that is one rotation. Draw a horizontal reference line pointing right; the turn takes it to a new arrow at angle above it. (Positive = counter-clockwise, matching our right-hand convention with the axis pointing out of the page along .)

WHY start here. In 2D a rotation needs only one number, the angle . This is the simplest possible rotation, and everything about quaternions is a "grown-up" version of this picture. If we understand how 2D packs an angle, the jump to 3D is small.

PICTURE. In the figure, the black arrow is where we started (angle ). The lavender arrow is where we ended (angle ). Notice the tip of the lavender arrow slides along a circle of radius 1 — the unit circle.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

WHY cosine and sine and not something else? Because they are defined as exactly these two shadows of a unit arrow. Any angle you pick, cosine and sine hand you back the two coordinates — that is the whole job of these two tools. We use them because we want the arrow's coordinates as a function of the angle, and that is precisely what they answer.

The single equation that ties the two shadows together forever:


Step 2 — Two turns add their angles (and this is multiplication)

WHAT. Do rotation-by-, then rotation-by-. The net effect is rotation-by-. Turning then is turning . Obvious from the picture — angles simply stack.

WHY this matters. A rotation system must let you combine rotations. In 2D, combining = adding angles. We now show that this "adding angles" is secretly a multiplication of two-number objects. That multiplication is the seed from which quaternions grow.

PICTURE. The mint arrow is the first turn ; the coral arrow adds on top; the final position is at .

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint
Recall The one idea to remember from 2D

Rotation ::: a length-1 object. Composing rotations ::: multiplying those objects. Staying valid ::: keep the length exactly .


Step 3 — In 3D we must also name the axis

WHAT. On the flat page every turn happened about the same invisible pin poking out of the paper. In real 3D space you can spin about any direction — the pin itself can point anywhere. So a 3D rotation needs two things: which way the pin points (the axis ) and how far you twist (the angle , positive by the right-hand rule from the intro).

WHY this is the whole difficulty. This is exactly why Euler angles jam and why 3×3 matrices are wasteful — describing a free axis is awkward. Quaternions will handle the axis gracefully.

PICTURE. The lavender arrow is the axis ; the coral ring shows the plane the object sweeps through as it twists by around that axis, curling in the right-hand-rule direction (thumb along ).

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

Step 4 — The multiplication and inverse machinery (before the sandwich)

WHAT. Before we can rotate anything we need three precise tools: how to (a) embed a 3D point as a quaternion, (b) multiply two quaternions, and (c) invert one.

WHY now. The next step uses the "sandwich" . That formula is meaningless until , the embedding of , and are all defined algebraically — otherwise we're waving hands. Here is the exact machinery, taken from the parent note.

WHY a single-sided multiply fails. Feed a pure quaternion into the product rule with : The scalar part is , which is not zero in general. That means the result is no longer a pure quaternion — it has leaked a scalar component, so it is not a clean 3D vector anymore, and its length has changed too. A single multiply corrupts the point. The fix is to multiply again on the other side by : that second multiply produces an equal-and-opposite scalar leak, cancelling it, and restores a pure 3D vector of the correct length. That cancellation is precisely why rotation must be the two-sided sandwich.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

Step 5 — The sandwich forces a half angle

WHAT. With the machinery of Step 4, the rotation of point is the sandwich: The point sits between and its conjugate. From Step 4 we know each side's scalar leak cancels, so comes out pure — a genuine rotated 3D vector.

WHY the half angle. Because acts on both sides, the point feels the turn contributed by twice. If each copy of carried the full angle , the point would rotate by . To get a true turn of , each copy must carry only half.

PICTURE. Read the assembly line left to right: acts, then again through on the other side. Two copies of → each contributes half the total turn.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

Step 6 — Build the four numbers from the 2D picture, upgraded

WHAT. Take the 2D "length-1 object" from Steps 1–2, set the angle to the half-angle from Step 5, and let the single sine "shadow" now point along the 3D axis from Step 3. That gives four numbers:

WHY this exact shape. The cosine slot stores "how much of the turn is nothing" (at it is ). The sine slot stores "how much of the turn is happening", and it is aimed along the axis so the object remembers which way to spin (right-hand rule: positive curls as your fingers do with thumb along ). One number for amount-of-turn, three for the aimed direction — the 2D circle grown into 3D.

PICTURE. The bar chart shows the four slots. The lavender bar is ; the coral/mint/butter bars are . As grows, the scalar bar shrinks and the vector bars grow — watch the trade-off.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

Step 7 — The four numbers automatically live on a length-1 sphere

WHAT. Add up the squares of all four numbers and simplify. We show the total is exactly 1, no matter what and we chose.

WHY do this. This is the parent note's headline result — the unit constraint. It is not an extra rule we bolt on; it falls out of the construction. Proving it visually is the payoff of the whole page.

PICTURE. On the left, the half-angle circle: the scalar and the twist strength are the two legs of a length-1 right triangle (Step 1 all over again). On the right, the twist strength gets split across the three axis components, but their squares repack to the same total.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

Step 8 — Edge & degenerate cases (nothing is left uncovered)

WHAT. We check the corner cases so the reader never meets a situation we skipped.

PICTURE. Three dials on the half-angle circle: the do-nothing turn, the half-turn, and the full-turn.

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint

The one-picture summary

WHAT. One diagram compresses the whole journey: 2D circle → half-angle → aim along 3D axis → four numbers on the 3-sphere , all with total-of-squares .

Figure — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint
Recall Feynman retelling — the whole walkthrough in plain words

Start flat on paper: a turn is just an arrow on a circle, and its two shadows (across and up) always square-add to 1 because the arrow is one unit long. Combining turns is multiplying these arrow-objects — and if you write out that multiply, , you literally get the "cosine of the sum, sine of the sum" formulas, so multiplying adds the angles. Now step into real space: a turn also needs to say which pin it spins around — an axis arrow, kept exactly one unit long so it only tells direction, and the right-hand rule tells you which way "positive" turns. To rotate a point we first drop it into the quaternion world as a pure object (zero scalar part), then we discover a single multiply leaks a scalar and wrecks it — so we squeeze the point between and its inverse (the sandwich), and the leaks cancel. The inverse of a unit quaternion is just its conjugate — flip the three vector signs. Because the object acts twice in the sandwich, each copy carries only half the angle. So we take the 2D arrow, use the half-angle, and aim its "up" shadow along the 3D axis. That builds four numbers: one for how-much-nothing (cosine), three for the aimed twist (sine along the axis). Square all four and add: the axis-part collapses to 1 because the axis is unit length, and what's left is cosine-squared plus sine-squared of the same half-angle — which is 1. So every real rotation is a point on the smooth 4D ball-surface : no corners means no jamming. And because the sandwich uses two copies, flipping every sign changes nothing — the same spin has two names, which you must handle when blending rotations so the spacecraft turns the short way.

Recall Cover me: where did the "=1" come from, in two places?

::: From the unit axis (, Step 3) collapsing the sine terms, and from (Step 1) on the leftover half-angle.

Recall Cover me: why can't we rotate with a single multiply

? ::: It produces a nonzero scalar part , so the result is no longer a pure 3D vector (and its length changes). The second factor cancels that leak — hence the two-sided sandwich.

Related builds: Axis-Angle Representation · Quaternion Kinematics — dq/dt · Spacecraft Attitude Determination · Rotation Matrices SO(3).