For an m × n matrix of rank r, the picture of the four subspaces decides which inverse exists. Full rank r = m = n: a two-sided inverse, A⁻¹A = I = AA⁻¹. Full column rank r = n: the nullspace is only zero, Ax = b has 0 or 1 solutions, AᵀA is invertible, and A_left⁻¹ = (AᵀA)⁻¹Aᵀ gives A_left⁻¹A = I (n × n); in the other order, A(AᵀA)⁻¹Aᵀ is the projection onto the column space. Full row rank r = m: Ax = b always has solutions, infinitely many with n − m free variables, AAᵀ is invertible, and A_right⁻¹ = Aᵀ(AAᵀ)⁻¹ gives AA_right⁻¹ = I; in the other order Aᵀ(AAᵀ)⁻¹A projects onto the row space. A rectangular matrix never has a two-sided inverse. In general (r < m, r < n), A is still one-to-one from the row space onto the column space: if x ≠ y are in the row space then Ax ≠ Ay, because x − y would be in both the row space and the nullspace, hence zero. The inverse of that map is the pseudoinverse A⁺, which statisticians need for least squares when AᵀA is singular. From the SVD A = UΣVᵀ: A⁺ = VΣ⁺Uᵀ, where Σ⁺ inverts the r nonzero σ's (1/σ₁, …, 1/σ_r) and is n × m; ΣΣ⁺ and Σ⁺Σ are the projections onto the column space and the row space of Σ, and AA⁺ = UΣΣ⁺Uᵀ and A⁺A = VΣ⁺ΣVᵀ those of A.
Next, from chapter 3, the case of independent columns, r=n (pp. 2–3). The nullspace holds only the zero vector, and the row space is all of Rn (p. 3). So Ax=b has 0 or 1 solutions: possibly none, since the rows are probably dependent, but never two, because there is nothing in the nullspace to add (p. 4). These were the matrices of least squares, and for them ATA, n×n and symmetric, is invertible (p. 4). That gives a one-sided inverse (pp. 4–5):
Left inverse
Aleft−1=(ATA)−1AT,Aleft−1A=(ATA)−1(ATA)=In
In words
capital A to the power minus 1 sub left equals ( capital A ^ capital T capital A ) to the power minus 1 capital A ^ capital T, capital A to the power minus 1 sub left capital A equals ( capital A ^ capital T capital A ) to the power minus 1 ( capital A ^ capital T capital A ) equals capital I sub n
On the other side it fails: a rectangular matrix cannot have a two-sided inverse, because A or AT has a nullspace whenever m=n, and here AAT is the bad, singular combination (pp. 5–6). What the left inverse gives on the wrong side is familiar (p. 8):
Left inverse on the right
AAleft−1=A(ATA)−1AT=P
In words
capital A capital A to the power minus 1 sub left equals capital A ( capital A ^ capital T capital A ) to the power minus 1 capital A ^ capital T equals capital P
The flip side: independent rows, r=m (p. 6). Now the left nullspace is only zero, elimination never produces a zero row, and Ax=b always has a solution, with n−mfree variables, so infinitely many (pp. 6–7). AAT is the matrix to invert (p. 7):
Right inverse
Aright−1=AT(AAT)−1,AAright−1=Im
In words
capital A to the power minus 1 sub right equals capital A ^ capital T ( capital A capital A ^ capital T ) to the power minus 1, capital A capital A to the power minus 1 sub right equals capital I sub m
Other left and right inverses exist; these are the favourites (p. 7). On the wrong side, Aright−1A=AT(AAT)−1A is the projection onto the row space (p. 9).
(Strang first says "y=A+x" and corrects it to A+ applied to Ay; pp. 11–12.) Statisticians welcomed it, Strang says, because they live by least squares, ATAx^=ATb, which needs full column rank; with repeated experiments the columns may be dependent, ATA is singular, and the pseudoinverse is the right quantity (pp. 13–14).
Start from the singular value decompositionA=UΣVT (p. 14). All the trouble sits in the m×ndiagonalΣ, with r nonzero entries and zeros elsewhere: the simplest example of the general picture (pp. 14–15). Its pseudoinverse is n×m, inverting what can be inverted (p. 15):
Pseudoinverse of Σ
Σ+=1/σ1⋱1/σr0
In words
capital sigma plus equals 1 over sigma one; and so on down the diagonal; 1 over sigma sub r; 0
The products give r ones and then zeros, but of different sizes (pp. 15–16):
Two projections
ΣΣ+=(Ir000)m×m,Σ+Σ=(Ir000)n×n
In words
capital sigma capital sigma plus equals capital I sub r 0; 0 0 sub m times m, capital sigma plus capital sigma equals capital I sub r 0; 0 0 sub n times n
Extra entries in the zero part of Σ+ would multiply zeros and change nothing; the pseudoinverse is the minimal choice, with no extra stuff (p. 17). The SVD is "the champion" for computing it, since its two outer factors are inverted by transposing (p. 17).
The columns are independent. ATA=(2112), with inverse31(2−1−12). So Aleft−1=31(2−1−12)(101101)=31(2−111−12). Check: row 1 times the columns of A gives (2+1)/3=1 and (1−1)/3=0; row 2 gives (−1+1)/3=0 and (1+2)/3=1.
(b) SVD of a rank-one matrix
B=(1,2,0)T(1,2). Normalise: u1=(1,2,0)/5, v1=(1,2)/5, so B=σ1u1v1T with σ1=5⋅5=5.
(b) Pseudoinverse
B+=σ11v1u1T=51⋅51(12)(120)=251(122400). Then B+B=251(5101020)=(0.20.40.40.8), the projection onto the row space, the line through (1,2).
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
The column space, nullspace, row space and left nullspace of a matrix, whose dimensions are all fixed by its rank. Explained in The four fundamental subspaces.
At right angles; more generally, of two vectors or functions, having a dot product, or an integral of their product, of zero. Explained in Introduction to Fourier series.
The thing that undoes another: a matrix times its inverse gives the identity matrix, as a function followed by its inverse gives back the start. Explained in Planes through three points, and matrices.
Of a matrix: having rank as large as its size allows; full column rank means independent columns, full row rank independent rows. Explained in Solving Ax = b: the complete solution.
A way to fit a model to data by choosing it to make the sum of the squared errors as small as possible. Explained in Projection matrices and least squares.
Unchanged by some swap, reflection or turn; for an expression in two quantities, unchanged when they are exchanged. Explained in Introduction to Fourier series.
Of a square matrix or operator: having an inverse that undoes it; for a matrix this happens exactly when its determinant is not zero. Explained in The geometry of linear equations.
Of a square matrix: having no inverse, because its determinant is zero and some nonzero vector is sent to zero. Explained in The geometry of linear equations.
A set of vectors inside a larger space that is a space itself: sums and multiples of its vectors stay inside it. Explained in Transposes, permutations and vector spaces.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers. Explained in Orthogonal vectors and subspaces.
A collection of objects, called vectors, that can be added together and multiplied by numbers, with the results staying in the collection. Explained in Transposes, permutations and vector spaces.
Writing any matrix as A = UΣVᵀ: a rotation (perhaps with a reflection), a stretching along perpendicular axes, and another rotation. Explained in Singular value decomposition.
In a square matrix, the entries running from the top left corner to the bottom right; a diagonal matrix has zeros everywhere else. Explained in The four fundamental subspaces.
Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).
Check your understanding
A 5×3 matrix has rank 3. Which inverse does it have?
With full column rank, what is A(ATA)−1AT?
Why does A send different vectors x=y of the row space to different vectors?