Post · 7 min read· pp. 108–111
I walk the reader carefully through Gilbert Strang's existence proof of the singular value decomposition.
The existence claim for the singular value decomposition (SVD) is quite strong: “Every matrix is diagonal, provided one uses the proper bases for the domain and range spaces” (Trefethen & Bau III, 1997). MIT professor Gilbert Strang has a wonderful lecture on the SVD, and he includes an existence proof for the SVD. The goal of this post is to force myself to walk through his proof carefully. For legibility, I break the proof into two sections: an overview and details. I hope this allows the reader to get the big picture of the proof while consulting details as needed.
Note that while the SVD holds for complex matrices, we restrict ourselves to real-valued matrices in this proof. Trefethen and Bau have a proof for the existence and uniqueness of the SVD for complex matrices, but I found Strang’s proof more instructive.
If you’re unfamiliar with the SVD, please see my previous post on a geometrical interpretation of it.
Proof
Consider an m×n matrix A with rank r. The matrix A⊤A is therefore symmetric and positive semi-definite (PSD) (Details, Section 1). This means the matrix is diagonalizable with an eigendecomposition of the form:
A⊤A=VΛV⊤=i=1∑nλivivi⊤=i=1∑n(σi)2vivi⊤
where V is an orthonormal matrix whose columns are the eigenvectors of A⊤A and where r≤n and r=rank(A)=rank(A⊤A) (Details, Section 2). The second equality above, which is a sum of matrices, holds because Λ is diagonal.
We have defined a quantity σi (the singular values) as the square root of the i-th eigenvalue; we know we can take the square root of our eigenvalues because PSD matrices can be equivalently characterized as matrices with non-negative eigenvalues (Details, Section 3).
For the i-th eigenvector-eigenvalue pair, we have
A⊤Avi=(σi)2vi.
Next comes what is, at least in my mind, the critical step in the proof. For now, assume that we have a full-rank matrix (σi>0 for all i). Define a new vector ui such that,
ui=σiAvi.
By construction, ui is a unit eigenvector of AA⊤ (Details, Section 4). Now let V be an n×n matrix—because A⊤A is n×n—where the i-th column is vi; let U be an m×m matrix—because Avi is an m-vector—where the i-th column is ui; and let Σ be a diagonal matrix whose i-th element is σi. Then we can express the relationships we have so far in matrix form as:
UUΣA=AVΣ−1=AV=UΣV⊤
where we use the fact that VV⊤=I and Σ−1 is a diagonal matrix where the i-th value is the reciprocal of σi. And we’re done. Note that the first r columns of V are an orthonormal basis for the row space of A, while the first r columns of U are an orthonormal basis for the column space of A.
In the low-rank scenario, some σi=0. Provided the σi are sorted, we can complete U by adding additional column vectors that span Rm and then add rows of 0-vectors to Σ. See Figure 7 here.
Details
1. Gram matrices as positive semi-definite
Gram matrices are PSD. Consider an arbitrary Gram matrix G=M⊤M. Then we have:
x⊤Gx=x⊤M⊤Mx=(Mx)⊤Mx=(Mx)2≥0
If that last step is not obvious, let z=Mx and note that
z⊤z=i=1∑N(zi)2.
In general, positive-definiteness is required for any operation to be an inner product.
2. A and A⊤A have the same rank
To show that rank(A)=rank(A⊤A), it is sufficient to show that Ax=0 and A⊤Ax=0 have the same solutions, i.e. Ax=0⟺A⊤Ax=0. This makes sense because rank is just the maximal number of linearly independent columns, and a set of vectors x1,x2,…xk are linearly dependent if there exists scalars a1,a2,…,ak, not all zero, such that
a1x1+a2x2+⋯+akxk=0.
Now if Ax=0, then A⊤(Ax)=A⊤0=0.
If A⊤Ax=0, then
A⊤Axx⊤A⊤Ax(Ax)⊤Ax=0=0=0.
Note that for any vector v, by definition of the inner product, v⊤v=0⟺v=0.
3. The eigenvalues of PSD matrices are all non-negative
An equivalent characterization of a PSD matrix is that all its eigenvalues are non-negative. First, consider a real symmetric matrix A. Since it is real and symmetric, it has an eigendecomposition of the form:
A=QΛQ⊤=n=1∑Nqnλnqn⊤
And therefore:
x⊤Ax=x⊤(n=1∑Nqnλnqn⊤)x=n=1∑Nλnx⊤qnqn⊤x=n=1∑Nλn(x⊤qn)2
This final expression is greater or equal to zero if all the eigenvalues λn are non-negative. So if that is true, the matrix A is PSD.
Next, consider a matrix that is PSD, so:
x⊤Ax≥0
Now consider an arbitrary eigenvector of A, vi. Since A is PSD, we know:
vi⊤Avi=vi⊤λivi=λivi⊤vi≥0
Since vi⊤vi is necessarily non-negative, then λi must be non-negative for λivi⊤vi≥0 to hold.
4. ui is a unit eigenvector of AA⊤
To see that ui is an eigenvector of AA⊤, note that
AA⊤ui=AA⊤(σiAvi)=AA⊤Aviσi1=A(σi)2viσi1=(σi)2ui
where step 2-3 applies the definition of vi as an eigenvector of A⊤A and step 3-4 applies the definition of ui.
To see that ui is unit, note that
ui⊤ui=(σiAvi)⊤σiAvi=(σivi⊤A⊤)σiAvi=(σi)2vi⊤A⊤Avi=(σi)2vi⊤(σi)2vi=vi⊤vi=1
where the last step is because vi is a unit vector as well.
Conclusion
I found this proof instructive. Importantly, it makes it clear where the relationship between singular values and eigenvalues comes from. The right singular vectors of A, the columns of V, are the set of orthonormal eigenvectors of A⊤A. The left singular vectors of A, the columns of U, are the set of orthonormal eigenvectors of AA⊤. And the non-zero singular values of A are the square roots of the eigenvalues of both A⊤A and AA⊤.
Acknowledgements
I thank James D., Carl A., and José M. for pointing out a few mistakes in
earlier drafts.
- Trefethen, L. N., & Bau III, D. (1997). Numerical linear algebra (Vol. 50). Siam.