The Singular Value Decomposition
The Singular Value Decomposition (SVD) is a version of the spectral theorem that applies to non-square matrices. Let X be an n\times m matrix over F, where F=\mathbf{R} or \mathbf{C}, and let D=X^{*}X. D is a positive semidefinite hermitian m\times m matrix and so we can apply the spectral theorem to find a unitary matrix P such that P^{*}DP=\Lambda where \Lambda is diagonal with entries \Lambda_{ii}=\lambda_{i}. The \lambda_{i} are nonnegative real numbers.
Put another way: DP = P\Lambda
which expresses the fact that the columns of P are orthonormal eigenvectors for D.
Let’s set A=XP. Then A^{*}A=P^{*}X^{*}XP=\Lambda. This means that the columns of A are orthogonal but not necessarily orthonormal.
If F=\mathbf{R}, then from a geometric point of view, the entries of each row of A are the coordinates of the corresponding row of X in the orthonormal basis given by the columns of P.
If D is positive definite, so all the \lambda_{i}>0, then we can normalize the columns of A by setting A_{1}=A\Lambda^{-1/2}. This happens if and only if X has rank m (which forces m\le n). In this case A_{1}^{*}A_{1}=\Lambda^{-1/2}\Lambda\Lambda^{-1/2}=I. So A_{1} has orthonormal columns.
If D has zero eigenvalues, then the matrix A will have zero columns corresponding to the zero eigenvalues. So let’s rearrange things to order the eigenvalues in descending order of size and suppose \lambda_{r+1},\ldots, \lambda_{m} are all zero. In this case, the rank of X is r. Drop columns r+1,\ldots, m from A, yielding A_{r}, and “shrink” \Lambda so that it is r\times r with the nonzero eigenvalues on the diagonal, yielding \Lambda_{r}. Let A_{1}=A_{r}\Lambda_{r}^{-1/2} as before. This A_{1} is n\times r and has orthonormal columns.
Complete the columns of A_{1} to obtain a unitary n\times n matrix U by adding orthonormal columns u_{r+1},\ldots, u_{n}. Let \sigma_{i}=\sqrt{\lambda_{i}} for i=1,\ldots,m and let \Sigma be the n\times m “diagonal” matrix constructed from these “singular values.” (If n<m, then only n elements will “fit” in the diagonal of \Sigma. In that case \sigma_{i}=0 for n<i\le m and we just drop these zeros.)
The key point now is that, in the product U\Sigma, the first r columns are multiplied by the nonzero \sqrt{\lambda_{i}}, so the first r columns of U\Sigma give the matrix A_{1}\Lambda_{r}^{1/2}, which agrees with the first r columns of A=XP. The remaining columns of U\Sigma are zero, which agrees with the remaining columns of A=XP.
Therefore: XP = U\Sigma
or X=U\Sigma V^{*} where U is unitary, \Sigma is n\times m “diagonal” with non-negative real entries, and V=P is m\times m unitary. This is called the singular value decomposition of X. The diagonal entries of \Sigma are called the singular values and the set of singular values is uniquely determined.
The “reduced” form of this decomposition keeps only the first r columns of U, leaving an n\times r matrix U_{r}; the first r diagonal entries of \Sigma, leaving an r\times r diagonal matrix \Sigma_{r}; and the first r columns of V, yielding an m\times r matrix V_{r}. Then X = U_{r}\Sigma_{r}V_{r}^{*}.
Low Rank Approximation – Overview
One way to interpret the singular value decomposition is that it allows one to write a linear transformation L:F^m\to F^n as a sum of rank-one maps. This follows from the fact that, if we let X be the matrix of L, then the reduced SVD tells us that X = \sum_{i=1}^{r} \sigma_{i}u_{i}v_{i}^{*}.
Here the u_{i} and v_{i} are the columns of U and V respectively and the \sigma_{i} are the singular values. Each u_{i}v_{i}^{*} is an (n\times 1) \times (1\times m) matrix product, yielding an n\times m matrix. It is rank one since its range is spanned by u_{i}.
Now consider the matrices obtained by truncating this sum (where as usual the \sigma_{i} are in descending order): X_{k} = \sum_{i=1}^{k} \sigma_{i}u_{i}v_{i}^{*}.
Here (assuming the \sigma_{i}>0 for i\le k), X_{k} has rank k. We will show (in Low Rank Approximation) that X_{k} is a best approximation to the original matrix X among all matrices of rank at most k (and, after choosing orthonormal bases, the same holds for linear maps between inner product spaces). We will look at a variety of characterizations of “best,” but for many applications the most useful one is that X_{k} minimizes the squared error between the original X=(x_{ij}) and matrices B=(b_{ij}) of rank at most k: \|X-B\|_{F}^2 =\sum_{i,j} |x_{ij}-b_{ij}|^2.
Application: Image Compression
One application of the technique of “low-rank approximation” is to the problem of image compression. A gray-scale image is basically an array of integers where each cell of the array corresponds to a pixel in the image, and the value represents how that pixel should be drawn (0 for black, 255 for white). A color image is generally represented by three arrays, with the color of each pixel represented by a 3-tuple giving the red, green, and blue intensity of that pixel.
We consider the gray-scale case for simplicity. Suppose A is a matrix representing an n\times n image, consisting of n^{2} integers between 0 and 255. As k increases, the rank-k approximations A_{k} get closer to A and so represent “nearly” the same image. However, notice that storing A requires n^{2} numbers while storing A_{k} requires 2kn+k=k(2n+1). For k small relative to n this is a considerable savings.
For example, the following image, taken from the scipy.datasets package, is a 512\times 512 gray-scale image represented by a 512\times 512 matrix A of integers between 0 and 255.

ascent image from scipy.datasets.We can compute the SVD U\Sigma V^{\top} of A where U and V are 512\times 512 orthogonal matrices and \Sigma is the diagonal matrix of singular values of A. The largest of these is around 45500 while the smallest is 0.15. To see them more clearly, we plot them here on a logarithmic scale.

ascent image (log scale).As you can see, there is a relatively small number of “big ones” larger than 10^3; then many between 10^3 and 1; and then a few more on the tail that are less than 1.
This figure shows the effect of low-rank approximation on the image.

ascent image.