How the pseudoinverse built from the SVD gives every least-squares solution and the minimum-norm one, and how four orthogonal projectors split the input and output spaces of a matrix.
Take the matrix A with rows (1,2), (2,4) and (0,0) and the target b=(7,9,2). No input solves Ax=b, since the second entry of Ax is always twice the first and the third entry is always zero, yet a whole line of inputs comes equally close. Which part of b can be fitted and which part must remain as error, and which of the many best inputs should be chosen? The singular value decomposition answers both questions, and the answers define the pseudoinverse and four orthogonal projectors, two on the input space and two on the output space. Throughout, F is R or C, norms come from the standard inner product, and a tuple stands for a column vector.
Key terms
Pseudoinverse
Definition Let A∈Fm×n have rank r and a full singular value decomposition A=UΣV∗. Let Σ+∈Rn×m have entries (Σ+)ii=1/σi for i≤r and every other entry 0. So Σ+ has the transposed shape, the positive singular values are reciprocated and the zeros stay zero. The pseudoinverse of A is
A+=VΣ+U∗∈Fn×m.
In compact form,
A+=VrΣr−1Ur∗=i=1∑rσi1viui∗,
so A+ui=vi/σi for i≤r and A+ui=0 for i>r. The result does not depend on which singular value decomposition is used, because the free choices of singular vectors cancel in each block σ−1VσUσ∗ and the zero directions do not appear at all. The next lesson characterizes A+ by four equations as well. If A=0, then A+ is the n×m zero matrix. If A is square and invertible, then A+=A−1. If A has full column rank, r=n, then A∗A is invertible and A+=(A∗A)−1A∗. If A has full row rank, r=m, then A+=A∗(AA∗)−1. Both formulas follow by writing each side in singular coordinates.
In plain words The pseudoinverse undoes A on the directions that A keeps and sends every output direction perpendicular to all outputs of A to zero. There is no division by zero, because a lost direction is never inverted at all.
Example For the opening matrix, A=5u1v1T with u1=(1,2,0)/5 and v1=(1,2)/5, so r=1 and
A+=51v1u1T=251[122400].
The matrix A is 3×2 and its pseudoinverse is 2×3. Neither formula for full rank applies, since the rank r=1 is smaller than both m=3 and n=2. For instance ATA, with rows (5,10) and (10,20), is singular.
Least-squares solution set
Definition Let A∈Fm×n and b∈Fm. A vector x^∈Fn is a least-squares solution of Ax=b if ∥Ax^−b∥≤∥Ax−b∥ for every x∈Fn. Take a full singular value decomposition and put c=U∗b and y=V∗x. Unitary matrices preserve norms, so
The last sum does not depend on x. Each term of the first sum vanishes exactly when yi=ci/σi, and the coordinates yr+1,…,yn do not appear. So least-squares solutions always exist, and the least-squares solution set is
A+b+kerA,
the set of all vectors A+b+z with z∈kerA. The vector A+b is the solution with yr+1=⋯=yn=0. The minimum squared residual is ∑i>r∣ci∣2. Equivalently, x is a least-squares solution exactly when Ax=AA+b, and exactly when it solves the normal equations A∗Ax=A∗b, which in singular coordinates read σi2yi=σici for i≤r. The set is a single point exactly when kerA={0}, that is r=n, and the minimum residual is zero exactly when b∈imA.
In plain words Only the part of b along directions that A can reach is adjustable, and the rest is a fixed error that no input can remove. Inputs that differ by a kernel vector give the same output, so they fit equally well.
Example For the opening A and b=(7,9,2), the pseudoinverse gives A+b=251(25,50)=(1,2), and kerA is spanned by (2,−1). The least-squares solution set is the line
x=(1+2s,2−s),s∈R.
Every such x gives Ax=(5,10,0), so the residual b−Ax=(2,−1,2) has squared norm 9. In singular coordinates, with u1=(1,2,0)/5, u2=e3 and u3=(2,−1,0)/5, the target becomes c=(55,2,5), and the fixed error is 22+(5)2=9. The normal equations reduce to the single equation x1+2x2=5, the same line.
Minimum-norm least-squares solution
Definition Let A∈Fm×n and b∈Fm. The theorem says that among all least-squares solutions of Ax=b, the vector A+b has the smallest norm and is the only one with that norm. It is called the minimum-norm least-squares solution. The proof uses the compact form. The vector
A+b=i=1∑rσi⟨ui,b⟩vi
lies in the span of v1,…,vr, which is (kerA)⊥. Every least-squares solution is A+b+z with z∈kerA, and by the Pythagorean identity
∥A+b+z∥2=∥A+b∥2+∥z∥2,
which is larger than ∥A+b∥2 unless z=0. Equivalently, A+b is the unique least-squares solution in (kerA)⊥=imA∗. When b∈imA it is the exact solution of smallest norm. When A=0, every input is a least-squares solution and the minimum-norm one is A+b=0.
In plain words Two separate choices are made. First fit the output as well as possible, then among all inputs with that best fit take the shortest. The shortest one has no kernel component, because a kernel component adds length without changing the output.
Example On the line x=(1+2s,2−s) from above,
∥x∥2=(1+2s)2+(2−s)2=5+5s2,
which is smallest at s=0. That gives A+b=(1,2), of norm 5, and (1,2) is orthogonal to the kernel direction (2,−1). The choice s=1 gives (3,1), with the same residual but squared norm 10.
Projector onto the column space
Definition Let A∈Fm×n have rank r and compact singular value decomposition A=UrΣrVr∗. Then
AA+=UrUr∗=i=1∑ruiui∗∈Fm×m.
This matrix is Hermitian and idempotent, and its image is the span of u1,…,ur, which is imA, the column space of A. So AA+ is the orthogonal projector of Fm onto the column space. For every b∈Fm, the vector AA+b is the point of imA closest to b, and it is the fitted output Ax^ of every least-squares solution x^. In the full decomposition it is U times the diagonal matrix with r ones followed by m−r zeros times U∗. It equals Im exactly when r=m.
In plain words The matrix AA+ acts on the output space. It keeps the part of a target that A can produce and removes the rest.
Example For the opening matrix, u1=(1,2,0)/5, so
AA+=u1u1T=51120240000.
It sends b=(7,9,2) to 51(25,50,0)=(5,10,0), the fitted output found above.
Projector onto the row space
Definition With the same notation,
A+A=VrVr∗=i=1∑rvivi∗∈Fn×n.
It is the orthogonal projector of Fn onto the span of v1,…,vr. Since A∗ui=σivi, that span is imA∗, which equals (kerA)⊥. This subspace is the row space of A. Over R it is spanned by the rows of A, and over C by the complex conjugates of the rows, written as columns. For every x∈Fn, applying A and then A+ gives A+(Ax)=(A+A)x, the row space component of x, and A(A+Ax)=Ax. The projector equals In exactly when r=n.
In plain words The matrix A+A acts on the input space. It keeps the part of an input that A remembers and removes the part that A forgets.
Example For the opening matrix,
A+A=v1v1T=51[1224].
For x=(3,1), the output is Ax=(5,10,0) and A+Ax=(1,2). The pseudoinverse returns (1,2) rather than (3,1) because the two inputs have the same output and only (1,2) lies in the row space. Although A+A is square, it is not I2.
Complementary projectors
Definition If P∈Fk×k is the orthogonal projector onto a subspace S, then Ik−P is Hermitian and idempotent, since (Ik−P)2=Ik−2P+P2=Ik−P, and its image is kerP=S⊥. So Ik−P is the orthogonal projector onto S⊥. Applied to the two projectors above, the m×m matrix Im−AA+ projects Fm onto (imA)⊥=kerA∗, and the n×n matrix In−A+A projects Fn onto (imA∗)⊥=kerA. They give two orthogonal splittings,
bx=AA+b+(Im−AA+)b,=A+Ax+(In−A+A)x,
for every b∈Fm and x∈Fn. The least-squares residual is (Im−AA+)b, and the least-squares solution set can be written as A+b+(In−A+A)w with w∈Fn. The four projectors live in two different spaces, two of size m×m and two of size n×n, and even when m=n the output projector AA+ and the input projector A+A are in general different matrices.
In plain words Each space splits in two perpendicular pieces. The output space splits into what A can produce and the directions perpendicular to all of it, and the input space splits into what A remembers and the kernel directions that it forgets.
The first sends b=(7,9,2) to the residual (2,−1,2). The second sends x=(3,1) to its kernel part (2,−1), so (3,1)=(1,2)+(2,−1), with perpendicular parts.
Check yourself
Find the pseudoinverse of the matrix A with rows (2,0,0) and (0,0,0), and the minimum-norm least-squares solution of Ax=b for b=(4,5).
Show the answer
The matrix is already in singular value form, with U=I2, V=I3, σ1=2 and σ2=0. Reciprocate the positive value, keep the zeros and transpose the shape, so
A+=1/200000,
a 3×2 matrix. The minimum-norm least-squares solution is A+b=(2,0,0). The first equation 2x1=4 can be met and the second, 0=5, cannot, so the least-squares solutions are (2,s,t) for all s and t, with residual (0,5). Watch for two common slips, writing A+ with the shape of A and trying to reciprocate a zero.
Let A have rows (1,1), (1,1) and (1,1), and let b=(1,2,9). Find A+, all least-squares solutions, the minimum-norm one and the residual.
Show the answer
The matrix is the outer product of (1,1,1) and (1,1), so σ1=32=6 with u1=(1,1,1)/3 and v1=(1,1)/2. Then
A+=61v1u1T=61[111111],
and A+b=61(12,12)=(2,2). The kernel is spanned by (1,−1), so the least-squares solutions are (2+s,2−s), and the minimum-norm one is (2,2). Each of them gives Ax=(4,4,4), so the residual is (−3,−2,5), with squared norm 38. Every equation says x1+x2=bi, and the best common value 4 is the mean of the targets. The formula (ATA)−1ATb fails here, because ATA, with every entry 3, is singular.
(a) For which A∈Fm×n is A+A=In, and for which is AA+=Im? (b) For the matrix of question 2 and the input x=(3,1), which of the four projectors extracts the part of x that cannot be recovered from Ax, and what is that part?
Show the answer
For (a), A+A=VrVr∗ is the identity exactly when r=n, that is, when A has full column rank and kerA={0}. Likewise AA+=Im exactly when r=m, full row rank. Both hold only for a square invertible matrix, and then A+=A−1.
For (b), the unrecoverable part lies in kerA, so the projector is the 2×2 matrix
I2−A+A=21[1−1−11].
It sends (3,1) to (1,−1). Indeed Ax=(4,4,4) and A+Ax=(2,2), so (3,1)=(2,2)+(1,−1). The output complement I3−AA+ is a 3×3 matrix that acts on targets, not on inputs.
May we count page visits to understand which courses and learning features are useful? Cloudflare collects visit and performance statistics, without your account details or answers. Your choice does not affect access. Details