Intuition The big picture
A rotating rigid body (satellite, drone, aircraft) has an attitude — its orientation in space. We track it with a unit quaternion q q q . As the body spins with angular velocity ω \omega ω , the quaternion evolves in time . This note answers: HOW fast does q q q change, and WHY is the rate exactly half the angular velocity, wrapped in a matrix Ξ ( q ) \Xi(q) Ξ ( q ) ?
The deep idea: a quaternion lives on the unit 3-sphere S 3 S^3 S 3 . Its velocity must always stay tangent to that sphere (so ∥ q ∥ \|q\| ∥ q ∥ stays 1). The factor 1 2 \tfrac{1}{2} 2 1 and the matrix Ξ ( q ) \Xi(q) Ξ ( q ) are precisely what guarantee this.
Definition Unit quaternion
A quaternion is a 4-number object
q = [ q 0 q v ] = [ q 0 q 1 q 2 q 3 ] , q 0 = cos θ 2 , q v = n ^ sin θ 2 q = \begin{bmatrix} q_0 \\ \mathbf{q}_v \end{bmatrix} = \begin{bmatrix} q_0 \\ q_1 \\ q_2 \\ q_3 \end{bmatrix}, \qquad q_0 = \cos\tfrac{\theta}{2}, \quad \mathbf{q}_v = \hat{n}\sin\tfrac{\theta}{2} q = [ q 0 q v ] = q 0 q 1 q 2 q 3 , q 0 = cos 2 θ , q v = n ^ sin 2 θ
representing a rotation by angle = = θ = = ==\theta== == θ == about unit axis n ^ \hat{n} n ^ . It is a unit quaternion: ∥ q ∥ 2 = q 0 2 + q 1 2 + q 2 2 + q 3 2 = = = 1 = = \|q\|^2 = q_0^2 + q_1^2 + q_2^2 + q_3^2 = ==1== ∥ q ∥ 2 = q 0 2 + q 1 2 + q 2 2 + q 3 2 === 1 == .
Quaternion multiplication (Hamilton product): for p = ( p 0 , p v ) p = (p_0, \mathbf{p}_v) p = ( p 0 , p v ) , q = ( q 0 , q v ) q = (q_0, \mathbf{q}_v) q = ( q 0 , q v ) ,
p ⊗ q = [ p 0 q 0 − p v ⋅ q v p 0 q v + q 0 p v + p v × q v ] p \otimes q = \begin{bmatrix} p_0 q_0 - \mathbf{p}_v\cdot\mathbf{q}_v \\ p_0\mathbf{q}_v + q_0\mathbf{p}_v + \mathbf{p}_v\times\mathbf{q}_v \end{bmatrix} p ⊗ q = [ p 0 q 0 − p v ⋅ q v p 0 q v + q 0 p v + p v × q v ]
The WHY of the cross product term: quaternion multiplication is non-commutative , exactly like composing rotations. The p v × q v \mathbf{p}_v\times\mathbf{q}_v p v × q v term encodes that non-commutativity.
Intuition The one idea everything rests on
A rotation happening now is q ( t ) q(t) q ( t ) . A tiny extra rotation applied over time Δ t \Delta t Δ t can be written as another quaternion δ q \delta q δ q . Two rotations compose by multiplication . So
q ( t + Δ t ) = q ( t ) ⊗ δ q . q(t + \Delta t) = q(t) \otimes \delta q. q ( t + Δ t ) = q ( t ) ⊗ δ q .
Everything follows by asking: what is δ q \delta q δ q for a tiny spin?
A rotation of small angle Δ θ = ∥ ω ∥ Δ t \Delta\theta = \|\omega\|\,\Delta t Δ θ = ∥ ω ∥ Δ t about the (body-frame) axis ω ^ = ω / ∥ ω ∥ \hat\omega = \omega/\|\omega\| ω ^ = ω /∥ ω ∥ is:
δ q = [ cos Δ θ 2 ω ^ sin Δ θ 2 ] \delta q = \begin{bmatrix} \cos\tfrac{\Delta\theta}{2} \\ \hat\omega \sin\tfrac{\Delta\theta}{2} \end{bmatrix} δ q = [ cos 2 Δ θ ω ^ sin 2 Δ θ ]
Why this step? This is just the definition of a quaternion applied to the infinitesimal rotation that occurs during Δ t \Delta t Δ t .
For small Δ t \Delta t Δ t : cos Δ θ 2 ≈ 1 \cos\tfrac{\Delta\theta}{2}\approx 1 cos 2 Δ θ ≈ 1 and sin Δ θ 2 ≈ Δ θ 2 = ∥ ω ∥ Δ t 2 \sin\tfrac{\Delta\theta}{2}\approx \tfrac{\Delta\theta}{2} = \tfrac{\|\omega\|\Delta t}{2} sin 2 Δ θ ≈ 2 Δ θ = 2 ∥ ω ∥Δ t . So
δ q ≈ [ 1 1 2 ω Δ t ] = [ 1 0 0 0 ] + Δ t 2 [ 0 ω ] . \delta q \approx \begin{bmatrix} 1 \\ \tfrac{1}{2}\omega\,\Delta t \end{bmatrix} = \begin{bmatrix}1\\0\\0\\0\end{bmatrix} + \frac{\Delta t}{2}\begin{bmatrix}0\\ \omega\end{bmatrix}. δ q ≈ [ 1 2 1 ω Δ t ] = 1 0 0 0 + 2 Δ t [ 0 ω ] .
Why the 1 2 \tfrac12 2 1 appears here: the half-angle in sin θ 2 \sin\tfrac{\theta}{2} sin 2 θ is baked into the quaternion definition. This is the origin of the famous 1 2 \tfrac{1}{2} 2 1 .
q ( t + Δ t ) − q ( t ) = q ⊗ δ q − q = q ⊗ ( δ q − q identity ) = q ⊗ Δ t 2 [ 0 ω ] q(t+\Delta t) - q(t) = q \otimes \delta q - q = q\otimes(\delta q - q_{\text{identity}}) = q \otimes \frac{\Delta t}{2}\begin{bmatrix}0\\\omega\end{bmatrix} q ( t + Δ t ) − q ( t ) = q ⊗ δ q − q = q ⊗ ( δ q − q identity ) = q ⊗ 2 Δ t [ 0 ω ]
where q identity = ( 1 , 0 ) q_{\text{identity}}=(1,\mathbf{0}) q identity = ( 1 , 0 ) . Divide by Δ t \Delta t Δ t and let Δ t → 0 \Delta t\to 0 Δ t → 0 :
q ˙ = 1 2 q ⊗ [ 0 ω ] \boxed{\;\dot q = \frac{1}{2}\, q \otimes \begin{bmatrix} 0 \\ \omega \end{bmatrix}\;} q ˙ = 2 1 q ⊗ [ 0 ω ]
Why this step? We turned "compose a tiny rotation" into a genuine time-derivative. The pure quaternion ( 0 , ω ) (0,\omega) ( 0 , ω ) is called the angular-velocity quaternion .
Quaternion multiplication is linear , so q ⊗ ( 0 , ω ) q\otimes(0,\omega) q ⊗ ( 0 , ω ) can be written as a 4 × 3 4\times 3 4 × 3 matrix times ω \omega ω . Working out q ⊗ ( 0 , ω ) q\otimes(0,\omega) q ⊗ ( 0 , ω ) with the Hamilton product:
q ⊗ [ 0 ω ] = [ − q v ⋅ ω q 0 ω + q v × ω ] = Ξ ( q ) ω q\otimes\begin{bmatrix}0\\\omega\end{bmatrix} = \begin{bmatrix} -\mathbf{q}_v\cdot\omega \\ q_0\omega + \mathbf{q}_v\times\omega\end{bmatrix} = \Xi(q)\,\omega q ⊗ [ 0 ω ] = [ − q v ⋅ ω q 0 ω + q v × ω ] = Ξ ( q ) ω
with
Why this step? GNC filters (EKF, etc.) need a linear relation q ˙ = A ω \dot q = A\,\omega q ˙ = A ω . Packaging the Hamilton product as Ξ ( q ) \Xi(q) Ξ ( q ) gives us exactly that — clean for matrix code.
The rate of change of ∥ q ∥ 2 \|q\|^2 ∥ q ∥ 2 must be zero — otherwise q q q drifts off the unit sphere and no longer represents a valid rotation.
d d t ∥ q ∥ 2 = 2 q ⊤ q ˙ = 2 q ⊤ ( 1 2 Ξ ( q ) ω ) = ( q ⊤ Ξ ( q ) ) ω . \frac{d}{dt}\|q\|^2 = 2\,q^{\!\top}\dot q = 2\,q^{\!\top}\!\left(\tfrac12 \Xi(q)\omega\right) = \big(q^{\!\top}\Xi(q)\big)\,\omega. d t d ∥ q ∥ 2 = 2 q ⊤ q ˙ = 2 q ⊤ ( 2 1 Ξ ( q ) ω ) = ( q ⊤ Ξ ( q ) ) ω .
Key algebraic fact: q ⊤ Ξ ( q ) = 0 ⊤ q^{\!\top}\Xi(q) = \mathbf{0}^{\!\top} q ⊤ Ξ ( q ) = 0 ⊤ (a zero 1 × 3 1\times3 1 × 3 row). Check row-by-row using the block form:
q ⊤ Ξ ( q ) = q 0 ( − q v ⊤ ) + q v ⊤ ( q 0 I + [ q v × ] ) = − q 0 q v ⊤ + q 0 q v ⊤ + q v ⊤ [ q v × ] = 0 ⊤ q^{\!\top}\Xi(q) = q_0(-\mathbf{q}_v^{\!\top}) + \mathbf{q}_v^{\!\top}\big(q_0 I + [\mathbf q_v\times]\big) = -q_0\mathbf{q}_v^{\!\top} + q_0\mathbf{q}_v^{\!\top} + \mathbf{q}_v^{\!\top}[\mathbf q_v\times] = \mathbf 0^{\!\top} q ⊤ Ξ ( q ) = q 0 ( − q v ⊤ ) + q v ⊤ ( q 0 I + [ q v × ] ) = − q 0 q v ⊤ + q 0 q v ⊤ + q v ⊤ [ q v × ] = 0 ⊤
because q v ⊤ [ q v × ] = − ( q v × q v ) ⊤ = 0 \mathbf{q}_v^{\!\top}[\mathbf q_v\times] = -(\mathbf q_v\times\mathbf q_v)^{\!\top}=\mathbf 0 q v ⊤ [ q v × ] = − ( q v × q v ) ⊤ = 0 . Hence d d t ∥ q ∥ 2 = 0 \frac{d}{dt}\|q\|^2 = 0 d t d ∥ q ∥ 2 = 0 . ✔
Intuition Geometric meaning
q ˙ \dot q q ˙ is always orthogonal to q q q . Velocity tangent to a sphere → you slide along the sphere, never off it. This is why the equation is guaranteed self-consistent.
If ω \omega ω is expressed in the body frame (usual case, gyros measure body rates): use right multiplication q ˙ = 1 2 q ⊗ ( 0 , ω ) \dot q = \tfrac12 q\otimes(0,\omega) q ˙ = 2 1 q ⊗ ( 0 , ω ) → the Ξ ( q ) \Xi(q) Ξ ( q ) above.
If ω \omega ω is in the inertial frame : use left multiplication q ˙ = 1 2 ( 0 , ω ) ⊗ q \dot q = \tfrac12 (0,\omega)\otimes q q ˙ = 2 1 ( 0 , ω ) ⊗ q , giving a different matrix (often called Ω ( ω ) \Omega(\omega) Ω ( ω ) ).
Worked example Example 1 — Pure spin about body
z z z
Body rate ω = ( 0 , 0 , ω z ) \omega = (0,0,\omega_z) ω = ( 0 , 0 , ω z ) , start at identity q ( 0 ) = ( 1 , 0 , 0 , 0 ) q(0)=(1,0,0,0) q ( 0 ) = ( 1 , 0 , 0 , 0 ) .
q ˙ = 1 2 q ⊗ ( 0 , 0 , 0 , ω z ) . \dot q = \tfrac12\,q\otimes(0,0,0,\omega_z). q ˙ = 2 1 q ⊗ ( 0 , 0 , 0 , ω z ) .
Why: we expect q q q to trace q 0 = cos ω z t 2 , q 3 = sin ω z t 2 q_0=\cos\tfrac{\omega_z t}{2},\ q_3=\sin\tfrac{\omega_z t}{2} q 0 = cos 2 ω z t , q 3 = sin 2 ω z t — a rotation about z z z growing linearly in angle.
Plug in: q ˙ 0 = − 1 2 ω z q 3 \dot q_0 = -\tfrac12\omega_z q_3 q ˙ 0 = − 2 1 ω z q 3 , q ˙ 3 = 1 2 ω z q 0 \dot q_3 = \tfrac12\omega_z q_0 q ˙ 3 = 2 1 ω z q 0 . This is the harmonic oscillator with frequency ω z 2 \tfrac{\omega_z}{2} 2 ω z ⇒ solution q 0 = cos ω z t 2 , q 3 = sin ω z t 2 q_0=\cos\tfrac{\omega_z t}{2},\ q_3 = \sin\tfrac{\omega_z t}{2} q 0 = cos 2 ω z t , q 3 = sin 2 ω z t . ✔ Matches the expected half-angle.
Worked example Example 2 — Numerical single step
Let q = ( 1 , 0 , 0 , 0 ) q = (1,0,0,0) q = ( 1 , 0 , 0 , 0 ) , ω = ( 0.1 , 0 , 0 ) \omega = (0.1,\,0,\,0) ω = ( 0.1 , 0 , 0 ) rad/s. Compute q ˙ \dot q q ˙ .
q ˙ = 1 2 Ξ ( q ) ω , Ξ ( q ) = [ 0 0 0 1 0 0 0 1 0 0 0 1 ] , q ˙ = 1 2 [ 0 0.1 0 0 ] = [ 0 0.05 0 0 ] . \dot q = \tfrac12\Xi(q)\omega,\quad \Xi(q)=\begin{bmatrix}0&0&0\\1&0&0\\0&1&0\\0&0&1\end{bmatrix}\!,\ \ \dot q = \tfrac12\begin{bmatrix}0\\0.1\\0\\0\end{bmatrix}=\begin{bmatrix}0\\0.05\\0\\0\end{bmatrix}. q ˙ = 2 1 Ξ ( q ) ω , Ξ ( q ) = 0 1 0 0 0 0 1 0 0 0 0 1 , q ˙ = 2 1 0 0.1 0 0 = 0 0.05 0 0 .
Why this step? q 1 q_1 q 1 grows first — that's the x x x -axis component turning on, consistent with a roll about x x x . Note q ˙ 0 = 0 \dot q_0 = 0 q ˙ 0 = 0 at identity (norm-preserving: q ⊤ q ˙ = 0 q^\top\dot q = 0 q ⊤ q ˙ = 0 ). ✔
Worked example Example 3 — Forecast-then-verify
Forecast: if ω \omega ω doubles, how does q ˙ \dot q q ˙ change at a fixed q q q ? Since q ˙ \dot q q ˙ is linear in ω \omega ω , it should double .
Verify: 1 2 Ξ ( q ) ( 2 ω ) = 2 ⋅ 1 2 Ξ ( q ) ω = 2 q ˙ \tfrac12\Xi(q)(2\omega)=2\cdot\tfrac12\Xi(q)\omega = 2\dot q 2 1 Ξ ( q ) ( 2 ω ) = 2 ⋅ 2 1 Ξ ( q ) ω = 2 q ˙ . ✔ Linearity confirmed. (This is why Ξ \Xi Ξ is a matrix, not a nonlinear map.)
Common mistake "The factor should be 1, not ½."
Why it feels right: in 3D vector kinematics R ˙ = [ ω × ] R \dot R = [\omega\times]R R ˙ = [ ω × ] R has no ½. So people expect quaternions to match.
The fix: quaternions store the half-angle (sin θ 2 \sin\tfrac\theta2 sin 2 θ ). Differentiating a half-angle produces a 1 2 \tfrac12 2 1 by the chain rule. The ½ is the price of the double-cover q q q and − q -q − q representing the same rotation.
Common mistake "Order doesn't matter — I'll write
( 0 , ω ) ⊗ q (0,\omega)\otimes q ( 0 , ω ) ⊗ q with body rates."
Why it feels right: multiplication order seems cosmetic.
The fix: quaternion product is non-commutative. Body-frame ω \omega ω must post-multiply (q ⊗ q\otimes q ⊗ ). Getting this backwards silently integrates the wrong attitude — a classic flight-software bug.
Common mistake "I don't need to renormalize during integration."
Why it feels right: the math proves ∥ q ∥ = 1 \|q\|=1 ∥ q ∥ = 1 is preserved.
The fix: that's only exact in continuous time. Discrete numerical steps (Euler/RK) leak norm. Real GNC code renormalizes q ← q / ∥ q ∥ q \leftarrow q/\|q\| q ← q /∥ q ∥ every step.
Recall Feynman: explain to a 12-year-old
Imagine you're spinning on an office chair. To describe which way you face , you use a special 4-number "compass" called a quaternion. Now, if I tell you how fast you're spinning, you want to know how fast your compass numbers change. It turns out the compass numbers change at half the spin speed — because the compass secretly measures half-turns (a quaint quirk that makes the math turn out beautifully). There's also a little bookkeeping table (the Ξ \Xi Ξ matrix) that mixes your current facing with your spin to give the right change. And the whole thing is built so your compass always stays a valid "unit" compass — it never breaks.
"Half the spin, times XI, right-multiply the fin(body)."
Half → the 1 2 \tfrac12 2 1 (half-angle).
XI → Ξ ( q ) \Xi(q) Ξ ( q ) maps ω \omega ω .
right-multiply body → q ⊗ ( 0 , ω ) q\otimes(0,\omega) q ⊗ ( 0 , ω ) for body rates.
Why does the ½ appear in q ˙ = 1 2 Ξ ( q ) ω \dot q = \tfrac12\Xi(q)\omega q ˙ = 2 1 Ξ ( q ) ω ? Because quaternions encode the
half-angle (
sin θ 2 , cos θ 2 \sin\tfrac\theta2,\cos\tfrac\theta2 sin 2 θ , cos 2 θ ); differentiating the half-angle gives ½ by the chain rule.
Write the continuous-time quaternion kinematic equation (body rates). q ˙ = 1 2 q ⊗ ( 0 , ω ) = 1 2 Ξ ( q ) ω \dot q = \tfrac12\,q\otimes(0,\omega) = \tfrac12\,\Xi(q)\,\omega q ˙ = 2 1 q ⊗ ( 0 , ω ) = 2 1 Ξ ( q ) ω .
What guarantees ∥ q ∥ \|q\| ∥ q ∥ stays 1 in the kinematics? q ⊤ Ξ ( q ) = 0 ⊤ q^{\top}\Xi(q)=\mathbf 0^{\top} q ⊤ Ξ ( q ) = 0 ⊤ , so
d d t ∥ q ∥ 2 = q ⊤ q ˙ ⋅ 2 = 0 \tfrac{d}{dt}\|q\|^2 = q^{\top}\dot q\cdot 2 = 0 d t d ∥ q ∥ 2 = q ⊤ q ˙ ⋅ 2 = 0 ;
q ˙ ⊥ q \dot q \perp q q ˙ ⊥ q .
Structure of Ξ ( q ) \Xi(q) Ξ ( q ) ? 4 × 3 4\times3 4 × 3 : top row
− q v ⊤ -\mathbf q_v^\top − q v ⊤ ; bottom
3 × 3 3\times3 3 × 3 block
q 0 I + [ q v × ] q_0 I + [\mathbf q_v\times] q 0 I + [ q v × ] .
Body-frame ω \omega ω : pre- or post-multiply? Post-multiply,
q ⊗ ( 0 , ω ) q\otimes(0,\omega) q ⊗ ( 0 , ω ) . Inertial-frame
ω \omega ω pre-multiplies.
What is the equivalent Ω ( ω ) \Omega(\omega) Ω ( ω ) form? q ˙ = 1 2 Ω ( ω ) q \dot q = \tfrac12\Omega(\omega)q q ˙ = 2 1 Ω ( ω ) q , factoring out
q q q instead of
ω \omega ω ;
Ω ( ω ) \Omega(\omega) Ω ( ω ) is
4 × 4 4\times4 4 × 4 skew.
Why renormalize in code if norm is provably preserved? Preservation is exact only in continuous time; discrete integrators leak norm, so renormalize each step.
For pure spin ω z \omega_z ω z from identity, what does q 3 ( t ) q_3(t) q 3 ( t ) equal? q 3 ( t ) = sin ω z t 2 q_3(t)=\sin\tfrac{\omega_z t}{2} q 3 ( t ) = sin 2 ω z t (half-angle), with
q 0 = cos ω z t 2 q_0=\cos\tfrac{\omega_z t}{2} q 0 = cos 2 ω z t .
q at t plus dt = q times delta-q
small angle = norm omega times dt
approx identity plus half omega dt
difference quotient to derivative
Rotation theta about axis n-hat
Rotations compose by multiplication
Hamilton product with cross term
Intuition Hinglish mein samjho
Dekho, jab koi satellite ya drone space me ghoomta hai, to uska orientation (kis taraf muh hai) hum ek unit quaternion q q q se track karte hain — ye 4 numbers ka ek chhota sa "compass" samajh lo. Ab sawaal ye hai: agar body ω \omega ω angular velocity se ghoom rahi hai, to ye 4 numbers time ke saath kitni tezi se badalte hain? Iska jawaab hai q ˙ = 1 2 Ξ ( q ) ω \dot q = \tfrac12\,\Xi(q)\,\omega q ˙ = 2 1 Ξ ( q ) ω .
Sabse important cheez woh 1 2 \tfrac12 2 1 hai. Ye kahan se aaya? Kyunki quaternion andar-hi-andar half-angle store karta hai (cos θ 2 \cos\tfrac\theta2 cos 2 θ aur sin θ 2 \sin\tfrac\theta2 sin 2 θ ). Jab tum half-angle ko differentiate karte ho, chain rule se ek 1 2 \tfrac12 2 1 nikal aata hai. Bas yahi secret hai — koi jaadu nahi. Aur Ξ ( q ) \Xi(q) Ξ ( q ) matrix ka kaam sirf itna hai ki ω \omega ω (jo body frame me gyroscope measure karta hai) ko sahi tarike se q q q ke saath mix kare, kyunki quaternion multiplication me order matter karta hai (non-commutative). Body rates ke liye hamesha q ⊗ ( 0 , ω ) q\otimes(0,\omega) q ⊗ ( 0 , ω ) — yaani q q q ko left pe rakho.
Ek bahut khoobsurat property ye hai: ∥ q ∥ \|q\| ∥ q ∥ hamesha 1 rehta hai. Iska proof simple hai — q ⊤ Ξ ( q ) = 0 q^\top\Xi(q)=0 q ⊤ Ξ ( q ) = 0 , isliye q ˙ \dot q q ˙ hamesha q q q ke perpendicular hota hai. Sphere pe socho: agar velocity surface ke tangent me hai, to tum sphere pe hi slide karte ho, kabhi bahar nahi girte. GNC me isi liye ye equation itni pyaari hai — attitude kabhi "invalid" nahi hoti.
Ek practical warning: paper pe norm perfectly conserve hota hai, lekin computer me jab tum discrete steps (Euler/RK4) se integrate karte ho, thoda-thoda norm leak hota hai. Isliye real flight software har step ke baad q ← q / ∥ q ∥ q \leftarrow q/\|q\| q ← q /∥ q ∥ karke renormalize karta hai.