3.5.6 · D1 · Physics › Guidance, Navigation & Control (GNC) › Quaternions — definition q = (q₀, q₁, q₂, q₃), unit quaterni
Ek 3D rotation poori tarah do cheezein se describe hoti hai: ek direction jiske around spin karein (ek arrow) aur kitna twist karein (ek angle). Quaternion bas 4 numbers ka ek seedha-saada daabba hai jo dono ek saath store karta hai, aur ek rule se honest rehta hai — charon numbers ko square karke add karo to exactly 1 aana chahiye.
Neeche sab kuch woh vocabulary hai jo tumhe chahiye is sentence ka poora matlab samajhne se pehle: axis kya hai, angle kya hai, "squared and added to 1" ka geometrically kya matlab hai, aur 4 numbers 3-way freedom ko kyun describe karte hain.
Is page par kuch bhi assume nahi kiya gaya . Hum har woh symbol banate hain jo parent note (parent topic) use karta hai, ek-ek karke, har ek ko ek picture se anchor karke.
Sabse simple object se shuru karo: ek akela number, jaise 3 ya − 2 . Ise ek line par ek point ki tarah picture karo. Yeh ek scalar hai — ek akela number bina kisi direction ke, bas ek size (aur ek sign).
Ab teen numbers ek saath stack karo: ( x , y , z ) . Ek arrow picture karo jo origin se shuru hokar x steps east, y steps north, z steps upar wale point tak pahunchta hai. Woh arrow ek vector hai. Hum yaad dilane ke liye uske upar ek chhota hat ya arrow banate hain ki woh kuch point kar raha hai: v .
Definition Scalar vs vector
Scalar s : ek number. Picture = ek line par ek point. Iska sirf magnitude (size) hota hai.
Vector v = ( x , y , z ) : teen numbers ek saath bundled. Picture = space mein ek arrow. Iska magnitude aur direction dono hote hain.
Topic ko dono kyun chahiye: ek rotation ek scalar carry karta hai (kitna twist karte ho) AUR ek vector (spin-axis kis taraf point karta hai). Quaternion q = ( q 0 , q v ) literally "ek scalar ek vector se chipka hua" hai.
Arrow ko phir se dekho. Yeh kitna lamba hai? Agar yeh x east aur y north jaata hai (ek second ke liye flat plane mein raho), toh arrow ek right triangle ka hypotenuse hai jiske legs x aur y hain.
Intuition Kyun square karte hain, add karte hain, aur square-root lete hain
Ek right triangle ka rule hai ( leg ) 2 + ( leg ) 2 = ( hypotenuse ) 2 . Toh arrow ki length x 2 + y 2 hai. 3D mein hum bas teesra leg z usi root ke neeche add kar dete hain. Squaring negative signs hata deta hai (length negative nahi ho sakti aur left-vs-right matter nahi karna chahiye); square root squaring ko undo karke ek honest length deta hai.
Ek unit vector ek arrow hai jis ki length exactly 1 hoti hai, jise hat se likha jaata hai: n ^ . Iska kaam sirf direction carry karna hai — yeh koi size add kiye bina ek taraf point karta hai.
Kisi bhi arrow ko unit vector banana ho toh use apni length se divide karo ("normalize " karo): v ^ = v / ∥ v ∥ .
Topic ko iska kyun zaroori hai: ek spin-axis ek pure direction hai — "is taraf spin karo." Isliye axis n ^ = ( n x , n y , n z ) hamesha ek unit vector hota hai, matlab n x 2 + n y 2 + n z 2 = 1 . Is baat ko yaad rakhna; baad mein yahi quaternion norm ko 1 banata hai.
Ek angle θ (Greek letter "theta") measure karta hai kitna turn kiya . Ek clock ki suii ko ek position se doosri position par sweep karte hua picture karo. Ek poora chakkar 36 0 ∘ ya 2 π radians hota hai.
Definition Sine aur cosine, circle par
Ek unit circle (radius 1) banao. Ek point ko angle θ se uske around sweep karo. Phir:
cos θ = point ka horizontal coordinate.
sin θ = point ka vertical coordinate.
Kyunki point radius-1 circle par hai, Pythagoras woh identity deta hai jo tum baar baar use karoge:
cos 2 θ + sin 2 θ = 1.
Quaternion product formula do vector products use karta hai. Dono se milo.
Definition Dot product (scalar-valued)
p ⋅ q = p x q x + p y q y + p z q z
Matching parts multiply karo, unhe add karo — jawab ek akela number hota hai (ek scalar).
Picture: do arrows kitna same taraf point karte hain. Same direction → bada positive; perpendicular → zero; opposite → negative.
Definition Cross product (vector-valued)
p × q = ek naya arrow jo p aur q dono ke perpendicular ho.
Jawab khud ek vector hota hai, jo dono inputs ke plane se sideways nikal raha hota hai.
Picture: apne right-hand ki ungliyaan p se q ki taraf point karo; thumb p × q deta hai.
Tumne pehle ek imaginary unit dekha hoga: i jisme i 2 = − 1 (dekho Complex Numbers as 2D Rotations ). Quaternions mein teen hote hain: i , j , k .
Definition Imaginary units
Har ek − 1 tak square hota hai: i 2 = j 2 = k 2 = − 1.
Ek cycle mein multiply karne par yeh wrap around karte hain: ij = k , j k = i , k i = j (aur order reverse karne par sign flip ho jaata hai).
Picture: i , j , k ko teen perpendicular axes ki tarah sochno; dono ko multiply karne par tumhara "turn" teesre par ho jaata hai — ek right-hand cycle. Cycle reverse karo, minus sign milega.
Poora quaternion phir likha jaata hai q = q 0 + q 1 i + q 2 j + q 3 k , ya compactly q = ( q 0 , q v ) jahan q v = ( q 1 , q 2 , q 3 ) ek plain arrow hai aur q 0 ek plain scalar. Letters i , j , k bas bookkeeping tags hain jo bata rahe hain "yeh number vector part ka hai."
Common mistake "Vector part
( q 1 , q 2 , q 3 ) hi spin-axis hai."
Kyun sahi lagta hai: dono 3-number bundles hain.
Fix: axis n ^ ek unit vector hai; quaternion ka vector part n ^ sin 2 θ hai — axis scaled sin 2 θ se. Dono same taraf point karte hain lekin alag lengths hain.
Iisse pehle ki hum "rotation apply karo" bhi bol sakein, hume woh operations chahiye jo quaternions par act karte hain. Inhe abhi milte hain — neeche kuch bhi inhen use nahi karta jab tak yahan define na ho jaayein.
Definition Hamilton product
⊗
⊗ woh special tarika hai jisse tum do quaternions multiply karte ho. Yeh ordinary number multiplication NAHI hai — yeh Section 4 ke dot aur cross products use karke scalar aur vector parts ko mix karta hai:
p ⊗ q = ( p 0 q 0 − p ⋅ q , p 0 q + q 0 p + p × q ) .
Picture: 4-ka-daabba andar do, 4-ka-daabba bahar ek milta hai. p ⋅ q (ek number) scalar slot mein jaata hai; p × q (ek arrow) vector slot mein jaata hai.
Kyunki cross product inputs swap karne par sign flip karta hai (p × q = − q × p ), poora product non-commutative hai: generally p ⊗ q = q ⊗ p — bilkul real rotations ki tarah, jahan order matter karta hai.
q ∗
Conjugate sirf vector part ka sign flip karta hai:
q ∗ = ( q 0 , − q v ) = ( q 0 , − q 1 , − q 2 , − q 3 ) .
Picture: twist-amount rakhna, lekin spin-axis ko opposite taraf point karana — yeh rotation ka undo button hai.
q − 1
Inverse woh quaternion hai jo, multiply karne par, "kuch na karo" wala identity ( 1 , 0 ) deta hai:
q − 1 = ∥ q ∥ 2 q ∗ .
Unit quaternion ke liye (∥ q ∥ = 1 ) denominator 1 hai, isliye simplify hokar
q − 1 = q ∗ (bas 3 vector signs negate karo).
Kyun matter karta hai: rotation reverse karna sasta hona chahiye. Unit quaternions ke saath yeh bas teen sign flips hain — koi division nahi, koi matrix kaam nahi. Isliye spacecraft flight computers (Spacecraft Attitude Determination ) inhe pasand karte hain.
Ab jab ⊗ aur q − 1 exist karte hain, hum dekh sakte hain ki mysterious θ /2 kahan se aata hai.
Intuition Rotation sandwich
Arrow v ko actually rotate karne ke liye, tum ek baar multiply nahi karte — tumhe use sandwich karna padta hai:
v ′ = q ⊗ v ⊗ q − 1 .
Quaternion v ko dono taraf se touch karta hai, isliye iska rotation effect do baar apply hota hai. Agar ek q poora angle θ carry karta, toh sandwich 2 θ se rotate karta — bahut zyada. Isliye q ki har copy sirf aadha angle, θ /2 , carry karni chahiye, aur dono halve mil kar woh ek poora turn θ banate hain jo tum actually chahte ho.
Ab headline formula mein har symbol define ho chuka hai. Ise dheere se padho:
Intuition Kyun 4 numbers, 1 rule = 3 freedoms — 3-sphere picture
Chaar numbers ( q 0 , q 1 , q 2 , q 3 ) minus ek binding rule (∑ q i 2 = 1 ) 4 − 1 = 3 genuinely free choices deta hai — exactly woh 3 tarike jisme ek body rotate kar sakti hai (yaw, pitch, roll). Picture: ek unit quaternion ek point hai jo ek sphere ki surface par pinned hai , hamesha centre se distance 1 par. Ek surface ka dimension us space se ek kam hota hai jisme woh baith ti hai — ek 2D sphere-surface 3D mein rehti hai, aur hamara "3-sphere" surface 4D mein rehta hai. Tum 4D draw nahi kar sakte, isliye neeche wali figure honest 3D stand-in dikhata hai: ek ordinary ball jiska surface woh jagah hai jahan har valid rotation rehta hai.
Definition Do signs ek hi rotation hain (double cover)
Sandwich v ′ = q ⊗ v ⊗ q − 1 dekho. q ki jagah − q rakh do: minus signs dono sides par aate hain aur cancel ho jaate hain:
( − q ) ⊗ v ⊗ ( − q ) − 1 = q ⊗ v ⊗ q − 1 .
Toh q aur − q identical 3D rotation produce karte hain. Har real rotation isliye do quaternion points se name hota hai (3-sphere par antipodal). "Do-naam-ek-rotation" wala yeh fact S O ( 3 ) ka double cover kehlata hai — sphere rotations ka set do baar cover karta hai.
q aur − q alag rotations hone chahiye."
Kyun sahi lagta hai: yeh alag 4-tuples hain, toh surely alag outputs honge.
Fix: sandwich sign ko square kar deta hai. − q usi physical turn ka bas doosra naam hai.
θ = 0 : axis gayab ho jaata hai
Zero rotation par, q = ( cos 0 , n ^ sin 0 ) = ( 1 , 0 ) . Vector part zero arrow hai, isliye axis n ^ ka koi asar nahi aur woh undefined hai — jo sahi bhi hai: "kuch spin mat karo" ko parwah nahi ki tum kis axis ke around nahi ghume. Yeh ( 1 , 0 ) identity quaternion hai, kuch-na-karo wala element.
θ = 18 0 ∘ (π ): scalar part gayab ho jaata hai
Half-turn deta hai cos 2 π = 0 , toh q = ( 0 , n ^ ) — ek pure vector quaternion, scalar part zero. Yahan q aur − q n ^ aur − n ^ ki taraf point karte hain: n ^ ke around 18 0 ∘ spin karna usi jagah pahunchata hai jahan − n ^ ke around 18 0 ∘ spin karta. Double cover clearly nazar aata hai — exactly half-turn par axis sign genuinely ambiguous hai, aur yeh theek hai kyunki dono same result dete hain.
Quaternion q = q0 plus vector part
cos and sin on unit circle
Cross product - a new arrow
Hamilton product times operator
Double cover q and minus q
Unit constraint sum of squares = 1
Represents a real 3D rotation
Yeh map seedha Axis-Angle Representation , Rotation Matrices SO(3) , Euler Angles and Gimbal Lock , aur baad mein Quaternion Kinematics — dq/dt aur Spacecraft Attitude Determination mein feed hota hai.
Right side cover karo aur khud se test karo — tum parent note ke liye ready ho jab sab cleanly reveal ho jaayein.
Scalar kya hai... ek akela number; picture = ek line par ek point, sirf magnitude.
Vector ( x , y , z ) kya hai... origin se ek arrow; magnitude aur direction dono.
v = ( x , y , z ) ki length kya hai...∥ v ∥ = x 2 + y 2 + z 2 (3D Pythagoras).
Unit vector kya hai... ek arrow jis ki length exactly 1 ho, n ^ likhte hain; sirf direction carry karta hai.
Vector normalize karne ke liye... use apni length se divide karo,
v ^ = v / ∥ v ∥ .
cos θ aur sin θ kya hain...unit circle ke around angle θ sweep kiye gaye point ke horizontal aur vertical coordinates.
Inhe jodne wali identity kya hai... cos 2 θ + sin 2 θ = 1 .
Dot product p ⋅ q deta hai... ek number : p x q x + p y q y + p z q z ; shared direction measure karta hai.
Cross product p × q deta hai... ek vector dono ke perpendicular; order swap karne par sign flip hota hai.
Units kya obey karte hain... i 2 = j 2 = k 2 = − 1 aur ij = k , j k = i , k i = j .
⊗ operator kya hai...Hamilton (quaternion) product; non-commutative; scalar part
p 0 q 0 − p ⋅ q , vector part
p 0 q + q 0 p + p × q .
Conjugate q ∗ kya hai... ( q 0 , − q v ) — vector part flip karo; undo direction.
Unit quaternion ka inverse kya hai...q − 1 = q ∗ (kyunki ∥ q ∥ = 1 ), bas teen sign flips.
Rotation sandwich kya hai... v ′ = q ⊗ v ⊗ q − 1 — q do baar act karta hai, isliye angle half kiya jaata hai.
Half-angle θ /2 kyun... do-sided sandwich q ko do baar apply karta hai, isliye har copy aadha turn carry karti hai.
q aur − q represent karte hain...same rotation (double cover); signs sandwich mein cancel ho jaate hain.
θ = 0 par quaternion kya hai...( 1 , 0 ) , identity; axis undefined hai (kuch spin nahi kiya).
θ = 18 0 ∘ par scalar part kya hai...q 0 = cos 9 0 ∘ = 0 ; ek pure-vector quaternion, axis sign ambiguous.
Vector part vs axis... vector part = n ^ sin 2 θ (axis scaled ), bare axis nahi.
Kyun 4 numbers, 1 rule... 4 − 1 = 3 free values = 3 rotational DOF; point unit 3-sphere par rehta hai.