4.5.42Linear Algebra (Full)

Pseudoinverse

1,662 words8 min readdifficulty · medium1 backlinks

What is it?

The key geometric fact: AA+AA^+ is the orthogonal projection onto the column space of AA, and A+AA^+A is the orthogonal projection onto the row space of AA.


Deriving A+A^+ from first principles

Case 1 — Full column rank (rank=nm\text{rank} = n \le m, tall/thin)

We want to solve Ax=bAx = b. If bb is not in the column space, no exact solution exists — so we minimize the error Axb2\|Ax - b\|^2 (least squares).

Case 2 — Full row rank (rank=mn\text{rank} = m \le n, short/fat)

Now Ax=bAx=b has infinitely many solutions. We pick the one with smallest norm x\|x\| — Why? It's the unique "no wasted energy" solution, orthogonal to the nullspace.

Case 3 — General rank (via SVD) — the universal formula

Figure — Pseudoinverse

Worked Examples



Recall Feynman: explain to a 12-year-old

Imagine a vending machine. A normal inverse is a machine that, given a snack, perfectly hands back the exact coins you put in. But some machines are broken — they squish information so you can't perfectly get your coins back, or there are many coin-combos that give the same snack. The pseudoinverse is the fairest possible refund machine: if a perfect refund is impossible, it gives the answer that's closest (least error); if many refunds work, it gives the smallest, simplest one (least wasted coins). It never crashes, no matter the machine.


Flashcards

What are the four Penrose conditions?
AA+A=AAA^+A=A; A+AA+=A+A^+AA^+=A^+; (AA+)=AA+(AA^+)^\top=AA^+; (A+A)=A+A(A^+A)^\top=A^+A.
Pseudoinverse for full column rank?
A+=(AA)1AA^+=(A^\top A)^{-1}A^\top (a left inverse, A+A=IA^+A=I).
Pseudoinverse for full row rank?
A+=A(AA)1A^+=A^\top(AA^\top)^{-1} (a right inverse, AA+=IAA^+=I).
Universal SVD formula for A+A^+?
A+=VΣ+UA^+ = V\Sigma^+U^\top, inverting each nonzero σi\sigma_i, leaving zeros as zeros.
What does AA+AA^+ represent geometrically?
Orthogonal projection onto the column space of AA.
Why does least squares give AAx=AbA^\top Ax=A^\top b?
Setting Axb2=0\nabla\|Ax-b\|^2=0; the residual is orthogonal to the column space.
When does A+=A1A^+=A^{-1}?
When AA is square and invertible.
What problem does the fat-matrix pseudoinverse solve?
The minimum-norm solution among infinitely many solutions of Ax=bAx=b.
Why not invert zero singular values?
1/01/0 is undefined and tiny values blow up noise; those directions carry no information.

Connections

  • Singular Value Decomposition — the engine that defines A+A^+ universally.
  • Least Squares Regression — the application of the full-column-rank case.
  • Four Fundamental SubspacesA+A^+ maps column space ↔ row space, kills nullspaces.
  • Orthogonal ProjectionAA+AA^+ and A+AA^+A are projection matrices.
  • Matrix Inverse — special case when AA is square invertible.
  • Eigenvalues and Eigenvectorsσi2\sigma_i^2 are eigenvalues of AAA^\top A.

Concept Map

generalized by

uniquely defined by

AA+ and A+A give

leads to

derives

left inverse

leads to

derives

right inverse

universal formula

any shape any rank

Inverse A^-1 needs square invertible

Pseudoinverse A+

Four Penrose conditions

Orthogonal projections

Least-squares error min

Full column rank tall

Full row rank fat

SVD A = U Sigma V^T

Minimum-norm solution

A+ = inv AtA At

A+ = At inv AAt

A+ = V Sigma+ U^T

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, normal inverse A1A^{-1} sirf tab milta hai jab matrix square ho aur invertible ho. Lekin real life mein zyादातर matrices rectangular hote hain — ya toh equations zyada (data fitting), ya unknowns zyada. Aise mein hum "best possible inverse" chahte hain, jise pseudoinverse A+A^+ kehte hain. Yeh hamesha exist karta hai, kabhi crash nahi karta.

Do main situations samjho. Agar matrix tall hai (full column rank), toh exact solution nahi milta, isliye hum error Axb2\|Ax-b\|^2 ko minimize karte hain — yeh hai least squares, aur formula banta hai A+=(AA)1AA^+=(A^\top A)^{-1}A^\top. Agar matrix fat hai (full row rank), toh infinite solutions hote hain, aur hum chhote se chhota x\|x\| wala solution lete hain — formula A+=A(AA)1A^+=A^\top(AA^\top)^{-1}.

Sabse powerful tareeka hai SVD: A=UΣVA=U\Sigma V^\top likho, phir A+=VΣ+UA^+ = V\Sigma^+U^\top, jahan har nonzero singular value σi\sigma_i ko 1/σi1/\sigma_i bana do, aur zeros ko zero hi rehne do. Yeh kisi bhi shape, kisi bhi rank ke liye chalta hai. Yaad rakhna: zero singular values ko kabhi invert mat karna, warna noise blow up ho jayega.

Geometrically samjho: AA+AA^+ ek projection hai column space par, aur A+AA^+A projection hai row space par. Toh pseudoinverse asal mein information ko sahi subspace mein wapas bhejta hai aur nullspace ka kachra discard kar deta hai. Machine learning, regression, signal processing — sab jagah yeh use hota hai.

Go deeper — visual, from zero

Test yourself — Linear Algebra (Full)

Connections