Visual walkthrough — Singular Value Decomposition (SVD) — full derivation
4.5.40 · D2· Maths › Linear Algebra (Full) › Singular Value Decomposition (SVD) — full derivation
Hum sab kuch ground up se banate hain. Agar aapne kabhi matrix ko space par "act" karte nahi dekha, Step 0 se shuru karo aur skip mat karo.
Step 0 — "Ek matrix space par act karti hai" ka matlab kya hai?
KYA. Ek matrix ek machine hai. Aap isme ek arrow (vector ) daalte ho, woh doosra arrow nikaalti hai. Ek saath har arrow daalne par hum dekh sakte hain ki woh poori shape ka kya karta hai.
YE YAHAN SE SHURU KYON. SVD ka har claim is machine ke shape-changing behaviour ke baare mein hai. Koi bhi symbol aane se pehle hume input shape aur output shape picture karna aana chahiye.
PICTURE. Unit circle lo — saari length wali arrows, har direction mein point karti hui. Dekho iske saath kya karta hai.

Poori derivation jis bade sawaal ka jawaab deti hai:
Step 1 — Woh do frames jo hum dhundh rahe hain
KYA. Hume do special sets of perpendicular arrows chahiye:
- input circle mein — woh arrows jo ellipse ke axes par exactly utarenge.
- output mein — unit arrows un axes ki direction mein point karte hue.
- — har axis kitni lambi hai (stretch amounts).
KYO. Agar hum yeh dhundh lein, toh machine completely ek sentence se describe ho jaati hai: ", ko ek -guna lamba arrow direction mein bhejta hai." Baaki sab bookkeeping hai.
PICTURE. Wohi circle-to-ellipse, ab special arrows draw karke.

Target relationship, term by term:
Zor se padho: " ka par act karna times ke barabar hai." Page ke baaki hisse ke liye hamaara kaam: sabit karo ki aise hamesha exist karte hain aur unhe dhundho.
Step 2 — ko directly attack nahi kar sakte, isliye banate hain
KYA. rectangular ho sakta hai, tilted ho sakta hai, perpendicular eigen-arrows ke bina — pakadna mushkil. Toh hum ek friendlier matrix banate hain: . Yahan (padho " transpose") ko uske diagonal ke across flip karna hai.
YEH TOOL KYO AUR KOI NAHI. Hume ek aisi matrix chahiye jiske paas guaranteed perpendicular special directions hon. Ek matrix ke paas perpendicular eigen-arrows ka full set hota hai exactly jab woh symmetric hoti hai (woh Spectral Theorem hai). Aur hamesha symmetric hoti hai — proof picture mein. Yahi poora reason hai ki hum iske through detour lete hain.
PICTURE. symmetric kyon hai? Ise flip karne se kuch nahi badalata.

Term by term: order flip karta hai; ek flip ko undo karta hai. Result wohi nikaalta hai jisse shuru kiya — yahi symmetric ki definition hai.
Step 3 — ke eigen-arrows hamare ban jaate hain
KYA. ke liye eigen-problem solve karo: perpendicular unit arrows aur numbers dhundho jaise ki Phir define karo .
KYO. Ek eigenvector ek aisa arrow hai jise matrix rotate nahi karta — sirf se scale karta hai (dekho Eigenvalues and Eigenvectors). Yeh un-rotated, mutually perpendicular arrows exactly woh special input directions hain jo Step 1 mein dhundhe the. Symbol (Kronecker delta) sirf shorthand hai: jab , otherwise — yeh kehta hai "perpendicular unit arrows".
PICTURE. har ko same direction mein rakhta hai, sirf scale karta hai.

Arrows ko order karo taaki . Yahan rank hai: non-zero stretches ki count. Arrows ko side by side stack karne se matrix milti hai, jo orthogonal hai () kyunki iske columns perpendicular unit arrows hain.
Step 4 — Har ko ke through push karke paao
KYA. Har ke liye jahan , define karo
se divide kyon? sahi direction mein point karta hai (ellipse axis ke along) lekin galat length hai. Yeh kitna lamba hai? Compute karo: Term by term: arrows regroup karo; Step 3 ki eigen-equation substitute karo; use karo. Toh . se divide karne par yeh length par rescale ho jaata hai — ab yeh ek legit unit direction hai. Yahan bhi kaam aata hai: , ek clean stretch.
PICTURE. Dekho (length ) par jaata hai, phir unit arrow tak shrink hota hai.

Kya ek doosre ke perpendicular hain? Haan — ke liye check karo: Aakhri equality isliye hold karti hai kyunki (Step 3 ki perpendicularity). Toh perpendicular unit arrows hain.
Step 5 — Output basis complete karo (bache hue directions)
KYA. Hamare paas hain (har non-zero ke liye ek). Agar output space , se bada hai, toh bhi hume chahiye ise fill karne ke liye. Hum unhe Gram-Schmidt Process se invent karte hain: gaps fill karne ke liye koi bhi arrows choose karo, phir unhe perpendicular unit arrows mein straighten karo.
KYO. ek poori orthogonal matrix (ek complete frame) honi chahiye, chahe sirf output ke ek -dimensional slice tak pahunche. Extra 's un directions mein point karte hain jahan kabhi nahi pahunchta — left null space.
PICTURE. Do reached axes plus ek unreached direction jo 3D space complete karta hai.

Sab ko stack karne par milta hai, construction se orthogonal. Step 3 ke ke saath, yeh Four Fundamental Subspaces ke char bases hain.
Step 6 — assemble karo
KYA. Single fact (har ke liye sach: jab toh dono sides zero arrow hain) ko ek matrix equation mein collect karo.
KYO. Har column ke saath same cheez karna hi matrix multiplication hai. ko columns mein stack karna: Yahan ek box hai jisme uske diagonal par hain ( jaisi shape — yeh generally square nahi hoti), taaki , ke aage place kare.
Dono sides ko se right-multiply karo. Kyunki orthogonal hai, (rotate karke un-rotate karna kuch nahi badalata):
PICTURE. Famous three-move factory: input frame → turn () → stretch () → turn () → output.

Moves right to left padho (woh order jisme woh ek input ko mein hit karte hain):
- : input ko rotate karo taaki special arrows coordinate axes ke saath align karein.
- : axis ko se stretch karo (aur kisi bhi axis ko par squash karo jiske liye ).
- : stretched result ko uske final resting frame mein rotate karo.
Step 7 — Degenerate cases (kuch bhi chance par nahi chhoda)
KYA AUR KYO. SVD claim karta hai ki har matrix ke liye kaam karta hai. Toh hume ugly inputs se bachna hai. Har ek ka ek panel neeche hai.

Ek-picture summary

Is page ki poori cheez ek hi diagram mein: perpendicular input frame → har ek se stretch → perpendicular output frame par utarta hai, ellipse trace karta hua. Do frames plus stretch numbers hi SVD hain.
Recall Feynman retelling — plain words mein bolo
Ek matrix ek machine hai jo unit circle ko ellipse mein badal deti hai. Ellipse ka ek lamba axis aur ek chhota axis hota hai — dikhne mein sirf yahi special directions hain. Mujhe jaanna hai ki kaun se input arrows un axes par gaye aur kitna badhke gaye. Raw matrix se seedha poochna zyada mushkil hai, isliye mein banata hoon, jiske paas guaranteed perpendicular un-rotated arrows ka set hota hai (yahi symmetry kharidte waqt milta hai). Unke scaling numbers hain; mein true stretches paane ke liye square roots leta hoon. Har ko ke through push karke aur length ek par rescale karke output axes milte hain — aur kyunki mein unhe is tarah define karta hoon, unke signs aur pairing automatically sahi aa jaate hain. Jo bhi output directions missing hain unhe Gram–Schmidt se pad out karta hoon. Single fact " sends to " ko column by column assemble karke, aur ek rotation undo karke, milta hai: turn, stretch, turn. Zero stretches ka matlab sirf yeh hai ki kuch input arrows ek point par crush ho gaye — woh null space hai, aur theorem bina kisi shikayat ke ise absorb kar leta hai.
Recall
ki jagah ke through detour kyon lete hain? ::: Kyunki hamesha symmetric aur PSD hoti hai, isliye Spectral Theorem perpendicular eigen-arrows aur non-negative eigenvalues guarantee karta hai — khud aisi koi guarantee nahi deta. Kaun sa single fact, columns mein stack hoke, poora SVD deta hai? ::: sabhi ke liye, jo mein stack hota hai, isliye . Unit circle kis geometric object par map hoti hai, aur uske axes kya hain? ::: Ek ellipse par; uske semi-axis lengths singular values hain aur axis directions left singular vectors hain.