Exercises — Pseudoinverse
4.5.42 · D4· Maths › Linear Algebra (Full) › Pseudoinverse
Shuru karne se pehle, teen reminders jinpar tum baar baar rely karoge:
Level 1 — Recognition
L1.1 — Kaunsa formula?
Har matrix ke liye, uski shape batao, kya uski full column rank hai, full row rank hai, ya koi bhi nahi, aur tum teeno formulas mein se kaunsa use karoge.
Recall Solution
hai (tall). Iske do columns aur ek doosre ke multiples nahi hain, to yeh independent hain → full column rank (). Use karo .
hai (fat). Iske do rows aur independent hain → full row rank (). Use karo .
hai (square) lekin row 2 row 1, to rank hai, full nahi. Na aur na invertible hai → zaroor SVD formula use karna hoga.
L1.2 — Sach ya jhooth
- Agar square aur invertible hai to .
- hamesha identity ke barabar hota hai.
- Matrix symmetric hoti hai.
Recall Solution
- Sach — pseudoinverse inverse ko generalise karta hai; invertible square ke liye dono ek hi hain.
- Jhooth — sirf full column rank ke liye. Aam taur par row space par ek orthogonal projection hai, aur ek projection ki eigenvalue ho sakti hai.
- Sach — yeh Penrose Condition 3 hai: .
Level 2 — Application
L2.1 — Ek tall pseudoinverse compute karo
ke liye nikalo, phir ise use karke least-squares problem solve karo jahan ho.
Recall Solution
Shape check. , columns independent → Case 1, .
Step 1 — . ( mein ke columns uski rows ban jaate hain.) Step 2 — invert karo. Determinant . matrix ka inverse hota hai: Step 3 — se multiply karo. Step 4 — solve karo. To se guzarne wali best-fit line hai. Koi bhi line teeno points ko hit nahi kar sakti, isliye yeh least-squares answer hai — woh jo ko sabse chota banata hai.
L2.2 — Ek fat pseudoinverse compute karo
ke liye nikalo aur ka minimum-norm solution nikalo.
Recall Solution
Shape check. (fat), ek nonzero row → full row rank → Case 2, .
Step 1 — (ek number): . Step 2 — invert karo: . Step 3 — assemble karo: Step 4 — solve karo: Kyun yeh minimum-norm wala hai. ka har solution plus ke nullspace mein koi vector likh ke likha ja sakta hai — woh directions jinhe zero mein crush karta hai, yaani sabhi jahan (jaise ). Aisa add karne se unchanged rehta hai lekin sirf lamba hota hai, kyunki har nullspace vector ke perpendicular hai: . Isliye sabse chhota hai — woh jisme koi nullspace component waste nahi hoti.
Level 3 — Analysis
L3.1 — SVD se rank-deficient matrix
ke liye SVD formula use karke compute karo, aur verify karo .
Recall Solution
SVD padho. pehle se diagonal hai, isliye ( identity), . Singular values hain , (to rank ).
banao. Nonzero ko flip karo, zero ko zero chhodo: . Condition 1 verify karo (). (pehle axis par projection), to ✓. Zero wali direction dead rehti hai: wahan invert karne ke liye koi information nahi hai.
L3.2 — Projection viewpoint
L2.1 wale tall ke liye, compute karo aur confirm karo ki yeh (a) symmetric hai aur (b) idempotent hai (). geometrically kya karta hai?
Recall Solution
. Tab (a) Symmetric: matrix apne transpose ke barabar hai (off-diagonals check karo: , ) ✓ — yeh Penrose Condition 3 hai. (b) Idempotent — prove kiya, sirf check nahi. "Idempotent" ka matlab hai do baar apply karna ek baar jaisa hi hai: . Yeh kyun zaroor hona chahiye kisi bhi ke liye jo genuine pseudoinverse se bana ho, sirf Penrose conditions use karke: Middle grouping ne Condition 2 use ki (). To is form ka har orthogonal projection satisfy karta hai — already projected vector ko dobara project karne se kuch nahi badaltha. (Is specific ke liye ek direct numeric check bhi VERIFY mein hai.) Geometry. ke column space par ek orthogonal projection hai — 3D ke andar ek 2D plane. Neeche figure mein exactly yahi dikhaya gaya hai: blue plane column space hai (sabhi vectors ), peela arrow hai, aur ko seedha neeche plane par green arrow par gira deta hai. Lal segment bacha hua residual hai, aur yeh plane se right angle par milta hai. Woh right angle hi least-squares condition hai : error tab sabse chota hota hai jab woh plane ke perpendicular ho.

Level 4 — Synthesis
L4.1 — do tarike se banao aur compare karo
ke liye, (i) tall formula se aur (ii) SVD formula se compute karo. Dikhao ki dono agree karte hain.
Recall Solution
(i) Tall formula. , inverse . (ii) SVD. ke nonzero entries pehle se diagonal par singular values hain: , ke saath. To , aur Dono tarike same matrix dete hain ✓. Jab full column rank aur easy SVD dono apply hon, to inhe agree karna hi chahiye — pseudoinverse unique hota hai.
L4.2 — Ek full non-diagonal SVD pseudoinverse
Rank-1 matrix ke liye compute karo.
Recall Solution
Step 1 — banao aur eigenvalues nikalo. . Iske eigenvalues se solve hote hain, jo ya deta hai. Singular values square roots hain: , (to rank ).
Step 2 — right singular vectors ( ke eigenvectors, unit length). ke liye: direction solve karo. Normalise karo (apni length se divide karo): . ke liye: direction , normalise karo: . Orthonormal check karo: , , aur ✓ — to orthogonal hai.
Step 3 — left singular vector (sirf nonzero ke liye hota hai). Rule: . Unit length check karo: ✓.
Step 4 — assemble karo. SVD sum sirf nonzero singular values par chalta hai, to ke saath: Condition 1 se sanity check karo: (line par projection), aur ✓.
Level 5 — Mastery
L5.1 — Tall formula se Penrose conditions prove karo
Maano ki full column rank hai aur . Prove karo ki charon Penrose conditions hold karti hain.
Recall Solution
likho. Pehle note karo symmetric hai: symmetric hai (kyunki ), aur ek symmetric matrix ka inverse symmetric hota hai kyunki jab . Isliye .
Pehle Condition 4: . Identity symmetric hai ✓ — aur yeh dikhata hai ki ek genuine left inverse hai.
Condition 1: ✓.
Condition 2: ✓.
Condition 3: . Isko transpose karo: ( use karke), to symmetric hai ✓.
Charon hold karti hain, aur kyunki Penrose conditions ek unique matrix define karti hain, yeh sach mein wahi pseudoinverse hai.
L5.2 — Least squares scratch se, phir padho
minimise karke derive karo, explain karo kyun gradient zero set kiya jaata hai, aur is tarah identify karo. Phir L2.1 data ke liye numerically verify karo ki ka error ke paas wale point se chota hai.
Recall Solution
Error setup karo. ka matlab "residual vector ki squared length" hai. use karke expand karo: Gradient zero kyun set karte hain? Definitions box se yaad karo: gradient har coordinate direction mein ki slopes ka vector hai. Yahan ki ek smooth, bowl-shaped (convex) function hai — bahut saari dimensions mein parabola ki tarah. Iska sabse nichla point exactly wahan hai jahan har direction mein slope flat hai, yaani jahan gradient zero vector ho. Yahi least-squares condition hai. Yeh normal equations hain. Full column rank ke saath invertible hai: Geometrically: residual ke har column ke orthogonal hai, yaani — wahi equation. Isliye column space par orthogonal projection hai.
Numeric check (L2.1 data, , ).
- Pseudoinverse answer par: , to residual , aur .
- Paas wale par: , residual , aur . Kyunki , pseudoinverse solution genuinely chota squared error deta hai — koi bhi doosra choice ise beat nahi kar sakta, kyunki yeh convex bowl ka unique minimum hai ✓.
Recall Ek-line self-test
Kisi bhi matrix ke liye, mera pehla move ::: uski rank aur shape check karna hai, phir tall / fat / SVD choose karna. geometrically ::: ke column space par orthogonal projection hai. ke SVD sum mein kitne terms hote hain? ::: exactly , yaani ki rank (har nonzero singular value ke liye ek term). ka nullspace ::: un sabhi ka set hai jahan — woh directions jinhe zero mein crush karta hai.
Connections
- Pseudoinverse — woh parent note jinhe yeh exercises drill karte hain.
- Singular Value Decomposition — L3, L4, L5 ke peeche ka engine.
- Least Squares Regression — L2.1 aur L5.2 ke peeche ki kahani.
- Orthogonal Projection — L3.2 mein ka matlab.
- Four Fundamental Subspaces — nullspace directions kyun kill ho jaati hain.
- Matrix Inverse — special case .
- Eigenvalues and Eigenvectors — ke eigenvalues hain (L4.2 mein use hue).