The first review lecture, organized around the question of what "inverse" can mean for an m-by-n matrix of rank r. Full rank gives the true two-sided inverse; full column rank gives a left inverse; full row rank gives a right inverse; and multiplying in the wrong order produces projections. For the general case, the pseudoinverse: A is a perfect, invertible map from row space to column space, and the SVD makes its inverse computable.
This lecture is the first step of the final review, and Strang organizes it around “the most fundamental picture in linear algebra” — the four subspaces. For an m×n matrix of rank r: the row space and null space are orthogonal complements in Rn (dimensions r and n−r), and the column space and null space of AT are orthogonal complements in Rm (dimensions r and m−r). “Nobody could forget that picture, right? When you’re my age, even, you’ll remember the row space and the null space.”
The question of the day: what kinds of inverses can A have? There are four cases, and each one is a statement about the ranks:
Two-sided inverse: r=m=n. Square, full rank — the nice case chapter two was all about. One matrix A−1 produces the identity from either side.
Left inverse: r=n<m. Full column rank — independent columns, probably more rows than columns.
Right inverse: r=m<n. Full row rank — independent rows, more columns than rows.
Pseudoinverse: r smaller than both m and n. The completely general case, where both null spaces are alive — and it’s those null spaces “that are screwing up inverses.”
A rectangular matrix can never have a two-sided inverse: if m=n, then either A or AT has free variables, so one of them has a genuine null space. And “if a matrix takes a vector to zero, well, there’s no way an inverse can, like, bring it back to life.”
Full column rank: the left inverse
Suppose r=n: the n columns are independent. Then the null space of A contains only the zero vector, and the row space is all of Rn. Consequence for equations: Ax=b has zero or one solutions. If a particular solution exists, it is the solution — there’s nothing in the null space to add on. But since the rows are probably not independent, elimination can produce rows where zero must equal something nonzero, so for some right-hand sides there is no solution at all.
Now the key combination of the course: ATA. If the rank of A is n, then ATA — an n×n symmetric matrix — also has rank n. “That’s the beautiful fact.” So ATA is invertible, and that hands us a one-sided inverse of A itself:
Why does it work? Put the parentheses in the right place: [(ATA)−1AT]A=(ATA)−1(ATA)=I. This was “the totally crucial case for least squares,” because the central least-squares equation ATAx^=ATb has ATA as its coefficient matrix — and with full column rank, that matrix is invertible and we’re go.
Note what’s good and what’s bad in this case: ATA is invertible, but AAT is not — the bad product for this case.
Full row rank: the right inverse
Now the mirror image, r=m: the m rows are independent, the columns are not. The null space of AT contains only zero — no combination of the rows gives the zero row. So elimination never produces a zero row, we never hit the “zero equals one” problem, and Ax=balways has a solution — but too many. There are n variables and m pivots, hence n−m free variables: infinitely many solutions.
Everything flips. Now AAT is the good, invertible matrix (m×m, full rank), and the right inverse comes out completely parallel to the left one:
There are other left inverses and other right inverses — these formulas are just “our favorite” ones. (The pseudoinverse will turn out to be the minimal choice, with no extra stuff.)
Put the inverse on the wrong side: a projection
Before leaving the one-sided cases, Strang asks the question you should ask: the left inverse gives I when it multiplies from the left — but what if we multiply in the other order? Compute
AAleft−1=A(ATA)−1AT
Everybody in the room ought to recognize that matrix: it’s P, the projection onto the column space. “It’s trying to be the identity matrix, right? A projection matrix tries to be the identity matrix, but you’ve given it an impossible job.” It is the identity where it can be — on the column space — and zero elsewhere.
Same story on the other side. Put the right inverse on the left:
Aright−1A=AT(AAT)−1A
That’s another projection — the same shape of formula with A and AT reversed — this time the projection onto the row space. Again it’s trying to be the identity, “but there’s only so much the matrix can do.”
The pseudoinverse: A is perfect from row space to column space
Now the general case: rank r smaller than both m and n. What’s a reasonable inverse? Look at the picture. Take a vector x in the row space and multiply by A. Where is Ax? Always in the column space — Ax is a combination of the columns. Almost every vector in Rn has a row space component and a null space component, and A kills the null space component. But restrict attention to the row space alone, and something remarkable happens: the map from row space to column space is one-to-one. We’ve got a chance, because both spaces have the same dimension r.
Strang calls the proof “a perfect question on a final exam,” because it’s exactly what chapters three and four teach. Suppose the conclusion failed: Ax=Ay, which is the same as A(x−y)=0. Then x−y is in the null space. But x and y are both in the row space, and the row space is a vector space, so x−y is also in the row space. A vector in both the null space and the row space — orthogonal complements — must be the zero vector. So x=y: start from two different vectors, get two different vectors.
Why does anyone need this? Statisticians “discovered, oh boy, this is the thing that we needed all our lives.” They live on least squares — linear regression — and least squares only works when A has full column rank. But experiments get repeated; measurements fail to be independent; and then ATA goes singular and the whole machine breaks. The pseudoinverse “just arrived at the right moment, and it’s the right quantity.”
Computing A⁺ from the SVD
How do you actually find A+? Start from the Singular Value Decomposition,
A=UΣVT
with U and V orthogonal and Σ diagonal. The diagonal matrix Σ is “the best example, the simplest example we could ever have of our general setup”: m×n, rank r, with σ1,…,σr on the diagonal and zeroes everywhere else.
Now assemble A+ from the factors. In A=UΣVT, the orthogonal matrices are perfectly invertible — the inverse of VT is V, the inverse of U is UT. All the trouble, all the null space, lives in Σ, and we just found its pseudoinverse. So:
A+=VΣ+UT
The beauty of the SVD here is that “it puts all the problems into this diagonal matrix where it’s clear what to do.” One could pad Σ+ with extra entries that multiply the zero blocks and change nothing essential, but the good pseudoinverse is the one with no extra stuff — the minimal matrix that gives the best result, ΣΣ+ equal to r ones.
One administrative note Strang makes twice: the pseudoinverse lives at the end of chapter seven and won’t appear on the final. But everything it’s built from — rank, free variables, the four subspaces, projections, orthogonality of row space and null space — “is all what the course was about, chapters one, two, three, four.”
Problems
Work these before revealing the solutions — the lecture’s formulas and the four-subspace picture are all you need.
Problem 32.1Computing a left inverse
The matrix
A=110011
has full column rank (r=n=2, m=3). Find its left inverse Aleft−1=(ATA)−1AT and verify that Aleft−1A=I.
A 2×3 matrix times a 3×2 matrix giving the 2×2 identity — exactly the left-inverse pattern.
Problem 32.2Right inverse and the wrong-order product
The matrix A=[122] has full row rank (r=m=1, n=3). Find its right inverse Aright−1=AT(AAT)−1, verify AAright−1=I, and identify the matrix Aright−1A.
Show solution
The good matrix is AAT=1+4+4=9, so (AAT)−1=91 and
Aright−1=91122
Check: AAright−1=91(1+4+4)=1=I (the 1×1 identity).
In the wrong order:
Aright−1A=91122[122]=91122244244
This is AT(AAT)−1A — the projection onto the row space of A, the line through (1,2,2) in R3. It’s symmetric and squares to itself, but it is not the identity: it can’t be, because A has a two-dimensional null space.
Problem 32.3The final-exam proof
Let A be any m×n matrix, and suppose x and y are two vectors in the row space of A with Ax=Ay. Prove that x=y. Which two facts about the four subspaces does the proof use?
Show solution
From Ax=Ay we get A(x−y)=0, so x−y lies in the null space of A.
Since x and y are both in the row space, and the row space is a subspace (closed under subtraction), x−y also lies in the row space.
The row space and null space are orthogonal complements in Rn, so their intersection is the zero vector alone: a vector orthogonal to itself has ∥x−y∥2=0. Therefore x−y=0, i.e. x=y.
The two facts used: subspaces are closed under linear combinations, and the row space is the orthogonal complement of the null space. This is exactly why A is a one-to-one (invertible) map from row space to column space — the fact that defines the pseudoinverse.
Problem 32.4Pseudoinverse of a diagonal matrix
Find the pseudoinverse of
Σ=500000
and compute both products ΣΣ+ and Σ+Σ. What is each product, and what space does each project onto?
Show solution
Here m=3, n=2, r=1. Invert the nonzero singular value and take the transposed shape:
Σ+=[5100000](2×3)
Then
ΣΣ+=100000000(3×3),Σ+Σ=[1000](2×2)
Neither is the identity — each has r=1 ones and then zeroes. ΣΣ+ is the projection onto the column space of Σ (the first coordinate axis in R3), and Σ+Σ is the projection onto the row space (the first coordinate axis in R2). That is the best any pseudoinverse can do.
Problem 32.5Pseudoinverse via the SVD
The rank-one matrix
A=[1111]
has SVD A=UΣVT with σ1=2 and u1=v1=21(1,1). Use A+=VΣ+UT to find A+, and check that AA+ is the projection onto the column space.
Show solution
Since only one singular value is nonzero, Σ+ has the single entry 21, and
That is exactly u1u1T, the projection onto the line through (1,1) — the column space of A. (By symmetry A+A is the same matrix here, projecting onto the row space, which is the same line.) Note A itself is singular, with no left or right inverse — but its pseudoinverse exists and does the best an inverse can do.