3.5.7 · D4Guidance, Navigation & Control (GNC)

Exercises — Quaternion product — Hamilton product

2,053 words9 min readBack to topic

Everything below uses the one rule from the parent note:

Recall Quick reference: what the pieces are, in words

Dot product ::: — one number, symmetric (). Cross product ::: — a vector, anti-symmetric (). Conjugate ::: — flip the vector part's sign. Norm ::: .


Level 1 — Recognition

Goal: read the formula and plug numbers in without slipping on a sign.

L1.1

Given and , compute only the scalar part of .

Recall Solution

The scalar part is .

  • .
  • .
  • Scalar .

What we did: used only the first slot of the formula. Why: the question asked for the scalar alone, so the vector slot is irrelevant here.

L1.2

For the same , compute the vector part of .

Recall Solution

Vector part .

  • .
  • .
  • with , :
    • .
  • Sum: .

So .


Level 2 — Application

Goal: turn a physical rotation into a quaternion and multiply.

L2.1

Write the unit quaternion for a rotation about the -axis. Recall .

Recall Solution

.

  • , .
  • .
  • , i.e. the unit .

Why the half-angle: rotating a vector uses the sandwich , which applies effectively "twice", so each must carry only half the angle. (See Axis-Angle & Euler Rodrigues.)

L2.2

Compose " about " then " about ". Using the convention , compute .

Figure — Quaternion product — Hamilton product
Recall Solution

Build each quaternion (, ):

Here "first" , "last" , so compute with :

  • Scalar: .
  • Vector:
    • :
    • Sum: .
  • .
  • Norm check: ✅.

What it looks like (figure): the red arrow is applied first (about ), the mint arrow second (about ); reading right-to-left in matches that timeline.


Level 3 — Analysis

Goal: reason about structure, not just crunch numbers.

L3.1

Prove that for any two quaternions, the scalar part of equals the scalar part of , but the vector parts can differ. Identify the single term responsible.

Recall Solution

Scalar of : . Scalar of : . Since ordinary multiplication commutes () and dot is symmetric (), the two scalars are identical. ✅

Vector of : . Vector of : . The first two terms match (addition commutes). The difference is using anti-symmetry . So — a pure quaternion. The cross product is the sole culprit.

L3.2

Show that if and are parallel (both along the same axis), then .

Recall Solution

Parallel means for some scalar . Then By L3.1, , so . ✅

Physical meaning: two rotations about the same axis commute (spin then about = either way). Only differently-axised rotations refuse to commute — the geometric heart of Cross Product & Right-Hand Rule.


Level 4 — Synthesis

Goal: chain several tools — product, conjugate, sandwich — into one result.

L4.1

Rotate the vector by the unit quaternion (a turn about ) using the sandwich .

Figure — Quaternion product — Hamilton product
Recall Solution

Embed as a pure quaternion . Since is unit, .

Step 1 — inner product (, ):

  • Scalar: .
  • Vector:
    • cross:
    • .
  • .

Step 2 — outer product (, ):

  • ; .
  • Scalar: ✅ (a rotated vector stays pure).
  • Vector:
    • scaled term:
    • cross: ; ;
    • sum: .
  • — the -axis rotated to the -axis. ✅

What it looks like: a counter-clockwise turn about sends , exactly as the figure shows.


Level 5 — Mastery

Goal: design and prove a property a filter actually depends on.

L5.1

A gyro integrator updates attitude as where is a tiny unit quaternion. Prove that exactly (in real arithmetic), so the orientation never grows or shrinks. Use the norm identity .

Recall Solution

Claim to lean on: for any quaternions, . (This follows because the norm-squared is multiplicative: , so .)

Apply with , : Since is a unit quaternion, , hence Starting from , every forever — in exact math. See Quaternion Kinematics — $\dot q = \tfrac12 q\,\omega$ and Multiplicative EKF (MEKF) for how filters exploit this.

L5.2

Numeric sanity check. Let and a small rotation . Compute and verify its norm is to 6 decimals.

Recall Solution

Let , , . , .

  • Scalar: .
  • Vector:
    • cross
    • sum:
  • .
  • Norm.
  • ✅.

Insight: the exact collapse is why unit-ness survives — but in float, is only to machine precision, so real filters renormalize periodically.


Connections

  • Quaternion product — Hamilton product — the parent rule every exercise applies.
  • Cross Product & Right-Hand Rule — the term behind all non-commutativity (L3).
  • Axis-Angle & Euler Rodrigues — source of the half-angle in L2.
  • Quaternion Kinematics — $\dot q = \tfrac12 q\,\omega$ — the gyro update of L5.
  • Multiplicative EKF (MEKF) — where unit-norm preservation matters in practice.
  • Rotation Matrices — SO(3) — cross-check any product against matrix multiplication.