Visual walkthrough — Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaternion constraint
3.5.6 · D2· Physics › Guidance, Navigation & Control (GNC) › Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaterni
Chaar dimensions ko touch karne se pehle, hum do mein warm up karte hain — jahan ek rotation kuch aisa hota hai jo tum literally paper par draw kar sako.
Step 1 — 2D mein ek rotation ek circle par ek point hai
KYA. Flat page ka picture karo. Ek direction aur ghoomne ki amount chuno — yahi ek rotation hai. Ek horizontal reference line draw karo jo right ki taraf point kar rahi ho; turn use ek naye arrow par le jaata hai jo usse angle par upar hai. (Positive = counter-clockwise, hamara right-hand convention match karta hai jahan axis page se bahar ke saath nikalta hai.)
YAHAN SE KYUN SHURU KAREIN. 2D mein ek rotation ko sirf ek number chahiye, angle . Yeh possible sabse simple rotation hai, aur quaternions ke baare mein sab kuch is picture ka ek "grown-up" version hai. Agar hum samajh lein ki 2D kaise ek angle pack karta hai, toh 3D ki taraf jump chhota ho jaata hai.
PICTURE. Figure mein, black arrow wahan hai jahan hum shuru kiye the (angle ). Lavender arrow wahan hai jahan hum pahunche (angle ). Dhyan do ki lavender arrow ki tip ek radius 1 ki circle par slide karti hai — the unit circle.

COSINE AUR SINE HI KYUN, KUCH AUR KYUN NAHI? Kyunki yeh define hi kiye gaye hain exactly in do shadows ke roop mein — ek unit arrow ke. Jo bhi angle chuno, cosine aur sine tumhe woh do coordinates wapas de dete hain — yahi in dono tools ka poora kaam hai. Hum inhe isliye use karte hain kyunki hume arrow ke coordinates chahiye angle ke function ke roop mein, aur precisely yahi woh answer karte hain.
Woh single equation jo un dono shadows ko hamesha ke liye baandhti hai:
Step 2 — Do turns apne angles add karte hain (aur yeh multiplication hai)
KYA. Rotation-by- karo, phir rotation-by-. Net effect hoga rotation-by-. phir ghoomna equals hai ghoomna. Picture se obvious hai — angles simply stack hote hain.
YEH KYUN MATTER KARTA HAI. Ek rotation system ko rotations combine karne dena chahiye. 2D mein, combining = angles add karna. Ab hum dikhate hain ki yeh "angles add karna" secretly multiplication hai do-number objects ki. Yeh multiplication woh seed hai jis se quaternions grow karte hain.
PICTURE. Mint arrow pehla turn hai; coral arrow upar se add karta hai; final position par hai.

Recall 2D se yaad rakhne wala ek idea
Rotation ::: ek length-1 object. Rotations compose karna ::: un objects ko multiply karna. Valid rehna ::: length exactly rakhna.
Step 3 — 3D mein humein axis bhi naam dena hoga
KYA. Flat page par har turn usi ek invisible pin ke around hota tha jo paper se bahar nikal rahi thi. Real 3D space mein tum kisi bhi direction ke around spin kar sakte ho — pin itself kahan bhi point kar sakti hai. Toh ek 3D rotation ko do cheezein chahiye: pin kahan point karti hai (axis ) aur kitna twist karte ho (angle , intro ke right-hand rule se positive).
YEH POORI MUSHKIL KYUN HAI. Exactly yahi wajah hai ki Euler angles jam hote hain aur kyun 3×3 matrices wasteful hain — ek free axis describe karna awkward hai. Quaternions axis ko gracefully handle karenge.
PICTURE. Lavender arrow axis hai; coral ring woh plane dikhata hai jis mein object sweep karta hai jab woh se us axis ke around twist karta hai, right-hand-rule direction mein curling karta hua (thumb ke saath).

Step 4 — Multiplication aur inverse machinery (sandwich se pehle)
KYA. Kuch bhi rotate karne se pehle hume teen precise tools chahiye: kaise (a) ek 3D point ko quaternion ke roop mein embed karein, (b) do quaternions multiply karein, aur (c) ek ko invert karein.
ABHI KYUN. Agla step "sandwich" use karta hai. Woh formula meaningless hai jab tak , ki embedding, aur sab algebraically define nahi ho jaate — warna hum sirf haath hila rahe hain. Yeh exact machinery hai, parent note se li gayi.
EK-SIDED MULTIPLY KYUN FAIL KARTA HAI. Pure quaternion ko product rule mein ke saath feed karo: Scalar part hai , jo generally zero nahi hoti. Iska matlab result ab pure quaternion nahi raha — usne ek scalar component leak kar diya, toh woh ab ek clean 3D vector nahi raha, aur uski length bhi change ho gayi. Ek single multiply point ko corrupt kar deta hai. Fix yeh hai ki doosri taraf se se phir multiply karo: woh doosra multiply ek equal-and-opposite scalar leak produce karta hai, use cancel karta hai, aur sahi length ka ek pure 3D vector restore karta hai. Yahi cancellation precisely woh reason hai ki rotation ko two-sided sandwich hona chahiye.

Step 5 — Sandwich half angle force karta hai
KYA. Step 4 ki machinery ke saath, point ka rotation sandwich hai: Point aur uske conjugate ke beech mein baithta hai. Step 4 se hum jaante hain ki har side ka scalar leak cancel ho jaata hai, toh pure nikalta hai — ek genuine rotated 3D vector.
HALF ANGLE KYUN. Kyunki dono taraf act karta hai, point woh turn feel karta hai jo do baar contribute karta hai. Agar ki har copy full angle carry karti, toh point se rotate ho jaata. Sach mein ka turn paane ke liye, har copy ko sirf half carry karna hoga.
PICTURE. Assembly line ko left se right padho: act karta hai, phir doosri taraf ke through phir. ki do copies → har ek total turn ka aadha contribute karti hai.

Step 6 — Chaar numbers 2D picture se build karo, upgraded
KYA. Steps 1–2 se 2D "length-1 object" lo, angle ko half-angle set karo Step 5 se, aur single sine "shadow" ko ab Step 3 se 3D axis ki taraf point karne do. Yeh chaar numbers deta hai:
YEH EXACT SHAPE KYUN. Cosine slot store karta hai "turn ka kitna nothing hai" ( par yeh hai). Sine slot store karta hai "turn kitna ho raha hai", aur yeh axis ke saath aim kiya gaya hai taaki object yaad rahe ki kahan spin karna hai (right-hand rule: positive aisi curl karta hai jaise tumhari ungliyaan ke saath thumb ke saath). Kitna-turn ke liye ek number, aimed direction ke liye teen — 2D circle 3D mein grow hua.
PICTURE. Bar chart chaar slots dikhata hai. Lavender bar hai ; coral/mint/butter bars hain . Jaise badhta hai, scalar bar shrink hota hai aur vector bars grow karte hain — trade-off dekho.

Step 7 — Chaar numbers automatically ek length-1 sphere par rehte hain
KYA. Charon numbers ke squares add karo aur simplify karo. Hum dikhate hain ki total exactly 1 hai, chahe hum koi bhi aur chose karein.
YEH KYUN KAREIN. Yeh parent note ka headline result hai — unit constraint. Yeh koi extra rule nahi hai jo hum baad mein bolt on karte hain; yeh construction se khud nikalta hai. Ise visually prove karna is poore page ka payoff hai.
PICTURE. Left par, half-angle circle: scalar aur twist strength ek length-1 right triangle ki do legs hain (Step 1 phir se). Right par, twist strength teen axis components mein split ho jaata hai, lekin unke squares same total par repack ho jaate hain.

Step 8 — Edge & degenerate cases (kuch bhi uncovered nahi chhoda)
KYA. Hum corner cases check karte hain taaki reader koi aisi situation se kabhi na mile jo hum skip kar gaye.
PICTURE. Half-angle circle par teen dials: do-nothing turn, half-turn, aur full-turn.

Ek-picture summary
KYA. Ek diagram poore safar ko compress karta hai: 2D circle → half-angle → 3D axis ke saath aim karo → 3-sphere par chaar numbers, sab ke squares ka total .

Recall Feynman retelling — poori walkthrough plain words mein
Paper par flat shuru karo: ek turn bas ek circle par ek arrow hai, aur uski do shadows (across aur up) hamesha square-add karke 1 deti hain kyunki arrow ek unit long hai. Turns combine karna in arrow-objects ko multiply karna hai — aur agar tum woh multiply likhte ho, , tum literally "cosine of the sum, sine of the sum" formulas paate ho, toh multiply karna angles add karta hai. Ab real space mein jaao: ek turn ko yeh bhi kehna hota hai kaunsi pin ke around spin karta hai — ek axis arrow, exactly ek unit long rakha taaki woh sirf direction bataye, aur right-hand rule kehta hai "positive" kaunsi taraf ghoomta hai. Ek point rotate karne ke liye hum pehle use quaternion world mein ek pure object ke roop mein dalete hain (zero scalar part), phir hum discover karte hain ki ek single multiply ek scalar leak karta hai aur use barbaad kar deta hai — toh hum point ko aur uske inverse ke beech squeeze karte hain (sandwich), aur leaks cancel ho jaate hain. Ek unit quaternion ka inverse bas uska conjugate hai — teen vector signs flip karo. Kyunki object sandwich mein do baar act karta hai, har copy sirf aadha angle carry karta hai. Toh hum 2D arrow lete hain, half-angle use karte hain, aur iska "up" shadow 3D axis ke saath aim karte hain. Yeh chaar numbers build karta hai: ek how-much-nothing ke liye (cosine), teen aimed twist ke liye (sine along the axis). Charon ko square karo aur add karo: axis-part mein collapse ho jaata hai kyunki axis unit length hai, aur jo bachta hai woh hai cosine-squared plus sine-squared same half-angle ka — jo hai. Toh har real rotation smooth 4D ball-surface par ek point hai: koi corners nahi matlab koi jamming nahi. Aur kyunki sandwich do copies use karta hai, har sign flip karna kuch nahi badalta — same spin ke do naam hote hain, jinhe tum handle karte ho jab rotations blend karo taaki spacecraft short taraf se ghoomey.
Recall Cover me: "=1" kahan se aaya, do jagah?
::: Unit axis se (, Step 3) jo sine terms collapse karta hai, aur se (Step 1) same half-angle par jo bachta hai.
Recall Cover me: single multiply
se kyun rotate nahi kar sakte? ::: Yeh ek nonzero scalar part produce karta hai, toh result ab pure 3D vector nahi raha (aur uski length bhi change ho jaati hai). Doosra factor us leak ko cancel karta hai — isliye two-sided sandwich zaroori hai.
Related builds: Axis-Angle Representation · Quaternion Kinematics — dq/dt · Spacecraft Attitude Determination · Rotation Matrices SO(3).