Singular value decomposition
From Free net encyclopedia
In linear algebra, singular value decomposition (SVD) is an important factorization of a rectangular real or complex matrix, with several applications in signal processing and statistics. In some respect this matrix decomposition is similar to the diagonalization of symmetric or Hermitian matrices using a basis of eigenvectors given by the spectral theorem, but the two decompositions have in general rather different characters and should not be confused even though they are related.
Contents |
Statement of the theorem
Suppose M is an m-by-n matrix whose entries come from the field K, which is either the field of real numbers or the field of complex numbers. Then there exists a factorization of the form
- <math>M = U\Sigma V^*, \,\!</math>
where U is an m-by-m unitary matrix over K, the matrix Σ is m-by-n with nonnegative numbers on the diagonal and zeros off the diagonal, and V* denotes the conjugate transpose of V, an n-by-n unitary matrix over K. Such a factorization is called a singular-value decomposition of M.
- The matrix V thus contains a set of orthogonal "input" or "analysing" base-vector directions for M
- The matrix U contains a set of orthogonal "output" base-vector directions for M
- The matrix Σ contains the singular values, which can be thought of as scalar "gain controls" by which each corresponding input is multiplied to give a corresponding output.
One commonly insists that the values Σi,i be ordered in non-increasing fashion. In this case, the diagonal matrix Σ is uniquely determined by M (though the matrices U and V are not).
Singular values, singular vectors, and their relation to the SVD
A non-negative real number σ is a singular value for M if and only if there exist normalized vectors u in Km and v in Kn such that
- <math>Mv = \sigma u \,\mbox{ and } M^*u = \sigma v. \,\!</math>
The vectors u and v are called left-singular and right-singular vectors for σ, respectively.
In any singular value decomposition
- <math>M = U\Sigma V^* \,\!</math>
the diagonal entries of Σ are necessarily equal to the singular values of M. The columns of U and V are left- resp. right-singular vectors for the corresponding singular values. Consequently, the above theorem states that
- An m × n matrix M has at least one and at most <math>p = \min(m,n)</math> distinct singular values.
- It is always possible to find a unitary basis for Km consisting of left-singular vectors of M.
- It is always possible to find a unitary basis for Kn consisting of right-singular vectors of M.
A singular value for which we can find two left (or right) singular vectors that are not linearly dependent is called degenerate.
Non-degenerate singular values always have unique left and right singular vectors, up to multiplication by a unit phase factor eiφ (for the real case up to sign). Consequently, if all singular values of M are non-degenerate and non-zero, then its singular value decomposition is unique, up to multiplication of a column of U by a unit phase factor and simultaneous multiplication of the corresponding column of V by the same unit phase factor.
Degenerate singular values, by definition, have non-unique singular vectors. Furthermore, if <math>u_{1}</math> and <math>u_{2}</math> are two left-singular vectors which both correspond to the singular value <math>\sigma</math>, then any normalized linear combination of the two vectors is also a left singular vector corresponding to the singular value <math>\sigma</math>. The similar statement is true for right singular vectors. Consequently, if M has degenerate singular values, then its singular value decomposition is not unique.
Relation to eigenvalue decomposition
The singular value decomposition is very general in the sense that it can be applied to any m × n matrix. The eigenvalue decomposition, on the other hand, can only be applied to (certain classes of) square matrices. Nevertheless, the two decompositions are related.
In the special case that M is a Hermitian matrix which is positive semi-definite, i.e., all its eigenvalues are real and non-negative, then the singular values and singular vectors coincide with the eigenvalues and eigenvectors of M,
- <math>M = V \Lambda V^*\,</math>
More generally, given an SVD of M, the following two relations hold:
- <math>
M^{*} M = V \Sigma^{*} U^{*}\, U \Sigma V^{*} = V (\Sigma^{*} \Sigma) V^{*}\, </math>
- <math>
M M^{*} = U \Sigma V^{*} \, V \Sigma^{*} U^{*} = U (\Sigma \Sigma^{*}) U^{*}\, </math>
The right hand sides of these relations describe the eigenvalue decompositions of the left hand sides. Consequently, the squares of the non-zero singular values of M are equal to the non-zero eigenvalues of either M*M or MM*. Furthermore, the columns of U (left singular vectors) are eigenvectors of MM* and the columns of V (right singular vectors) are eigenvectors of M*M.
Geometric meaning
Because U and V are unitary, we know that the columns u1,...,um of U yield an orthonormal basis of Km and the columns v1,...,vn of V yield an orthonormal basis of Kn (with respect to the standard scalar products on these spaces).
The linear transformation T: Kn → Km that takes a vector x to Mx has a particularly simple description with respect to these orthonormal bases: we have T(vi) = σi ui, for i = 1,...,min(m,n), where σi is the i-th diagonal entry of Σ, and T(vi) = 0 for i > min(m,n).
The geometric content of the SVD theorem can thus be summarized as follows: for every linear map T: Kn → Km one can find orthonormal bases of Kn and Km such that T maps the i-th basis vector of Kn to a non-negative multiple of the i-th basis vector of Km, and sends the left-over basis vectors to zero. With respect to these bases, the map T is therefore represented by a diagonal matrix with non-negative real diagonal entries.
Reduced SVDs
In applications it is quite unusual for the full SVD, including a full unitary decomposition of the null-space of the matrix, to be required. Instead, it is often sufficient (as well as faster, and more economical for storage) to compute a reduced version of the SVD. The following can be distinguished for an m×n matrix M of rank r:
Thin SVD
- <math>M = U_n \Sigma_n V^{*} \,</math>
Only the n column vectors of U corresponding to the row vectors of V* are calculated. The remaining column vectors of U are not calculated. This is significantly quicker and more economical than the full SVD if n<<m. The matrix Un is thus m×n, Σn is n×n diagonal, and V is n×n.
The first stage in the calculation of a thin SVD will usually be a QR decomposition of M, which can make for a significantly quicker calculation if n<<m.
Compact SVD
- <math>M = U_r \Sigma_r V_r^*</math>
Only the r column vectors of U and r row vectors of V* corresponding to the non-zero singular values Σr are calculated. The remaining vectors of U and V* are not calculated. This is quicker and more economical than the thin SVD if r<<n. The matrix Ur is thus m×r, Σr is r×r diagonal, and Vr* is r×n.
Truncated SVD
- <math>\tilde{M} = U_t \Sigma_t V_t^*</math>
Only the t column vectors of U and t row vectors of V* corresponding to the t largest singular values Σr are calculated. The rest of the matrix is discarded. This can be much quicker and more economical than the thin SVD if t<<r. The matrix Ut is thus m×t, Σt is t×t diagonal, and Vt* is t×n'.
Of course the truncated SVD is no longer an exact decomposition of the original matrix M, but as discussed below, the approximate matrix <math>\tilde{M}</math> is in a very useful sense the closest approximation to M that can be achieved by a matrix of rank t.
Norms
The sum of the k largest singular values of M is a matrix norm, the Ky Fan k-norm of M. The Ky Fan 1-norm is just the operator norm of M as a linear operator with respect to the Euclidean norms of Km and Kn. The square root of the sum of squares of the singular values is the Frobenius norm of M.
Applications of the SVD
Pseudoinverse
The singular value decomposition can be used for computing the pseudoinverse of a matrix. Indeed, the pseudoinverse of the matrix M with singular value decomposition <math> M = U\Sigma V^*</math> is
- <math> M^+ = V \Sigma^+ U^*, \,</math>
where Σ+ is the transpose of Σ with every nonzero entry replaced by its reciprocal. The pseudoinverse is one way to solve linear least squares problems.
Range, null space and rank
Another application of the SVD is that it provides an explicit representation of the range and null space of a matrix M. The right singular vectors corresponding to vanishing singular values of M span the null space of M. The left singular vectors corresponding to the non-zero singluar vectors of M span the range of M. As a consequence, the rank of M equals the number of non-zero singular values of M. In numerical linear algebra the singular values can be used to determine the effective rank of a matrix, as rounding error may lead to small but non-zero singular values in a rank deficient matrix.
Matrix approximation
Some practical applications need to solve the problem of approximating a matrix <math>M</math> with another matrix <math>\tilde{M}</math> which has a specific rank <math>r</math>. In the case that the approximation is based on minimizing the Frobenius norm of the difference between <math>M</math> and <math>\tilde{M}</math> under the constraint that <math>\mbox{rank}(\tilde{M}) = r</math> it turns out that the solution is given by the SVD of <math>M</math>, namely
- <math>
\tilde{M} = U \tilde{\Sigma} V^{\star} </math>
where <math>\tilde{\Sigma}</math> is the same matrix as <math>\Sigma</math> except that it contains only the <math>r</math> largest singular values (the other singular values are replaced by zero).
Other examples
The SVD is also applied extensively to the study of linear inverse problems, and is useful in the analysis of regularization methods such as that of Tikhonov. It is widely used in statistics where it is related to principal component analysis, and in signal processing and pattern recognition. It is also used in output-only modal analysis, where the non-scaled mode shapes can be determined from the singular vectors.
One application of SVD to rather large matrices is in numerical weather prediction, where Lanczos methods are used to estimate the most linearly quickly growing few perturbations to the central numerical weather prediction over a given initial forward time period -- ie the singular vectors corresponding to the largest singular values of the linearised propagator for the global weather over that time interval. The output singular vectors in this case are entire weather systems! These perturbations are then run through the full nonlinear model to generate an ensemble forecast, giving a handle on some of the uncertainty that should be allowed for around the current central prediction.
Computation of the SVD
The LAPACK subroutine DGESVD represents a typical approach to the computation of the singular value decomposition. If the matrix has more rows than columns a QR decomposition is first performed. The factor R is then reduced to a bidiagonal matrix. The desired singular values and vectors are then found by performing a bidiagonal QR iteration, using the LAPACK routine DBDSQR (See Demmel and Kahan for details).
The GNU Scientific Library offers four functions, one with the Golub-Rinsch algorithm, one with the modified Golub-Rinsch algorithm (faster for matrix with much larger height than width), one with a one-sided Jacobi orthogonalization and one which uses only non-zero singular values. See the GSL manual page on SVD.
History
The singular value decomposition was originally developed by differential geometers, who wished to determine whether a real bilinear forms could be made equal to another by independent orthogonal transformations of the two spaces it acts on. Eugenio Beltrami and Camille Jordan discovered independently, in 1873 and 1874 respectively, that the singular values of the bilinear forms, represented as a matrix, form a complete set of invariants for bilinear forms under orthogonal substitutions. James Joseph Sylvester also arrived at the singular value decomposition for real square matrices in 1889, apparently independent of both Beltrami and Jordan. Sylvester called the singular values the canonical multipliers of the matrix A. The fourth mathematician to discover the singular value decomposition independently is Autonne in 1915, who arrived at it via the polar decomposition. The first proof of the singular value decomposition for rectangular and complex matrices seems to be by Eckart and Young in 1939; they saw it as a generalization of the principal axis transformation for Hermitian matrices.
In 1907, Erhard Schmidt defined an analog of singular values for integral operators; it seems he was unaware of the parallel work on singular values of finite matrices. This theory was further developed by Émile Picard in 1910, who is the first to call the numbers <math>\sigma_k</math> singular values (or rather, valeurs singulières).
See also
- matrix decomposition
- s-number
- generalized singular value decomposition
- polar decomposition
- empirical orthogonal functions (EOFs)
- canonical correlation analysis (CCA)
- latent semantic analysis
External links
- LAPACK users manual gives details of subroutines to calculate the SVD (see also [1]).
- Applications of SVD on PC Hansen's web site.
- Introduction to the Singular Value Decomposition by Todd Will of the University of Wisconsin--La Crosse.
- Los Alamos group's book chapter has helpful gene data analysis examples.
- MIT Lecture series by Gilbert Strang. See Lecture #29 on the SVD.
- Java SVD library routine.
- Java applet demonstrating the SVD.
- Java script demonstrating the SVD more extensively, paste your data from a spreadsheet.
- Chapter from "Numerical Recipes in C" gives more information about implementation and applications of SVD.
- Online Matrix Calculator Performs singular value decomposition of matrices.
References
- Demmel, J. and Kahan, W. (1990). Computing Small Singular Values of Bidiagonal Matrices With Guaranteed High Relative Accuracy. SIAM J. Sci. Statist. Comput., 11 (5), 873-912.
- Golub, G. H. and Van Loan, C. F. (1996). "Matrix Computations". 3rd ed., Johns Hopkins University Press, Baltimore. ISBN 0801854148.
- Halldor, Bjornsson and Venegas, Silvia A. (1997). "A manual for EOF and SVD analyses of climate data". McGill University, CCGCR Report No. 97-1, Montréal, Québec, 52pp.
- Hansen, P. C. (1987). The truncated SVD as a method for regularization. BIT, 27, 534-553.
- Horn, Roger A. and Johnson, Charles R (1985). "Matrix Analysis". Section 7.3. Cambridge University Press. ISBN 0-521-38632-2.
- Horn, Roger A. and Johnson, Charles R (1991). Topics in Matrix Analysis, Chapter 3. Cambridge University Press. ISBN 0-521-46713-6.
- Strang G (1998). "Introduction to Linear Algebra". Section 6.7. 3rd ed., Wellesley-Cambridge Press. ISBN 0961408855.de:Singulärwertzerlegung