4.5.42 · D5Linear Algebra (Full)
Question bank — Pseudoinverse
Before we start, here is every symbol and fact this page leans on. Read it once; the traps below assume all of it.
Recall Quick symbol refresher (shapes, ranks, subspaces)
- means has rows, columns. Tall = more rows than columns (); fat = more columns than rows ().
- is the transpose (flip across the diagonal). is the ordinary inverse (only for square, non-singular ).
- Rank = number of independent columns = number of independent rows. Full column rank means all columns are independent; full row rank means all rows are independent.
- is the length of a vector; is the squared error we minimise in least squares.
- The four subspaces (see Four Fundamental Subspaces): column space (all outputs ), row space, nullspace (inputs sends to ), left nullspace.
The two pictures below are the geometry every trap on this page secretly tests: look at them before answering.


True or false — justify
exists for every real matrix, including the zero matrix.
True. The Singular Value Decomposition gives for any shape and rank, so always exists; the zero matrix's pseudoinverse is again the zero matrix (nothing to invert).
If is square and invertible, then .
True. With full rank and square shape, is invertible and ; the Matrix Inverse is a special case of the pseudoinverse.
for every matrix .
False. only when has full column rank. In general is the orthogonal projection onto the row space, which can have eigenvalue along nullspace directions.
and are always symmetric.
True. Penrose conditions 3 and 4 demand exactly and ; symmetry is what makes them orthogonal projections rather than skewed ones.
for every matrix.
True. Taking the pseudoinverse twice returns the original — the four Penrose conditions are symmetric in the roles of and , so satisfies them for (full "why" in the Edge-cases section).
is always the same shape as .
False. If is , then is — the shape is transposed so that the products () and () make sense.
For a fat, full-row-rank matrix, but .
True. is a right inverse here: . But is only a projection onto the row space (dimension ), so it cannot be the full identity.
The formula works for any tall matrix.
False. It needs full column rank. A tall matrix can still have dependent columns, making singular and non-invertible — then you must use the SVD formula.
If every singular value of is nonzero, .
True but read carefully. All nonzero singular values means full column rank (rank ), which gives . It does not force unless is also full row rank (i.e. square).
Spot the error
" is with rank 1, so I'll use ."
Error: rank 1 for a 2-column matrix means the columns are dependent, so is singular — you cannot invert it. Use from the Singular Value Decomposition instead.
"A singular value is , basically zero, so I'll invert it to to be safe."
Error: inverting a tiny produces a huge that massively amplifies noise in that direction. Treat negligible singular values as exactly so they map to (see Mistake 3 in the parent note).
"Since , cancelling the on the right gives ."
Error: "cancelling" means multiplying both sides by an inverse to remove a factor — but has no inverse when it is not square-and-invertible, so there is nothing to multiply by. is a projection identity ( projects onto the column space); it does not imply unless has full column rank.
" is the inverse, so for any ."
Error: is the orthogonal projection onto the column space, so only when already lies in the column space. Otherwise it returns the closest point in the column space, which is exactly why least squares needs .
"To find I invert every diagonal entry of ."
Error: you invert only the nonzero singular values; zeros stay zero. You must also transpose the shape (an block becomes ) so the product has matching dimensions.
"For with infinitely many solutions, gives some random valid solution."
Error: gives the specific solution of minimum norm — the one lying entirely in the row space, orthogonal to the nullspace. It is uniquely determined, not arbitrary.
" are the eigenvalues of ."
Error: the squares are the eigenvalues of (see Eigenvalues and Eigenvectors). The singular values themselves are their non-negative square roots.
Why questions
Why do we minimise rather than in least squares?
The squared length is a smooth convex function of , so its gradient is simple () and vanishes at exactly one minimum; minimising the un-squared norm gives the identical answer but with a messier, non-differentiable-at-zero expression.
Why does setting the gradient to zero give ?
At the minimum the residual must be orthogonal to the column space, i.e. . This is the geometric heart of Least Squares Regression: the error points straight out of the space of achievable outputs.
Why can we write for the minimum-norm solution of a fat system?
Forcing into the row space (the range of ) removes any component in the nullspace. Nullspace components add length without changing , so discarding them is exactly what makes smallest.
Why is the SVD called the "universal" pseudoinverse formula?
It never asks for or to be invertible — it works for any shape and any rank by inverting only the nonzero singular values, so it covers full-column-rank, full-row-rank, and rank-deficient cases in one stroke.
Why is a projection and not the identity in general?
can only reach outputs inside the column space; if that space is smaller than all of , some directions get flattened to their nearest in-space point, and any map that flattens directions has eigenvalue , so it cannot be .
Why do the two special-case formulas and agree with the SVD formula?
Substituting into either formula and simplifying (using , ) collapses it to ; they are the same object written for the case where the relevant Gram matrix happens to be invertible.
Why must the residual be orthogonal to the column space at the least-squares optimum?
If the residual had any component inside the column space, we could move to cancel that component and shrink the error — so at the true minimum no such component remains, leaving the residual perpendicular.
Edge cases
Sketch why .
Write out the four Penrose conditions for the pair instead of : condition 1 becomes , condition 2 becomes , and conditions 3–4 swap into each other — all four still hold because they held for . Since satisfies the four defining conditions of "the pseudoinverse of ", and that matrix is unique, is .
What is when is the zero matrix?
The zero matrix. Every singular value is , so is all zeros and — there is no information to invert in any direction.
What is for a rectangular zero matrix ()?
The zero matrix. Shape flips (as always) but every entry is still , since no direction carries invertible information.
For a rank-deficient square matrix, does ?
No. does not exist for a singular matrix. still exists via the SVD and acts as an inverse only on the row/column spaces, mapping the nullspace directions to .
If has a nullspace, what does do to vectors in the left nullspace of ?
It sends them to . Left-nullspace directions of are outside the column space, so (which only inverts column-space directions back into the row space) has nothing to invert there.
A tall matrix has some singular values equal to zero. Which formula do you use, and how many zeros can there be?
Use the SVD formula . The number of zero singular values equals , which is exactly the dimension of the nullspace; each zero marks one nullspace direction that gets mapped to . Even one such zero makes singular, so the tall-matrix formula breaks down.
If is a nonzero column vector (), what is ?
The row vector . It has full column rank (rank 1), so , and it acts as projection onto the line through via .
Connections
- Singular Value Decomposition — the universal engine behind every edge case above.
- Least Squares Regression — where the orthogonality-of-residual "why" lives.
- Four Fundamental Subspaces — nullspace and column-space traps come from here.
- Orthogonal Projection — explains why and are projections, not identities.
- Matrix Inverse — the square-invertible special case.
- Eigenvalues and Eigenvectors — the -as-eigenvalues trap.