Worked examples — Singular Value Decomposition (SVD) — full derivation
4.5.40 · D3· Maths › Linear Algebra (Full) › Singular Value Decomposition (SVD) — full derivation
Neeche sab kuch parent recipe pe lean karta hai: the four-step SVD recipe. Jab hum "form " kehte hain toh humara matlab hai Positive Semi-Definite Matrices ka gateway, jiska eigenbasis Spectral Theorem se aata hai.
Scenario matrix
Har matrix jo tumhe di ja sakti hai in case classes mein se ek mein aati hai. Last column batata hai kaunsa worked example us cell ko cover karta hai.
| # | Case class | Kya cheez tricky banati hai | Covered by |
|---|---|---|---|
| C1 | Square, full-rank, symmetric | Kya eigenvalues ke barabar hote hain? Signs! | Example 1 |
| C2 | Square, negative eigenvalue | lekin | Example 2 |
| C3 | Square, complex eigenvalues (rotation-like) | ke koi real eigenvectors nahi hain | Example 3 |
| C4 | Diagonal with mixed signs | Kya sirf $ | A |
| C5 | Tall, rank-deficient (, ) | Zero , null space, extend | Example 5 |
| C6 | Wide, full row rank (, ) | Null space 's mein rehta hai | Example 6 |
| C7 | Wide, rank-deficient (, ) | Zeros DONO 's aur 's mein | Example 7 |
| C8 | Zero / degenerate matrix | , limiting case | Example 8 |
| C9 | Word problem (data / stretching) | se geometry padho | Example 9 |
Notation reminder, taaki koi symbol unearned na rahe:
- = transpose: ko uske diagonal ke across flip karo (rows columns ban jaati hain).
- = vector ki length, .
- agar , warna (the "kya ye same index hain?" switch).
- = determinant; solve karne se ke eigenvalues milte hain (dekho Eigenvalues and Eigenvectors).
- = rank = nonzero singular values ki sankhya = woh truly independent directions jinhe rakhta hai.
- aur : upar callout mein define hain.
Example 1 — C1: symmetric, full-rank square
Forecast: singular values padhne se pehle guess karo. Diagonal, positive... kya sirf copy kar leta hai?
- form karo. Ye step kyun? Parent recipe ka safe symmetric gateway hai.
- Eigenvalues. Already diagonal: . So . Ye step kyun? ; biggest-first order karne ka matlab hai .
- banao. ka eigenvector hai; ka . So . Ye step kyun? Humein ko ke same order mein list karna hai.
- define karo. ; . So . Ye step kyun? se define karna sahi sign lock karta hai (parent ke "sign trap" se bachata hai).
Verify: ✓ Note karo 's ko ki entries se reorder kiya gaya — copy karna automatic nahi hai.
Example 2 — C2: ek negative eigenvalue
Forecast: ka eigenvalue hai. Kya koi singular value hoga?
- form karo. . Ye step kyun? Square karne se sign khatam ho jaata hai — yahi to poora point hai.
- ke eigenvalues: . So . Ye step kyun? hamesha, unlike .
Verify: , na ki . Reflection (negative eigenvalue) ke andar store hota hai, mein nahi. Sanity: . ✓ Ye parent ke mistake box ka direct jawab hai: singular values kabhi ke eigenvalues nahi hote.
Example 3 — C3: complex eigenvalues (ek rotation)
Forecast: ek rotation har vector ko bina uski length badlaye ghuma deta hai. kya hone chahiye?

Figure s01 (Example 3). Left: inputs ka blue unit circle. Right: apply karne ke baad wahi circle (red) — abhi bhi unit circle hai, aur yellow arrow ek input ko same length pe land karte dikhata hai. Ise step 3 mein use karo: koi bhi direction stretch nahi hota, isliye har .
- Trap yaad karo. ke eigenvalues hain — complex, isliye ke koi real eigenvectors nahi hain. ke upar Eigen-decomposition fail ho jaati hai. SVD ko koi farak nahi padta. Ye step kyun? Ye motivate karta hai ki kyun (real, symmetric) humein bachata hai.
- form karo. Koi bhi rotation ye satisfy karta hai: , isliye . Ye step kyun? Rotation ke columns orthonormal hote hain, identity dete hain.
- ke eigenvalues: characteristic polynomial hai, ek repeated root (multiplicity two). So . Ye step kyun? : ek rotation kuch bhi stretch nahi karta — figure s01 se match.
- banao. ke saath, koi bhi orthonormal kaam karega — lo. Phir , isliye . Ye step kyun? hai, isliye trivially. Puri matrix rotation mein chhup jaati hai.
Verify: aur dono singular values ke barabar hain (characteristic polynomial ka ek hi distinct root hai). Geometrically, figure s01 mein red circle kabhi bada nahi hua. ✓
Example 4 — C4: mixed signs ke saath diagonal
Forecast: kaunsi entry ban jaayegi?
- form karo. Diagonal squared: . Ye step kyun? Gateway; diagonals entrywise square hote hain.
- Eigenvalues . Rank . Ye step kyun? Biggest-first order karo: .
- : columns standard basis ko reorder karke match karo — . Ye step kyun? ke columns ke same order mein appear hone chahiye — carries , carries , aur carries , isliye ye ke saath line up hote hain.
- : ; ; se complete karo. Ye step kyun? mein sign ki negative entry absorb karta hai.
Verify: singular values hain sorted — absolute values, phir descending. ✓
Example 5 — C5: tall, rank-deficient
Forecast: doosra column pehle ka exactly do guna hai... kitne nonzero honge?
- form karo. . Ye step kyun? hai (square nahi), isliye iske apne eigenvalues nahi hain; ek symmetric gateway hai jise hum diagonalize kar sakte hain.
- Eigenvalues: . So . Rank . Ye step kyun? Ek zero eigenvalue dependent columns confirm karta hai.
- : ke liye: , isliye . ke liye: . Ye step kyun? (with ) null space span karta hai: .
- : . Phir Gram–Schmidt se tak extend karo; jaise , . Ye step kyun? left null space span karte hain — wo directions jinhe kabhi reach nahi karta.
Verify: . ✓ Aur . ✓
Example 6 — C6: wide, full row rank
Forecast: output () se zyada input directions () hain. Extra dimension kahan jaati hai?
- form karo (): . Ye step kyun? hamesha hota hai; yahan wo hai.
- Eigenvalues . Rank . Ye step kyun? , biggest-first order karo; ek zero eigenvalue batata hai ki ek input direction kill ho jaati hai, chahe dono rows independent hon.
- : ( direction ka hai). Ye step kyun? null direction hai: .
- (): ; . . Ye step kyun? Sirf left singular vectors chahiye aur hai, isliye already complete hai.
- hai: . Ye step kyun? ka shape leta hai — parent ka teesra mistake box.
Verify: : mein rows hain. Reconstruction wapas deta hai. Check karo ki squared entries ka sum (Frobenius). ✓
Example 7 — C7: wide AUR rank-deficient
Forecast: wide aur rows dependent hain. Kitne nonzero honge, aur total mein kitni zero directions hongi?
- form karo (): . Ye step kyun? Safe gateway; ye do zero eigenvalues expose karega (ek wide shape se, ek dependent rows se).
- Eigenvalues: top-left block deta hai ; teesri row/column ek aur contribute karta hai. So . Rank . Ye step kyun? Sirf ek nonzero singular value bachta hai — matrix truly ek hi direction rakhti hai.
- : ke liye: , isliye . Null space ( span karta hai) hai . Ye step kyun? dono satisfy karte hain — ek wide rank-deficient matrix ka pura -dimensional null space.
- (): . se complete karo. Ye step kyun? left null space span karta hai; us output direction ko kabhi reach nahi karta.
Verify: . ✓ Dono aur . ✓ Do zero directions double confirm karte hain.
Example 8 — C8: zero / degenerate matrix
Forecast: ek matrix jo sab kuch origin pe bhej deti hai. kya hoga?
- form karo . Ye step kyun? Ek fully degenerate matrix bhi usi gateway se guzarti hai; abhi bhi symmetric hai aur iske eigenvalues abhi bhi dete hain.
- Eigenvalues dono . Rank . Ye step kyun? Kisi bhi direction mein koi stretching nahi — total collapse.
- : hai, isliye koi bhi orthonormal kaam karega; lo. Ye step kyun? ke saath hum kabhi use nahi kar sakte ( se division), isliye hum freely ek orthonormal completion choose karte hain — parent ka Gram–Schmidt extension extreme case mein.
Verify: . ✓ Ye har shrink karne ki limit hai: geometry ek point pe degenerate ho jaati hai.
Example 9 — C9: ek word problem (stretching data)
Forecast: unit pe ka sabse bada possible value exactly hai — guess karo.

Figure s02 (Example 9). Left: possible unit inputs ka blue unit circle, best direction (yellow) aur erased direction (red) ke saath. Right: ke baad, circle -axis par half-length ke red flat segment mein collapse ho jaata hai; yellow arrow maximal stretch hai, aur origin pe land karta hai. Part (a) yellow arrow ki length se aur part (b) red arrow se padho.
- Model. Max amplification ; erase hoti directions ka hota hai. Ye step kyun? Ye singular values ka operational meaning hai.
- form karo . Ye step kyun? Gateway phir: iske top eigenvalue ka square root precisely wahi maximal amplification factor hai jo poocha gaya, aur iska zero eigenvalue erased direction flag karta hai.
- Eigenvalues: . So . Ye step kyun? (a) ka jawab hai; ek erased direction flag karta hai.
- Right vectors: : , . : . Ye step kyun? woh input direction hai jiska hai: (b) ka jawab.
Verify (a): best input dalo: , length . ✓ Verify (b): — direction (yaani ke ) erase ho jaati hai. ✓ Figure s02 dekho: blue unit circle -axis par half-length ke red flat segment ban jaata hai; perpendicular blue arrow origin pe land karta hai.
Recall Har example ne kaunsa cell solve kiya?
C1→Ex1, C2→Ex2, C3→Ex3, C4→Ex4, C5→Ex5, C6→Ex6, C7→Ex7, C8→Ex8, C9→Ex9. ::: Scenario matrix ki har row cover ho gayi, including wide-full-rank aur wide-rank-deficient dono.
Ye related pages iske baad revisit karne layak hain: Low-Rank Approximation (sirf top rakho), Principal Component Analysis (PCA) (centred data ka SVD), aur Moore-Penrose Pseudoinverse (nonzero par se invert karo).