MATLAB以svd函数来执行svd分解法, 其语法为[S,V,D]=svd(A)。
Singular value decomposition

In linear algebra, the singular value decomposition (SVD) is a factorization of a real or complex matrix, with many useful applications in signal processing and statistics.
Formally, the singular value decomposition of an m×n real or complex matrix M is a factorization of the form
where U is an m×m real or complex unitary matrix, Σ is an m×n rectangular diagonal matrix with nonnegative real numbers on the diagonal, and V* (the conjugate transpose of V) is an n×n real or complex unitary matrix. The diagonal entries Σi,i of Σ are known as the singular values of M. The m columns of U and the n columns of V are called the left singular vectors and right singular vectors of M, respectively.
The singular value decomposition and the eigendecomposition are closely related. Namely:
-
- The left singular vectors of M are eigenvectors of
- The right singular vectors of M are eigenvectors of
- The non-zero singular values of M (found on the diagonal entries of Σ) are the square roots of the non-zero eigenvalues of both
and
- The left singular vectors of M are eigenvectors of
Applications which employ the SVD include computing the pseudoinverse, least squares fitting of data, matrix approximation, and determining the rank, range and null space of a matrix.
[edit] Statement of the theorem
Suppose M is an m×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
where U is an m×m unitary matrix over K, the matrix Σ is an m×n diagonal matrix with nonnegative real numbers on the diagonal, and the n×n unitary matrix V* denotes the conjugate transpose of V. Such a factorization is called the singular value decomposition of M.
The diagonal entries of Σ are known as the singular values of M. A common convention is to list the singular values in descending order. In this case, the diagonal matrix Σ is uniquely determined by M (though the matrices U and V are not).
[edit] Intuitive interpretations
[edit] Rotation, scaling, rotation
In the special but common case in which M is just an m×m square matrix with positive determinant whose entries are plain real numbers, then U, V*, and Σ are m×m matrices of real numbers as well, Σ can be regarded as a scaling matrix, and U and V* can be viewed as rotation matrices.
If the above mentioned conditions are met, the expression can thus be intuitively interpreted as a composition (or sequence) of three geometrical transformations: a rotation, a scaling, and another rotation. For instance, the figure above explains how a shear matrix can be described as such a sequence.
[edit] Singular values as semiaxis of an ellipse or ellipsoid
As shown in the figure, the singular values can be interpreted as the semiaxes of an ellipse in 2-D. This concept can be generalized to n-dimensional Euclidean space, with the singular values of any n×n square matrix being viewed as the semiaxes of an n-dimensional ellipsoid. See below for further details.
[edit] U and V are orthonormal bases
Since U and V* are unitary, the columns of each of them form a set of orthonormal vectors, which can be regarded as basis vectors. By the definition of unitary matrix, the same is true for their conjugate transposes U* and V. In short, U, U*, V, and V* are orthonormal bases.
[edit] Example
Consider the 4×5 matrix
A singular value decomposition of this matrix is given by