4.5.40 · D1 · Maths › Linear Algebra (Full) › Singular Value Decomposition (SVD) — full derivation
Koi bhi matrix, chahe kitni bhi "ugly" ho, secretly sirf rotate → stretch → rotate hai. "A = U Σ V ⊤ " sentence padhne ke liye tumhe sirf teen characters samajhne hain: do rotations (U aur V ) aur ek pure stretch (Σ ) — yeh page woh har symbol build karta hai jo tumhe yeh picture zero se dekhne ke liye chahiye.
Yeh Singular Value Decomposition (SVD) — full derivation ka prerequisite page hai. Pehle ise padho. Hum har woh symbol name karenge jo parent note tumhare upar fire karta hai, uske peeche ki picture draw karenge, aur explain karenge kyun derivation uske bina aage nahi badh sakti .
Poore page mein, do families of special vectors par dhyan rakho: v 1 , … , v n (right singular vectors , V ke columns, input space mein rehte hain) aur u 1 , … , u m (left singular vectors , U ke columns, output space mein rehte hain). Inhe hum §5 mein carefully define karte hain; jab neeche ke "Why" bullets inhe mention karein, abhi ke liye inhe "woh special input/output directions jo SVD produce karega" samjho.
Definition Matrix = ek machine jo arrows move karti hai
Ek matrix A numbers ka ek grid hai, lekin iska asli matlab hai ek function jo ek vector khaata hai aur ek vector ugalta hai . Isko ek arrow x do, yeh tumhe ek (possibly rotated, stretched, squished) arrow A x wapas deta hai.
Simple words mein: rows aur columns of numbers.
The picture: space ka ek transformation. Pehle arrows ka ek grid; wahi arrows baad mein move ho gaye.
Topic ko iske kya zaroorat hai: SVD ek claim hai ki yeh machine space ke saath kya karti hai — yeh kehta hai ki messy motion hamesha "spin, stretch, spin" hoti hai. Toh pehle humein matrix ko motion ki tarah dekhna hoga, spreadsheet ki tarah nahi.
Figure s01 (below): wahi arrows ka grid do baar dikhaya gaya — left mein untouched, aur right mein machine A ke act karne ke baad. Amber aur white arrows do coordinate axes hain; notice karo ki woh tilt aur stretch hote hain, jo prove karta hai ki A space ka motion hai, spreadsheet nahi.
Shape notation. Hum likhte hain A ∈ R m × n .
A ∈ R m × n
R = real numbers (ordinary decimals jaise 3 , − 1.5 , 2 ).
m × n = "m rows, n columns".
The picture: machine un arrows ko leta hai jo n -dimensional input space mein rehte hain aur m -dimensional output space mein arrows produce karta hai. Input mein n coordinates hain, output mein m .
Why: SVD ka poora point yahi hai ki m aur n alag ho sakte hain — input aur output spaces alag-alag rooms hain, isliye humein do sets of directions chahiye, ek har room ke liye.
Ek vector x origin se ek arrow hai: coordinates ki ek list x = ( x 1 , x 2 , … , x n ) ⊤ jo batati hai ki har axis ke along kitna chalna hai. Chhota ⊤ (transpose ) yahan bas matlab hai "is row ko ek column ki tarah khada kar do".
The picture: space mein ek arrow jiske paas length aur direction hai.
Topic ko iske kya zaroorat hai: SVD poori tarah ek story hai ki A arrows ke saath kya karta hai — yeh har special input arrow ko ek stretched output arrow mein badal deta hai. Vectors nahi, toh story nahi.
A ⊤
Transpose ek matrix ko uske diagonal ke across flip karta hai: row i column i ban jaati hai. Agar A m × n hai toh A ⊤ n × m hai.
The picture: grid ko ek mirror ke saamne rakh do jo top-left se bottom-right diagonal ke along rakha gaya ho.
Topic ko iske kya zaroorat hai: poori derivation object A ⊤ A par built hai. Transpose ke bina koi derivation nahi.
A ⊤ A parent ke proof ki line one par appear hota hai, isliye tumhe isme fluent hona chahiye.
Definition Dot product aur length
Do vectors ka dot product hai x ⊤ y = x 1 y 1 + x 2 y 2 + ⋯ + x n y n — matching coordinates multiply karo, unhe add karo. Apna khud ka dot product squared length deta hai:
∥ x ∥ 2 = x ⊤ x = x 1 2 + ⋯ + x n 2 .
∥ x ∥ (double bars ke saath) arrow ki length (norm) hai — Pythagoras ke hisaab se origin se tip tak straight-line distance.
Topic ko iske kya zaroorat hai: proof line ∥ A v ∥ 2 = ( A v ) ⊤ ( A v ) = v ⊤ A ⊤ A v kuch nahi hai sirf dot-product-is-squared-length trick ke. Har singular value σ literally length ∥ A v ∥ nikalta hai — ek special input vector v ko stretch karne ke baad.
Figure s02 (below): ek arrow x = ( 3 , 2 ) cyan mein drawn horizontal aur vertical legs ke saath. Amber hypotenuse ∥ x ∥ hai; labels dikhate hain ki x ko apne aap se dot karna, x ⊤ x = x 1 2 + x 2 2 , Pythagoras hi hai — squared length.
Intuition Kyun dot product angle bhi measure karta hai
x ⊤ y = ∥ x ∥ ∥ y ∥ cos θ , jahan θ arrows ke beech ka angle hai. Do consequences jo hum baar baar use karte hain:
Agar x ⊤ y = 0 toh arrows perpendicular hain (cos 90° = 0 ).
x ⊤ x = ∥ x ∥ 2 (ek arrow apne saath 0 angle banata hai, cos 0 = 1 ).
Definition Orthonormal set
Vectors ka ek set orthonormal hota hai agar har vector ki length 1 ho (normal ) aur har pair perpendicular ho (ortho ). Compactly:
v i ⊤ v j = δ ij .
The picture: unit arrows ka ek set jo sab right angles par hain — axes ka ek clean, un-skewed set.
Topic ko iske kya zaroorat hai: SVD jo do frames produce karta hai (v 's aur u 's) unhe orthonormal hona required hai — yahi exactly hai jo U aur V ko rotations banata hai sloppy skews ki jagah.
Definition Identity matrix
I
I "kuch-nahi-karne-wali" machine hai: I x = x har arrow ke liye. Iske grid mein diagonal par 1 's hain, 0 's baaki jagah. Subscript I n ka matlab hai n × n version.
Definition Orthogonal matrix
Ek square matrix Q orthogonal hai agar iske columns ek orthonormal set form karte hain, equivalently Q ⊤ Q = I .
The picture: Q ek rigid motion hai — ek rotation ya reflection. Yeh kabhi stretch nahi karta, kabhi squish nahi karta; lengths aur angles preserve hoti hain. Isko ek square grid do, usi size ka ek rotated square grid milega.
Topic ko iske kya zaroorat hai: A = U Σ V ⊤ mein U aur V exactly yahi hain. V (columns = right singular vectors) aur U (columns = left singular vectors) dono orthogonal hain, isliye "SVD = rotate, stretch, rotate" ka matlab hai ki do rotations yeh orthogonal matrices hain.
Figure s03 (below): unit axes pehle (left) aur ek orthogonal matrix Q ke act karne ke baad (right). White unit circle unit circle hi rehta hai aur amber/cyan axes apni length aur right angle maintain karte hain — woh sirf rotate karte hain. Yeh U aur V ki picture hai.
Q ⊤ Q = I ka matlab "rotation" hai
Column i ko column j se dot karna Q ⊤ Q ki entry ( i , j ) hai. Q ⊤ Q = I demand karna kehta hai: har column unit length ka hai (δ ii = 1 ) aur doosron ke perpendicular hai (δ ij = 0 ). Perpendicular unit axes perpendicular unit axes rehti hain — yeh precisely ek rotation/reflection hai. Ek bonus: Q ⊤ Q = I ka matlab hai Q ⊤ = Q − 1 , isliye rotation ko undo karna free hai.
Pehle, woh word jis par hum aasra lene wale hain:
r (yahan naam diya gaya taaki σ r sense kare)
A ka rank r un genuinely independent output directions ki sankhya hai jo machine produce kar sakti hai — iske output image ki dimension. Poori picture aur "why" §4 mein; abhi ke liye bas r ko "kitne nonzero stretches hain" padho.
σ 1 ≥ σ 2 ≥ ⋯ ≥ σ r > 0 = σ r + 1 = …
Yahan σ r aakhri nonzero stretch hai — pehle r singular values positive hain aur baaki zero hain, jahan r wahi rank hai jo upar define ki gayi.
Vectors ke ek set ka span har woh arrow hai jo tum unhe scale aur add karke bana sakte ho. Ek plane mein do non-parallel arrows poore plane ko span karte hain; do parallel wale sirf ek line span karte hain.
The picture: arrows ko combine karke "reach ki ja sakne wali" poori region — ek line, ek plane, ya poora space.
Topic ko iske kya zaroorat hai: column space, row space aur null space sab chosen vectors ke spans hain; SVD ka payoff yeh hai ki yeh tumhe har ek ke liye clean orthonormal spanning sets de deta hai.
r (full version)
Output image ki dimension — independent directions ki sankhya jo A actually reach kar sakta hai.
The picture: machine ko poora input space do; output space mein jo shadow padta hai woh r -dimensional hai. Agar do rows ek doosre ki copies hain, toh ek direction waste ho jaati hai aur rank gir jaata hai.
Why: parent singular values ko σ 1 … σ r > 0 (real stretching) aur σ r + 1 ⋯ = 0 (woh directions jo machine flatten kar deti hai nothing mein) mein split karta hai.
Four Fundamental Subspaces woh chaar rooms hain jismein har matrix rehti hai. SVD tumhe ek saath chaalon ke liye orthonormal basis deta hai — isliye hum inhe yahan name karte hain.
A ka Null space
Sab input arrows x jiske liye A x = 0 — woh directions jo machine origin par crush kar deti hai .
The picture: input directions jo ek single point par flatten ho jaate hain.
Topic ko iske kya zaroorat hai: SVD mein yeh crushed directions exactly woh right singular vectors v i hain jinka σ i = 0 hai; inhe pehchanna explain karta hai ki kuch singular values kyun vanish hote hain.
A ka Row space
A ki rows ka span (equivalently A ⊤ ka column space) — input directions jo crush nahi hoti .
The picture: input space ka r -dimensional slice jo transformation se bachta hai.
Topic ko iske kya zaroorat hai: right singular vectors v 1 , … , v r (woh jo σ i > 0 wale hain) iske liye orthonormal basis form karte hain — SVD ke atlas ka input side.
A ka Left null space
Sab output-space arrows y jiske liye A ⊤ y = 0 — output directions jo A kabhi reach nahi kar sakta .
The picture: output space ka woh hissa jo khali reh jaata hai, column space ke perpendicular.
Topic ko iske kya zaroorat hai: bache hue left singular vectors u r + 1 , … , u m ise span karte hain, U ko ek full orthonormal basis mein complete karte hain.
Ab hum precisely define kar sakte hain jo top par promise kiya tha.
Definition Right singular vectors
v i aur matrix V
Right singular vectors v 1 , … , v n input space R n mein ek orthonormal set hain; side by side stack karne par yeh orthogonal matrix V = [ v 1 ∣ ⋯ ∣ v n ] banate hain.
The picture: clean input frame jo SVD choose karta hai — woh axes jinke along A ki action pure stretch hai.
Topic ko iske kya zaroorat hai: V ⊤ "rotate → stretch → rotate" mein pehla rotation hai; yeh tumhare input ko is special frame par spin karta hai.
Definition Left singular vectors
u i aur matrix U
Left singular vectors u 1 , … , u m output space R m mein ek orthonormal set hain; stack karne par yeh orthogonal matrix U = [ u 1 ∣ ⋯ ∣ u m ] banate hain.
The picture: clean output frame jahan SVD land karta hai — A v i ko σ i u i par bhejta hai.
Topic ko iske kya zaroorat hai: U doosra rotation hai; Σ se stretch karne ke baad, yeh result ko output space mein place karta hai.
Definition Eigenvector & eigenvalue
Ek square matrix M ka eigenvector v ek special arrow hai jiska direction machine nahi badalta — woh sirf ise scale karta hai: M v = λ v . Scale factor λ eigenvalue hai.
The picture: M se zyaadaatar arrows apni line se hat jaate hain; ek eigenvector apni line par hi rehta hai, bas longer ya shorter (ya flipped).
Why: derivation ka engine eigenproblem A ⊤ A v i = σ i 2 v i hai. A ⊤ A ke eigenvectors hi right singular vectors hain; eigenvalues hi squared singular values hain.
Poori detail Eigenvalues and Eigenvectors mein hai.
Definition Symmetric matrix
M symmetric hai agar M ⊤ = M (iska mirror image khud se equal hai). A ⊤ A hamesha symmetric hota hai kyunki ( A ⊤ A ) ⊤ = A ⊤ A .
Definition Positive semi-definite (PSD)
M PSD hai agar har x ke liye x ⊤ M x ≥ 0 ho. M = A ⊤ A ke liye yeh padhta hai x ⊤ A ⊤ A x = ∥ A x ∥ 2 ≥ 0 — ek squared length, hamesha non-negative.
Orthonormal u i ko full basis mein extend karne ke liye, parent Gram-Schmidt Process invoke karta hai — kisi bhi spanning set ko orthonormal mein badalne ki standard machine.
Symbol
Bol ke padho
Picture
SVD mein role
A
the matrix
space ka motion
woh cheez jo hum decompose karte hain
A ⊤
transpose
diagonal ke across mirror
A ⊤ A build karta hai
x ⊤ y
dot product
length & angle
σ i = ∥ A v i ∥ measure karta hai
δ ij
Kronecker delta
identity grid
orthonormality encode karta hai
U , V
orthogonal
rotations
do spins (left/right singular vectors)
Σ
diagonal
pure stretch
the singular values
λ i , v i
eigen-pair
invariant direction
σ i 2 aur right vectors
r
rank
output dimension
nonzero σ i ki count
Orthonormal sets and delta
Orthogonal matrices U and V
Symmetric matrix A-transpose-A
Eigenvalues and eigenvectors
SVD A = U Sigma V-transpose
Khud ko test karo — answer karne ke baad hi reveal karo.
Main A ∈ R m × n padh sakta hoon aur bata sakta hoon kaun sa space input hai, kaun sa output Input R n hai (n columns), output R m hai (m rows).
Main ek transpose A ⊤ compute kar sakta hoon Main diagonal ke across flip karo: row i column i ban jaati hai; ek m × n matrix n × m ban jaata hai.
Main squared length ko dot product ki tarah likh sakta hoon ∥ x ∥ 2 = x ⊤ x = x 1 2 + ⋯ + x n 2 .
Main jaanta hoon ki x ⊤ y = 0 geometrically kya matlab hai Dono arrows perpendicular hain.
Main bata sakta hoon δ ij kya equals karta hai 1 agar i = j hai, warna 0 .
Main ek orthogonal matrix do tarah se define kar sakta hoon Columns orthonormal hain; equivalently Q ⊤ Q = I (isliye Q ⊤ = Q − 1 ), ek rotation/reflection.
Main describe kar sakta hoon ki ek diagonal matrix space ke saath kya karta hai Har coordinate axis ko independently stretch karta hai, koi rotation nahi.
Main eigenvalue equation likh sakta hoon M v = λ v — direction preserved, length λ se scale hoti hai.
Main jaanta hoon kyun A ⊤ A symmetric aur PSD hai ( A ⊤ A ) ⊤ = A ⊤ A ; aur x ⊤ A ⊤ A x = ∥ A x ∥ 2 ≥ 0 .
Main jaanta hoon ki (real) Spectral Theorem mujhe kya deta hai Ek real symmetric matrix ke paas real eigenvalues ke saath orthonormal eigenbasis hota hai.
Main rank aur null space define kar sakta hoon Rank = output image ki dimension; null space = woh inputs jo 0 par bhej diye jaate hain.
Main chaar fundamental subspaces ke naam le sakta hoon Row space aur null space (input side), column space aur left null space (output side).
Taiyaar ho? Singular Value Decomposition (SVD) — full derivation par jaao. SVD samajhne ke baad related destinations: Low-Rank Approximation , Principal Component Analysis (PCA) , Moore-Penrose Pseudoinverse .