Template:Short description Template:Use dmy dates Template:CS1 config
In linear algebra, the singular value decomposition (SVD) is a factorization of a real or complex matrix into a rotation, followed by a rescaling followed by another rotation. It generalizes the eigendecomposition of a square normal matrix with an orthonormal eigenbasis to any Template:Tmath matrix. It is related to the polar decomposition.
Specifically, the singular value decomposition of an <math>m \times n</math> complex matrix Template:Tmath is a factorization of the form <math>\mathbf{M} = \mathbf{U\Sigma V^*},</math> where Template:Tmath is an Template:Tmath complex unitary matrix, <math>\mathbf \Sigma</math> is an <math>m \times n</math> rectangular diagonal matrix with non-negative real numbers on the diagonal, Template:Tmath is an <math>n \times n</math> complex unitary matrix, and <math>\mathbf V^*</math> is the conjugate transpose of Template:Tmath. Such decomposition always exists for any complex matrix. If Template:Tmath is real, then Template:Tmath and Template:Tmath can be guaranteed to be real orthogonal matrices; in such contexts, the SVD is often denoted <math>\mathbf U \mathbf \Sigma \mathbf V^\mathrm{T}.</math>
The diagonal entries <math>\sigma_i = \Sigma_{i i}</math> of <math>\mathbf \Sigma</math> are uniquely determined by Template:Tmath and are known as the singular values of Template:Tmath. The number of non-zero singular values is equal to the rank of Template:Tmath. The columns of Template:Tmath and the columns of Template:Tmath are called left-singular vectors and right-singular vectors of Template:Tmath, respectively. They form two sets of orthonormal bases Template:Tmath and Template:Tmath and if they are sorted so that the singular values <math>\sigma_i</math> with value zero are all in the highest-numbered columns (or rows), the singular value decomposition can be written as
<math display=block> \mathbf{M} = \sum_{i=1}^{r}\sigma_i\mathbf{u}_i\mathbf{v}_i^{*}, </math>
where <math>r \leq \min\{m,n\}</math> is the rank of Template:Tmath
The SVD is not unique. However, it is always possible to choose the decomposition such that the singular values <math>\Sigma_{i i}</math> are in descending order. In this case, <math>\mathbf \Sigma</math> (but not Template:Tmath and Template:Tmath) is uniquely determined by Template:Tmath
The term sometimes refers to the compact SVD, a similar decomposition Template:Tmath in which Template:Tmath is square diagonal of size Template:Tmath where Template:Tmath is the rank of Template:Tmath and has only the non-zero singular values. In this variant, Template:Tmath is an Template:Tmath semi-unitary matrix and <math>\mathbf{V}</math> is an Template:Tmath semi-unitary matrix, such that <math>\mathbf U^* \mathbf U = \mathbf V^* \mathbf V = \mathbf I_r.</math>
Mathematical applications of the SVD include computing the pseudoinverse, matrix approximation, and determining the rank, range, and null space of a matrix. The SVD is also extremely useful in many areas of science, engineering, and statistics, such as signal processing, least squares fitting of data, and process control.
Intuitive interpretationsEdit
Rotation, coordinate scaling, and reflectionEdit
In the special case when Template:Tmath is an Template:Tmath real square matrix, the matrices Template:Tmath and Template:Tmath can be chosen to be real Template:Tmath matrices too. In that case, "unitary" is the same as "orthogonal". Then, interpreting both unitary matrices as well as the diagonal matrix, summarized here as Template:Tmath as a linear transformation Template:Tmath of the space Template:Tmath the matrices Template:Tmath and Template:Tmath represent rotations or reflection of the space, while Template:Tmath represents the scaling of each coordinate Template:Tmath by the factor Template:Tmath Thus the SVD decomposition breaks down any linear transformation of Template:Tmath into a composition of three geometrical transformations: a rotation or reflection Template:Nobr followed by a coordinate-by-coordinate scaling Template:Nobr followed by another rotation or reflection Template:Nobr
In particular, if Template:Tmath has a positive determinant, then Template:Tmath and Template:Tmath can be chosen to be both rotations with reflections, or both rotations without reflections.Template:Citation needed If the determinant is negative, exactly one of them will have a reflection. If the determinant is zero, each can be independently chosen to be of either type.
If the matrix Template:Tmath is real but not square, namely Template:Tmath with Template:Tmath it can be interpreted as a linear transformation from Template:Tmath to Template:Tmath Then Template:Tmath and Template:Tmath can be chosen to be rotations/reflections of Template:Tmath and Template:Tmath respectively; and Template:Tmath besides scaling the first Template:Tmath coordinates, also extends the vector with zeros, i.e. removes trailing coordinates, so as to turn Template:Tmath into Template:Tmath
Singular values as semiaxes of an ellipse or ellipsoidEdit
As shown in the figure, the singular values can be interpreted as the magnitude of the semiaxes of an ellipse in 2D. This concept can be generalized to Template:Tmath-dimensional Euclidean space, with the singular values of any Template:Tmath square matrix being viewed as the magnitude of the semiaxis of an Template:Tmath-dimensional ellipsoid. Similarly, the singular values of any Template:Tmath matrix can be viewed as the magnitude of the semiaxis of an Template:Tmath-dimensional ellipsoid in Template:Tmath-dimensional space, for example as an ellipse in a (tilted) 2D plane in a 3D space. Singular values encode magnitude of the semiaxis, while singular vectors encode direction. See below for further details.
The columns of Template:Math and Template:Math are orthonormal basesEdit
Since Template:Tmath and Template:Tmath are unitary, the columns of each of them form a set of orthonormal vectors, which can be regarded as basis vectors. The matrix Template:Tmath maps the basis vector Template:Tmath to the stretched unit vector Template:Tmath By the definition of a unitary matrix, the same is true for their conjugate transposes Template:Tmath and Template:Tmath except the geometric interpretation of the singular values as stretches is lost. In short, the columns of Template:Tmath Template:Tmath Template:Tmath and Template:Tmath are orthonormal bases. When Template:Tmath is a positive-semidefinite Hermitian matrix, Template:Tmath and Template:Tmath are both equal to the unitary matrix used to diagonalize Template:Tmath However, when Template:Tmath is not positive-semidefinite and Hermitian but still diagonalizable, its eigendecomposition and singular value decomposition are distinct.
Relation to the four fundamental subspacesEdit
- The first Template:Tmath columns of Template:Tmath are a basis of the column space of Template:Tmath.
- The last Template:Tmath columns of Template:Tmath are a basis of the null space of Template:Tmath.
- The first Template:Tmath columns of Template:Tmath are a basis of the column space of Template:Tmath (the row space of Template:Tmath in the real case).
- The last Template:Tmath columns of Template:Tmath are a basis of the null space of Template:Tmath.
Geometric meaningEdit
Because Template:Tmath and Template:Tmath are unitary, we know that the columns Template:Tmath of Template:Tmath yield an orthonormal basis of Template:Tmath and the columns Template:Tmath of Template:Tmath yield an orthonormal basis of Template:Tmath (with respect to the standard scalar products on these spaces).
<math display=block> T : \left\{\begin{aligned}
K^n &\to K^m \\ x &\mapsto \mathbf{M}x \end{aligned}\right.
</math>
has a particularly simple description with respect to these orthonormal bases: we have
<math display=block> T(\mathbf{V}_i) = \sigma_i \mathbf{U}_i, \qquad i = 1, \ldots, \min(m, n), </math>
where Template:Tmath is the Template:Tmath-th diagonal entry of Template:Tmath and Template:Tmath for Template:Tmath
The geometric content of the SVD theorem can thus be summarized as follows: for every linear map Template:Tmath one can find orthonormal bases of Template:Tmath and Template:Tmath such that Template:Tmath maps the Template:Tmath-th basis vector of Template:Tmath to a non-negative multiple of the Template:Tmath-th basis vector of Template:Tmath and sends the leftover basis vectors to zero. With respect to these bases, the map Template:Tmath is therefore represented by a diagonal matrix with non-negative real diagonal entries.
To get a more visual flavor of singular values and SVD factorization – at least when working on real vector spaces – consider the sphere Template:Tmath of radius one in Template:Tmath The linear map Template:Tmath maps this sphere onto an ellipsoid in Template:Tmath Non-zero singular values are simply the lengths of the semi-axes of this ellipsoid. Especially when Template:Tmath and all the singular values are distinct and non-zero, the SVD of the linear map Template:Tmath can be easily analyzed as a succession of three consecutive moves: consider the ellipsoid Template:Tmath and specifically its axes; then consider the directions in Template:Tmath sent by Template:Tmath onto these axes. These directions happen to be mutually orthogonal. Apply first an isometry Template:Tmath sending these directions to the coordinate axes of Template:Tmath On a second move, apply an endomorphism Template:Tmath diagonalized along the coordinate axes and stretching or shrinking in each direction, using the semi-axes lengths of Template:Tmath as stretching coefficients. The composition Template:Tmath then sends the unit-sphere onto an ellipsoid isometric to Template:Tmath To define the third and last move, apply an isometry Template:Tmath to this ellipsoid to obtain Template:Tmath As can be easily checked, the composition Template:Tmath coincides with Template:Tmath
ExampleEdit
Consider the Template:Tmath matrix
<math display=block> \mathbf{M} = \begin{bmatrix}
1 & 0 & 0 & 0 & 2 \\ 0 & 0 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0
\end{bmatrix} </math>
A singular value decomposition of this matrix is given by Template:Tmath
<math display=block>\begin{align} \mathbf{U} &= \begin{bmatrix}
\color{Green}0 & \color{Blue}-1 & \color{Cyan}0 & \color{Emerald}0 \\ \color{Green}-1 & \color{Blue}0 & \color{Cyan}0 & \color{Emerald}0 \\ \color{Green}0 & \color{Blue}0 & \color{Cyan}0 & \color{Emerald}-1 \\ \color{Green}0 & \color{Blue}0 & \color{Cyan}-1 & \color{Emerald}0
\end{bmatrix} \\[6pt]
\mathbf \Sigma &= \begin{bmatrix}
3 & 0 & 0 & 0 & \color{Gray}\mathit{0} \\ 0 & \sqrt{5} & 0 & 0 & \color{Gray}\mathit{0} \\ 0 & 0 & 2 & 0 & \color{Gray}\mathit{0} \\ 0 & 0 & 0 & \color{Red}\mathbf{0} & \color{Gray}\mathit{0}
\end{bmatrix} \\[6pt]
\mathbf{V}^* &= \begin{bmatrix} \color{Violet}0 & \color{Violet}0 & \color{Violet}-1 & \color{Violet}0 &\color{Violet}0 \\ \color{Plum}-\sqrt{0.2}& \color{Plum}0 & \color{Plum}0 & \color{Plum}0 &\color{Plum}-\sqrt{0.8} \\ \color{Magenta}0 & \color{Magenta}-1 & \color{Magenta}0 & \color{Magenta}0 &\color{Magenta}0 \\ \color{Orchid}0 & \color{Orchid}0 & \color{Orchid}0 & \color{Orchid}1 &\color{Orchid}0 \\ \color{Purple} - \sqrt{0.8} & \color{Purple}0 & \color{Purple}0 & \color{Purple}0 & \color{Purple}\sqrt{0.2}
\end{bmatrix} \end{align}</math>
The scaling matrix Template:Tmath is zero outside of the diagonal (grey italics) and one diagonal element is zero (red bold, light blue bold in dark mode). Furthermore, because the matrices Template:Tmath and Template:Tmath are unitary, multiplying by their respective conjugate transposes yields identity matrices, as shown below. In this case, because Template:Tmath and Template:Tmath are real valued, each is an orthogonal matrix.
<math display=block>\begin{align}
\mathbf{U} \mathbf{U}^* &= \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \mathbf{I}_4 \\[6pt] \mathbf{V} \mathbf{V}^* &= \begin{bmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix} = \mathbf{I}_5
\end{align}</math>
This particular singular value decomposition is not unique. For instance, we can keep Template:Tmath and Template:Tmath the same, but change the last two rows of Template:Tmath such that
<math display=block>\mathbf{V}^* = \begin{bmatrix}
\color{Violet}0 & \color{Violet}0 & \color{Violet}-1 & \color{Violet}0 &\color{Violet}0 \\ \color{Plum}-\sqrt{0.2}& \color{Plum}0 & \color{Plum}0 & \color{Plum}0 &\color{Plum}-\sqrt{0.8} \\ \color{Magenta}0 & \color{Magenta}-1 & \color{Magenta}0 & \color{Magenta}0 &\color{Magenta}0 \\ \color{Orchid}\sqrt{0.4} & \color{Orchid}0 & \color{Orchid}0 & \color{Orchid}\sqrt{0.5} & \color{Orchid}-\sqrt{0.1} \\ \color{Purple}-\sqrt{0.4} & \color{Purple}0 & \color{Purple}0 & \color{Purple}\sqrt{0.5} & \color{Purple}\sqrt{0.1}
\end{bmatrix}</math>
and get an equally valid singular value decomposition. As the matrix Template:Tmath has rank 3, it has only 3 nonzero singular values. In taking the product Template:Tmath, the final column of Template:Tmath and the final two rows of Template:Tmath are multiplied by zero, so have no effect on the matrix product, and can be replaced by any unit vectors which are orthogonal to the first three and to each-other.
The compact SVD, Template:Tmath, eliminates these superfluous rows, columns, and singular values:
<math display=block>\begin{align} \mathbf{U}_r &= \begin{bmatrix}
\color{Green}0 & \color{Blue}-1 & \color{Cyan}0 \\ \color{Green}-1 & \color{Blue}0 & \color{Cyan}0 \\ \color{Green}0 & \color{Blue}0 & \color{Cyan}0 \\ \color{Green}0 & \color{Blue}0 & \color{Cyan}-1
\end{bmatrix} \\[6pt]
\mathbf \Sigma_r &= \begin{bmatrix}
3 & 0 & 0 \\ 0 & \sqrt{5} & 0 \\ 0 & 0 & 2
\end{bmatrix} \\[6pt]
\mathbf{V}^*_r &= \begin{bmatrix} \color{Violet}0 & \color{Violet}0 & \color{Violet}-1 & \color{Violet}0 &\color{Violet}0 \\ \color{Plum}-\sqrt{0.2}& \color{Plum}0 & \color{Plum}0 & \color{Plum}0 &\color{Plum}-\sqrt{0.8} \\ \color{Magenta}0 & \color{Magenta}-1 & \color{Magenta}0 & \color{Magenta}0 &\color{Magenta}0
\end{bmatrix} \end{align}</math>
SVD and spectral decompositionEdit
Singular values, singular vectors, and their relation to the SVDEdit
A non-negative real number Template:Tmath is a singular value for Template:Tmath if and only if there exist unit-length vectors Template:Tmath in Template:Tmath and Template:Tmath in Template:Tmath such that
<math display=block>\begin{align} \mathbf{M v} &= \sigma \mathbf{u}, \\[3mu] \mathbf M^*\mathbf u &= \sigma \mathbf{v}. \end{align}</math>
The vectors Template:Tmath and Template:Tmath are called left-singular and right-singular vectors for Template:Tmath respectively.
In any singular value decomposition
<math display=block> \mathbf M = \mathbf U \mathbf \Sigma \mathbf V^* </math>
the diagonal entries of Template:Tmath are equal to the singular values of Template:Tmath The first Template:Tmath columns of Template:Tmath and Template:Tmath are, respectively, left- and right-singular vectors for the corresponding singular values. Consequently, the above theorem implies that:
- An Template:Tmath matrix Template:Tmath has at most Template:Tmath distinct singular values.
- It is always possible to find a unitary basis Template:Tmath for Template:Tmath with a subset of basis vectors spanning the left-singular vectors of each singular value of Template:Tmath
- It is always possible to find a unitary basis Template:Tmath for Template:Tmath with a subset of basis vectors spanning the right-singular vectors of each singular value of Template:Tmath
A singular value for which we can find two left (or right) singular vectors that are linearly independent is called degenerate. If Template:Tmath and Template:Tmath are two left-singular vectors which both correspond to the singular value σ, then any normalized linear combination of the two vectors is also a left-singular vector corresponding to the singular value σ. The similar statement is true for right-singular vectors. The number of independent left and right-singular vectors coincides, and these singular vectors appear in the same columns of Template:Tmath and Template:Tmath corresponding to diagonal elements of Template:Tmath all with the same value Template:Tmath
As an exception, the left and right-singular vectors of singular value 0 comprise all unit vectors in the cokernel and kernel, respectively, of Template:Tmath which by the rank–nullity theorem cannot be the same dimension if Template:Tmath Even if all singular values are nonzero, if Template:Tmath then the cokernel is nontrivial, in which case Template:Tmath is padded with Template:Tmath orthogonal vectors from the cokernel. Conversely, if Template:Tmath then Template:Tmath is padded by Template:Tmath orthogonal vectors from the kernel. However, if the singular value of Template:Tmath exists, the extra columns of Template:Tmath or Template:Tmath already appear as left or right-singular vectors.
Non-degenerate singular values always have unique left- and right-singular vectors, up to multiplication by a unit-phase factor Template:Tmath (for the real case up to a sign). Consequently, if all singular values of a square matrix Template:Tmath are non-degenerate and non-zero, then its singular value decomposition is unique, up to multiplication of a column of Template:Tmath by a unit-phase factor and simultaneous multiplication of the corresponding column of Template:Tmath by the same unit-phase factor. In general, the SVD is unique up to arbitrary unitary transformations applied uniformly to the column vectors of both Template:Tmath and Template:Tmath spanning the subspaces of each singular value, and up to arbitrary unitary transformations on vectors of Template:Tmath and Template:Tmath spanning the kernel and cokernel, respectively, of Template:Tmath
Relation to eigenvalue decompositionEdit
The singular value decomposition is very general in the sense that it can be applied to any Template:Tmath matrix, whereas eigenvalue decomposition can only be applied to square diagonalizable matrices. Nevertheless, the two decompositions are related.
If Template:Tmath has SVD Template:Tmath the following two relations hold:
<math display=block>\begin{align} \mathbf{M}^* \mathbf{M} &= \mathbf{V} \mathbf \Sigma^* \mathbf{U}^*\, \mathbf{U} \mathbf \Sigma \mathbf{V}^* = \mathbf{V} (\mathbf \Sigma^* \mathbf \Sigma) \mathbf{V}^*, \\[3mu] \mathbf{M} \mathbf{M}^* &= \mathbf{U} \mathbf \Sigma \mathbf{V}^*\, \mathbf{V} \mathbf \Sigma^* \mathbf{U}^* = \mathbf{U} (\mathbf \Sigma \mathbf \Sigma^*) \mathbf{U}^*. \end{align}</math>
The right-hand sides of these relations describe the eigenvalue decompositions of the left-hand sides. Consequently:
- The columns of Template:Tmath (referred to as right-singular vectors) are eigenvectors of Template:Tmath
- The columns of Template:Tmath (referred to as left-singular vectors) are eigenvectors of Template:Tmath
- The non-zero elements of Template:Tmath (non-zero singular values) are the square roots of the non-zero eigenvalues of Template:Tmath or Template:Tmath
In the special case of Template:Tmath being a normal matrix, and thus also square, the spectral theorem ensures that it can be unitarily diagonalized using a basis of eigenvectors, and thus decomposed as Template:Tmath for some unitary matrix Template:Tmath and diagonal matrix Template:Tmath with complex elements Template:Tmath along the diagonal. When Template:Tmath is positive semi-definite, Template:Tmath will be non-negative real numbers so that the decomposition Template:Tmath is also a singular value decomposition. Otherwise, it can be recast as an SVD by moving the phase Template:Tmath of each Template:Tmath to either its corresponding Template:Tmath or Template:Tmath The natural connection of the SVD to non-normal matrices is through the polar decomposition theorem: Template:Tmath where Template:Tmath is positive semidefinite and normal, and Template:Tmath is unitary.
Thus, except for positive semi-definite matrices, the eigenvalue decomposition and SVD of Template:Tmath while related, differ: the eigenvalue decomposition is Template:Tmath where Template:Tmath is not necessarily unitary and Template:Tmath is not necessarily positive semi-definite, while the SVD is Template:Tmath where Template:Tmath is diagonal and positive semi-definite, and Template:Tmath and Template:Tmath are unitary matrices that are not necessarily related except through the matrix Template:Tmath While only non-defective square matrices have an eigenvalue decomposition, any Template:Tmath matrix has a SVD.
Applications of the SVDEdit
PseudoinverseEdit
The singular value decomposition can be used for computing the pseudoinverse of a matrix. The pseudoinverse of the matrix Template:Tmath with singular value decomposition Template:Tmath is
<math display=block> \mathbf M^+ = \mathbf V \boldsymbol \Sigma^+ \mathbf U^\ast, </math>
where <math>\boldsymbol \Sigma^+</math> is the pseudoinverse of <math>\boldsymbol \Sigma</math>, which is formed by replacing every non-zero diagonal entry by its reciprocal and transposing the resulting matrix. The pseudoinverse is one way to solve linear least squares problems.
Solving homogeneous linear equationsEdit
A set of homogeneous linear equations can be written as Template:Tmath for a matrix Template:Tmath and vector Template:Tmath A typical situation is that Template:Tmath is known and a non-zero Template:Tmath is to be determined which satisfies the equation. Such an Template:Tmath belongs to Template:Tmath's null space and is sometimes called a (right) null vector of Template:Tmath The vector Template:Tmath can be characterized as a right-singular vector corresponding to a singular value of Template:Tmath that is zero. This observation means that if Template:Tmath is a square matrix and has no vanishing singular value, the equation has no non-zero Template:Tmath as a solution. It also means that if there are several vanishing singular values, any linear combination of the corresponding right-singular vectors is a valid solution. Analogously to the definition of a (right) null vector, a non-zero Template:Tmath satisfying Template:Tmath with Template:Tmath denoting the conjugate transpose of Template:Tmath is called a left null vector of Template:Tmath
Total least squares minimizationEdit
A total least squares problem seeks the vector Template:Tmath that minimizes the 2-norm of a vector Template:Tmath under the constraint <math> \| \mathbf x \| = 1.</math> The solution turns out to be the right-singular vector of Template:Tmath corresponding to the smallest singular value.
Range, null space and rankEdit
Another application of the SVD is that it provides an explicit representation of the range and null space of a matrix Template:Tmath The right-singular vectors corresponding to vanishing singular values of Template:Tmath span the null space of Template:Tmath and the left-singular vectors corresponding to the non-zero singular values of Template:Tmath span the range of Template:Tmath For example, in the above example the null space is spanned by the last row of Template:Tmath and the range is spanned by the first three columns of Template:Tmath
As a consequence, the rank of Template:Tmath equals the number of non-zero singular values which is the same as the number of non-zero diagonal elements in <math>\mathbf \Sigma</math>. 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. Singular values beyond a significant gap are assumed to be numerically equivalent to zero.
Low-rank matrix approximationEdit
Some practical applications need to solve the problem of approximating a matrix Template:Tmath with another matrix <math>\tilde{\mathbf{M}}</math>, said to be truncated, which has a specific rank Template:Tmath. In the case that the approximation is based on minimizing the Frobenius norm of the difference between Template:Tmath and Template:Tmath under the constraint that <math>\operatorname{rank}\bigl(\tilde{\mathbf{M}}\bigr) = r,</math> it turns out that the solution is given by the SVD of Template:Tmath namely
<math display=block> \tilde{\mathbf{M}} = \mathbf{U} \tilde{\mathbf \Sigma} \mathbf{V}^*, </math>
where <math>\tilde{\mathbf \Sigma}</math> is the same matrix as <math>\mathbf \Sigma</math> except that it contains only the Template:Tmath largest singular values (the other singular values are replaced by zero). This is known as the Eckart–Young theorem, as it was proved by those two authors in 1936 (although it was later found to have been known to earlier authors; see Template:Harvnb).
Image compressionEdit
One practical consequence of the low-rank approximation given by SVD is that a greyscale image represented as an <math>m \times n</math> matrix <math>A</math>, can be efficiently represented by keeping the first <math>k</math> singular values and corresponding vectors. The truncated decomposition
<math>A_k = \mathbf{U}_k \mathbf{\Sigma}_k \mathbf{V}^T_k</math>
gives an image which minimizes the Frobenius error compared to the original image. Thus, the task becomes finding a close approximation <math>A_k</math> that balances retaining perceptual fidelity with the number of vectors required to reconstruct the image. Storing <math>A_k</math> requires only <math>k(n + m + 1)</math> numbers compared to <math>nm</math>. This same idea extends to color images by applying this operation to each channel or stacking the channels into one matrix.
Since the singular values of most natural images decay quickly, most of their variance is often captured by a small <math>k</math>. For a 1528 × 1225 greyscale image, we can achieve a relative error of <math>.7%</math> with as little as <math>k = 100</math>.<ref>Template:Cite book</ref> In practice, however, computing the SVD can be too computationally expensive and the resulting compression is typically less storage efficient than a specialized algorithm such as JPEG.
Separable modelsEdit
The SVD can be thought of as decomposing a matrix into a weighted, ordered sum of separable matrices. By separable, we mean that a matrix Template:Tmath can be written as an outer product of two vectors Template:Tmath or, in coordinates, Template:Tmath Specifically, the matrix Template:Tmath can be decomposed as,
<math display=block> \mathbf{M} = \sum_i \mathbf{A}_i = \sum_i \sigma_i \mathbf U_i \otimes \mathbf V_i. </math>
Here Template:Tmath and Template:Tmath are the Template:Tmath-th columns of the corresponding SVD matrices, Template:Tmath are the ordered singular values, and each Template:Tmath is separable. The SVD can be used to find the decomposition of an image processing filter into separable horizontal and vertical filters. Note that the number of non-zero Template:Tmath is exactly the rank of the matrix.Template:Citation needed Separable models often arise in biological systems, and the SVD factorization is useful to analyze such systems. For example, some visual area V1 simple cells' receptive fields can be well described<ref>Template:Cite journal</ref> by a Gabor filter in the space domain multiplied by a modulation function in the time domain. Thus, given a linear filter evaluated through, for example, reverse correlation, one can rearrange the two spatial dimensions into one dimension, thus yielding a two-dimensional filter (space, time) which can be decomposed through SVD. The first column of Template:Tmath in the SVD factorization is then a Gabor while the first column of Template:Tmath represents the time modulation (or vice versa). One may then define an index of separability
<math display=block> \alpha = \frac{\sigma_1^2}{\sum_i \sigma_i^2}, </math>
which is the fraction of the power in the matrix M which is accounted for by the first separable matrix in the decomposition.<ref>Template:Cite journal</ref>
Nearest orthogonal matrixEdit
It is possible to use the SVD of a square matrix Template:Tmath to determine the orthogonal matrix Template:Tmath closest to Template:Tmath The closeness of fit is measured by the Frobenius norm of Template:Tmath The solution is the product Template:Tmath<ref>The Singular Value Decomposition in Symmetric (Lowdin) Orthogonalization and Data Compression</ref> This intuitively makes sense because an orthogonal matrix would have the decomposition Template:Tmath where Template:Tmath is the identity matrix, so that if Template:Tmath then the product Template:Tmath amounts to replacing the singular values with ones. Equivalently, the solution is the unitary matrix Template:Tmath of the Polar Decomposition <math>\mathbf M = \mathbf R \mathbf P = \mathbf P' \mathbf R</math> in either order of stretch and rotation, as described above.
A similar problem, with interesting applications in shape analysis, is the orthogonal Procrustes problem, which consists of finding an orthogonal matrix Template:Tmath which most closely maps Template:Tmath to Template:Tmath Specifically,
<math display=block> \mathbf{O} = \underset\Omega\operatorname{argmin} \|\mathbf{A}\boldsymbol{\Omega} - \mathbf{B}\|_F \quad\text{subject to}\quad \boldsymbol{\Omega}^\operatorname{T}\boldsymbol{\Omega} = \mathbf{I}, </math>
where <math>\| \cdot \|_F</math> denotes the Frobenius norm.
This problem is equivalent to finding the nearest orthogonal matrix to a given matrix <math>\mathbf M = \mathbf A^\operatorname{T} \mathbf B</math>.
The Kabsch algorithmEdit
The Kabsch algorithm (called Wahba's problem in other fields) uses SVD to compute the optimal rotation (with respect to least-squares minimization) that will align a set of points with a corresponding set of points. It is used, among other applications, to compare the structures of molecules.
Principal Component AnalysisEdit
The SVD can be used to construct the principal components<ref>Template:Cite book</ref> in principal component analysis as follows:
Let <math>\mathbf{X} \in \mathbb{R}^{N \times p}</math> be a data matrix where each of the <math>N</math> rows is a (feature-wise) mean-centered observation, each of dimension <math>p</math>.
The SVD of <math>\mathbf{X}</math> is: <math display="block"> \mathbf{X} = \mathbf{V} \boldsymbol{\Sigma} \mathbf{U}^\ast </math>
From the same reference,<ref>Template:Cite book</ref> we see that <math>\mathbf{V} \boldsymbol{\Sigma}</math> contains the scores of the rows of <math>\mathbf{X}</math> (i.e. each observation), and <math>\mathbf{U}</math> is the matrix whose columns are principal component loading vectors.
Signal processingEdit
The SVD and pseudoinverse have been successfully applied to signal processing,<ref>Template:Cite journal</ref> image processing<ref name="Mademlis2018">Template:Cite book</ref> and big data (e.g., in genomic signal processing).<ref> Template:Cite journal</ref><ref>Template:Cite journal</ref><ref>Template:Cite journal</ref><ref>Template:Cite journal</ref>
Other examplesEdit
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 to correspondence 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. Yet another usage is latent semantic indexing in natural-language text processing.
In general numerical computation involving linear or linearized systems, there is a universal constant that characterizes the regularity or singularity of a problem, which is the system's "condition number" <math>\kappa := \sigma_\text{max} / \sigma_\text{min}</math>. It often controls the error rate or convergence rate of a given computational scheme on such systems.<ref>Template:Cite journal</ref><ref>Template:Cite journal</ref>
The SVD also plays a crucial role in the field of quantum information, in a form often referred to as the Schmidt decomposition. Through it, states of two quantum systems are naturally decomposed, providing a necessary and sufficient condition for them to be entangled: if the rank of the <math>\mathbf \Sigma</math> matrix is larger than one.
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; i.e., the singular vectors corresponding to the largest singular values of the linearized 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.
SVD has also been applied to reduced order modelling. The aim of reduced order modelling is to reduce the number of degrees of freedom in a complex system which is to be modeled. SVD was coupled with radial basis functions to interpolate solutions to three-dimensional unsteady flow problems.<ref>Template:Cite journal</ref>
Interestingly, SVD has been used to improve gravitational waveform modeling by the ground-based gravitational-wave interferometer aLIGO.<ref>Template:Cite journal</ref> SVD can help to increase the accuracy and speed of waveform generation to support gravitational-waves searches and update two different waveform models.
Singular value decomposition is used in recommender systems to predict people's item ratings.<ref>Template:Cite report</ref> Distributed algorithms have been developed for the purpose of calculating the SVD on clusters of commodity machines.<ref>Template:Cite arXiv</ref>
Low-rank SVD has been applied for hotspot detection from spatiotemporal data with application to disease outbreak detection.<ref>Template:Cite journal</ref> A combination of SVD and higher-order SVD also has been applied for real time event detection from complex data streams (multivariate data with space and time dimensions) in disease surveillance.<ref>Template:Cite journal</ref>
In astrodynamics, the SVD and its variants are used as an option to determine suitable maneuver directions for transfer trajectory design<ref name=muralidharan2023stretching>Template:Cite journal</ref> and orbital station-keeping.<ref name=Muralidharan2021>Template:Cite journal</ref>
The SVD can be used to measure the similarity between real-valued matrices.<ref name=albers2025>Template:Cite journal</ref> By measuring the angles between the singular vectors, the inherent two-dimensional structure of matrices is accounted for. This method was shown to outperform cosine similarity and Frobenius norm in most cases, including brain activity measurements from neuroscience experiments.
Proof of existenceEdit
An eigenvalue Template:Tmath of a matrix Template:Tmath is characterized by the algebraic relation Template:Tmath When Template:Tmath is Hermitian, a variational characterization is also available. Let Template:Tmath be a real Template:Tmath symmetric matrix. Define
<math display=block> f : \left\{ \begin{align} \R^n &\to \R \\ \mathbf{x} &\mapsto \mathbf{x}^\operatorname{T} \mathbf{M} \mathbf{x} \end{align}\right.</math>
By the extreme value theorem, this continuous function attains a maximum at some Template:Tmath when restricted to the unit sphere <math>\{\|\mathbf x\| = 1\}.</math> By the Lagrange multipliers theorem, Template:Tmath necessarily satisfies
<math display=block>\nabla \mathbf{u}^\operatorname{T} \mathbf{M} \mathbf{u} - \lambda \cdot \nabla \mathbf{u}^\operatorname{T} \mathbf{u} = 0</math>
for some real number Template:Tmath The nabla symbol, Template:Tmath, is the del operator (differentiation with respect to Template:Nobr Using the symmetry of Template:Tmath we obtain
<math display=block>\nabla \mathbf{x}^\operatorname{T} \mathbf{M} \mathbf{x} - \lambda \cdot \nabla \mathbf{x}^\operatorname{T} \mathbf{x} = 2(\mathbf{M}-\lambda \mathbf{I})\mathbf{x}.</math>
Therefore Template:Tmath so Template:Tmath is a unit length eigenvector of Template:Tmath For every unit length eigenvector Template:Tmath of Template:Tmath its eigenvalue is Template:Tmath so Template:Tmath is the largest eigenvalue of Template:Tmath The same calculation performed on the orthogonal complement of Template:Tmath gives the next largest eigenvalue and so on. The complex Hermitian case is similar; there Template:Tmath is a real-valued function of Template:Tmath real variables.
Singular values are similar in that they can be described algebraically or from variational principles. Although, unlike the eigenvalue case, Hermiticity, or symmetry, of Template:Tmath is no longer required.
This section gives these two arguments for existence of singular value decomposition.
Based on the spectral theoremEdit
Let <math>\mathbf{M}</math> be an Template:Tmath complex matrix. Since <math>\mathbf{M}^* \mathbf{M}</math> is positive semi-definite and Hermitian, by the spectral theorem, there exists an Template:Tmath unitary matrix <math>\mathbf{V}</math> such that
<math display=block> \mathbf V^* \mathbf M^* \mathbf M \mathbf V = \bar\mathbf{D} = \begin{bmatrix} \mathbf{D} & 0 \\ 0 & 0\end{bmatrix}, </math>
where <math>\mathbf{D}</math> is diagonal and positive definite, of dimension <math>\ell\times \ell</math>, with <math>\ell</math> the number of non-zero eigenvalues of <math>\mathbf{M}^* \mathbf{M}</math> (which can be shown to verify <math>\ell\le\min(n,m)</math>). Note that <math>\mathbf{V}</math> is here by definition a matrix whose <math>i</math>-th column is the <math>i</math>-th eigenvector of <math>\mathbf{M}^* \mathbf{M}</math>, corresponding to the eigenvalue <math>\bar{\mathbf{D}}_{ii}</math>. Moreover, the <math>j</math>-th column of <math>\mathbf{V}</math>, for <math>j>\ell</math>, is an eigenvector of <math>\mathbf{M}^* \mathbf{M}</math> with eigenvalue <math>\bar{\mathbf{D}}_{jj}=0</math>. This can be expressed by writing <math>\mathbf{V}</math> as <math>\mathbf{V}=\begin{bmatrix}\mathbf{V}_1 &\mathbf{V}_2\end{bmatrix}</math>, where the columns of <math>\mathbf{V}_1</math> and <math>\mathbf{V}_2</math> therefore contain the eigenvectors of <math>\mathbf{M}^* \mathbf{M}</math> corresponding to non-zero and zero eigenvalues, respectively. Using this rewriting of <math>\mathbf{V}</math>, the equation becomes:
<math display=block> \begin{bmatrix} \mathbf{V}_1^* \\ \mathbf{V}_2^* \end{bmatrix} \mathbf{M}^* \mathbf{M}\, \begin{bmatrix} \mathbf{V}_1 & \!\! \mathbf{V}_2 \end{bmatrix} = \begin{bmatrix}
\mathbf{V}_1^* \mathbf{M}^* \mathbf{M} \mathbf{V}_1 & \mathbf{V}_1^* \mathbf{M}^* \mathbf{M} \mathbf{V}_2 \\ \mathbf{V}_2^* \mathbf{M}^* \mathbf{M} \mathbf{V}_1 & \mathbf{V}_2^* \mathbf{M}^* \mathbf{M} \mathbf{V}_2
\end{bmatrix} = \begin{bmatrix} \mathbf{D} & 0 \\ 0 & 0 \end{bmatrix}.</math>
This implies that
<math display=block> \mathbf{V}_1^* \mathbf{M}^* \mathbf{M} \mathbf{V}_1 = \mathbf{D}, \quad \mathbf{V}_2^* \mathbf{M}^* \mathbf{M} \mathbf{V}_2 = \mathbf{0}. </math>
Moreover, the second equation implies <math>\mathbf{M}\mathbf{V}_2 = \mathbf{0}</math>.<ref>To see this, we just have to notice that <math>\operatorname{Tr}(\mathbf{V}_2^* \mathbf{M}^* \mathbf{M} \mathbf{V}_2) = \|\mathbf{M} \mathbf{V}_2\|^2</math>, and remember that <math>\|A\| = 0 \Leftrightarrow A = 0</math>.</ref> Finally, the unitary-ness of <math>\mathbf{V}</math> translates, in terms of <math>\mathbf{V}_1</math> and <math>\mathbf{V}_2</math>, into the following conditions:
<math display=block>\begin{align} \mathbf{V}_1^* \mathbf{V}_1 &= \mathbf{I}_1, \\ \mathbf{V}_2^* \mathbf{V}_2 &= \mathbf{I}_2, \\ \mathbf{V}_1 \mathbf{V}_1^* + \mathbf{V}_2 \mathbf{V}_2^* &= \mathbf{I}_{12}, \end{align}</math>
where the subscripts on the identity matrices are used to remark that they are of different dimensions.
Let us now define
<math display=block> \mathbf{U}_1 = \mathbf{M} \mathbf{V}_1 \mathbf{D}^{-\frac{1}{2}}. </math>
Then,
<math display=block> \mathbf{U}_1 \mathbf{D}^\frac{1}{2} \mathbf{V}_1^* = \mathbf{M} \mathbf{V}_1 \mathbf{D}^{-\frac{1}{2}} \mathbf{D}^\frac{1}{2} \mathbf{V}_1^* = \mathbf{M} (\mathbf{I} - \mathbf{V}_2\mathbf{V}_2^*) = \mathbf{M} - (\mathbf{M}\mathbf{V}_2)\mathbf{V}_2^* = \mathbf{M}, </math>
since <math>\mathbf{M}\mathbf{V}_2 = \mathbf{0}. </math> This can be also seen as immediate consequence of the fact that <math>\mathbf{M}\mathbf{V}_1\mathbf{V}_1^* = \mathbf{M}</math>. This is equivalent to the observation that if <math>\{\boldsymbol v_i\}_{i=1}^\ell</math> is the set of eigenvectors of <math>\mathbf{M}^* \mathbf{M}</math> corresponding to non-vanishing eigenvalues <math>\{\lambda_i\}_{i=1}^\ell</math>, then <math>\{\mathbf M \boldsymbol v_i\}_{i=1}^\ell</math> is a set of orthogonal vectors, and <math>\bigl\{\lambda_i^{-1/2}\mathbf M \boldsymbol v_i\bigr\}\vphantom|_{i=1}^\ell</math> is a (generally not complete) set of orthonormal vectors. This matches with the matrix formalism used above denoting with <math>\mathbf{V}_1</math> the matrix whose columns are <math>\{\boldsymbol v_i\}_{i=1}^\ell</math>, with <math>\mathbf{V}_2</math> the matrix whose columns are the eigenvectors of <math>\mathbf{M}^* \mathbf{M}</math> with vanishing eigenvalue, and <math>\mathbf{U}_1</math> the matrix whose columns are the vectors <math>\bigl\{\lambda_i^{-1/2}\mathbf M \boldsymbol v_i\bigr\}\vphantom|_{i=1}^\ell</math>.
We see that this is almost the desired result, except that <math>\mathbf{U}_1</math> and <math>\mathbf{V}_1</math> are in general not unitary, since they might not be square. However, we do know that the number of rows of <math>\mathbf{U}_1</math> is no smaller than the number of columns, since the dimensions of <math>\mathbf{D}</math> is no greater than <math>m</math> and <math>n</math>. Also, since
<math display=block> \mathbf{U}_1^*\mathbf{U}_1 = \mathbf{D}^{-\frac{1}{2}}\mathbf{V}_1^*\mathbf{M}^*\mathbf{M} \mathbf{V}_1 \mathbf{D}^{-\frac{1}{2}}=\mathbf{D}^{-\frac{1}{2}}\mathbf{D}\mathbf{D}^{-\frac{1}{2}} = \mathbf{I_1}, </math>
the columns in <math>\mathbf{U}_1</math> are orthonormal and can be extended to an orthonormal basis. This means that we can choose <math>\mathbf{U}_2</math> such that <math>\mathbf{U} = \begin{bmatrix} \mathbf{U}_1 & \mathbf{U}_2 \end{bmatrix}</math> is unitary.
For Template:Tmath we already have Template:Tmath to make it unitary. Now, define
<math display=block> \mathbf \Sigma = \begin{bmatrix}
\begin{bmatrix} \mathbf{D}^\frac{1}{2} & 0 \\ 0 & 0 \end{bmatrix} \\ 0
\end{bmatrix}, </math>
where extra zero rows are added or removed to make the number of zero rows equal the number of columns of Template:Tmath and hence the overall dimensions of <math>\mathbf \Sigma</math> equal to <math>m\times n</math>. Then
<math display=block> \begin{bmatrix} \mathbf{U}_1 & \mathbf{U}_2 \end{bmatrix} \begin{bmatrix}
\begin{bmatrix} \mathbf{}D^\frac{1}{2} & 0 \\ 0 & 0 \end{bmatrix} \\ 0 \end{bmatrix}
\begin{bmatrix} \mathbf{V}_1 & \mathbf{V}_2 \end{bmatrix}^* = \begin{bmatrix} \mathbf{U}_1 & \mathbf{U}_2 \end{bmatrix} \begin{bmatrix} \mathbf{D}^\frac{1}{2} \mathbf{V}_1^* \\ 0 \end{bmatrix} = \mathbf{U}_1 \mathbf{D}^\frac{1}{2} \mathbf{V}_1^* = \mathbf{M}, </math>
which is the desired result:
<math display=block> \mathbf{M} = \mathbf{U} \mathbf \Sigma \mathbf{V}^*. </math>
Notice the argument could begin with diagonalizing Template:Tmath rather than Template:Tmath (This shows directly that Template:Tmath and Template:Tmath have the same non-zero eigenvalues).
Based on variational characterizationEdit
Template:AnchorThe singular values can also be characterized as the maxima of Template:Tmath considered as a function of Template:Tmath and Template:Tmath over particular subspaces. The singular vectors are the values of Template:Tmath and Template:Tmath where these maxima are attained.
Let Template:Tmath denote an Template:Tmath matrix with real entries. Let Template:Tmath be the unit <math>(k-1)</math>-sphere in <math> \mathbb{R}^k </math>, and define <math>\sigma(\mathbf{u}, \mathbf{v}) = \mathbf{u}^\operatorname{T} \mathbf{M} \mathbf{v},</math> <math>\mathbf{u} \in S^{m-1},</math> <math>\mathbf{v} \in S^{n-1}.</math>
Consider the function Template:Tmath restricted to Template:Tmath Since both Template:Tmath and Template:Tmath are compact sets, their product is also compact. Furthermore, since Template:Tmath is continuous, it attains a largest value for at least one pair of vectors Template:Tmath in Template:Tmath and Template:Tmath in Template:Tmath This largest value is denoted Template:Tmath and the corresponding vectors are denoted Template:Tmath and Template:Tmath Since Template:Tmath is the largest value of Template:Tmath it must be non-negative. If it were negative, changing the sign of either Template:Tmath or Template:Tmath would make it positive and therefore larger.
Statement. Template:Tmath and Template:Tmath are left and right-singular vectors of Template:Tmath with corresponding singular value Template:Tmath
Proof. Similar to the eigenvalues case, by assumption the two vectors satisfy the Lagrange multiplier equation:
<math display=block> \nabla \sigma = \nabla \mathbf{u}^\operatorname{T} \mathbf{M} \mathbf{v}
- \lambda_1 \cdot \nabla \mathbf{u}^\operatorname{T} \mathbf{u} - \lambda_2 \cdot \nabla \mathbf{v}^\operatorname{T} \mathbf{v}
</math>
After some algebra, this becomes
<math display=block> \begin{align} \mathbf{M} \mathbf{v}_1 &= 2 \lambda_1 \mathbf{u}_1 + 0, \\ \mathbf{M}^\operatorname{T} \mathbf{u}_1 &= 0 + 2 \lambda_2 \mathbf{v}_1. \end{align}</math>
Multiplying the first equation from left by Template:Tmath and the second equation from left by Template:Tmath and taking <math> \| \mathbf u \| = \| \mathbf v \| = 1</math> into account gives
<math display=block> \sigma_1 = 2\lambda_1 = 2\lambda_2. </math>
Plugging this into the pair of equations above, we have
<math display=block>\begin{align} \mathbf{M} \mathbf{v}_1 &= \sigma_1 \mathbf{u}_1, \\ \mathbf{M}^\operatorname{T} \mathbf{u}_1 &= \sigma_1 \mathbf{v}_1. \end{align}</math>
This proves the statement.
More singular vectors and singular values can be found by maximizing Template:Tmath over normalized Template:Tmath and Template:Tmath which are orthogonal to Template:Tmath and Template:Tmath respectively.
The passage from real to complex is similar to the eigenvalue case.
Calculating the SVDEdit
One-sided Jacobi algorithmEdit
One-sided Jacobi algorithm is an iterative algorithm,<ref>Template:Cite journal</ref> where a matrix is iteratively transformed into a matrix with orthogonal columns. The elementary iteration is given as a Jacobi rotation,
<math display=block> M\leftarrow MJ(p, q, \theta), </math>
where the angle <math>\theta</math> of the Jacobi rotation matrix <math>J(p,q,\theta)</math> is chosen such that after the rotation the columns with numbers <math>p</math> and <math>q</math> become orthogonal. The indices <math>(p,q)</math> are swept cyclically, <math>(p=1\dots m,q=p+1\dots m)</math>, where <math>m</math> is the number of columns.
After the algorithm has converged, the singular value decomposition <math>M=USV^T</math> is recovered as follows: the matrix <math>V</math> is the accumulation of Jacobi rotation matrices, the matrix <math>U</math> is given by normalising the columns of the transformed matrix <math>M</math>, and the singular values are given as the norms of the columns of the transformed matrix <math>M</math>.
Two-sided Jacobi algorithmEdit
Two-sided Jacobi SVD algorithm—a generalization of the Jacobi eigenvalue algorithm—is an iterative algorithm where a square matrix is iteratively transformed into a diagonal matrix. If the matrix is not square the QR decomposition is performed first and then the algorithm is applied to the <math>R</math> matrix. The elementary iteration zeroes a pair of off-diagonal elements by first applying a Givens rotation to symmetrize the pair of elements and then applying a Jacobi transformation to zero them,
<math display=block> M \leftarrow J^TGMJ </math>
where <math>G</math> is the Givens rotation matrix with the angle chosen such that the given pair of off-diagonal elements become equal after the rotation, and where <math>J</math> is the Jacobi transformation matrix that zeroes these off-diagonal elements. The iterations proceeds exactly as in the Jacobi eigenvalue algorithm: by cyclic sweeps over all off-diagonal elements.
After the algorithm has converged the resulting diagonal matrix contains the singular values. The matrices <math>U</math> and <math>V</math> are accumulated as follows: <math>U\leftarrow UG^TJ</math>, <math>V\leftarrow VJ</math>.
Numerical approachEdit
The singular value decomposition can be computed using the following observations:
- The left-singular vectors of Template:Tmath are a set of orthonormal eigenvectors of Template:Tmath.
- The right-singular vectors of Template:Tmath are a set of orthonormal eigenvectors of Template:Tmath.
- The non-zero singular values of Template:Tmath (found on the diagonal entries of <math>\mathbf \Sigma</math>) are the square roots of the non-zero eigenvalues of both Template:Tmath and Template:Tmath.
The SVD of a matrix Template:Tmath is typically computed by a two-step procedure. In the first step, the matrix is reduced to a bidiagonal matrix. This takes order Template:Tmath floating-point operations (flop), assuming that Template:Tmath The second step is to compute the SVD of the bidiagonal matrix. This step can only be done with an iterative method (as with eigenvalue algorithms). However, in practice it suffices to compute the SVD up to a certain precision, like the machine epsilon. If this precision is considered constant, then the second step takes Template:Tmath iterations, each costing Template:Tmath flops. Thus, the first step is more expensive, and the overall cost is Template:Tmath flops Template:Harv.
The first step can be done using Householder reflections for a cost of Template:Tmath flops, assuming that only the singular values are needed and not the singular vectors. If Template:Tmath is much larger than Template:Tmath then it is advantageous to first reduce the matrix Template:Tmath to a triangular matrix with the QR decomposition and then use Householder reflections to further reduce the matrix to bidiagonal form; the combined cost is Template:Tmath flops Template:Harv.
The second step can be done by a variant of the QR algorithm for the computation of eigenvalues, which was first described by Template:Harvtxt. The LAPACK subroutine DBDSQR<ref>Netlib.org</ref> implements this iterative method, with some modifications to cover the case where the singular values are very small Template:Harv. Together with a first step using Householder reflections and, if appropriate, QR decomposition, this forms the DGESVD<ref>Netlib.org</ref> routine for the computation of the singular value decomposition.
The same algorithm is implemented in the GNU Scientific Library (GSL). The GSL also offers an alternative method that uses a one-sided Jacobi orthogonalization in step 2 Template:Harv. This method computes the SVD of the bidiagonal matrix by solving a sequence of Template:Tmath SVD problems, similar to how the Jacobi eigenvalue algorithm solves a sequence of Template:Tmath eigenvalue methods Template:Harv. Yet another method for step 2 uses the idea of divide-and-conquer eigenvalue algorithms Template:Harv.
There is an alternative way that does not explicitly use the eigenvalue decomposition.<ref>mathworks.co.kr/matlabcentral/fileexchange/12674-simple-svd</ref> Usually the singular value problem of a matrix Template:Tmath is converted into an equivalent symmetric eigenvalue problem such as Template:Tmath Template:Tmath or
<math display=block> \begin{bmatrix}
\mathbf{0} & \mathbf{M} \\ \mathbf{M}^* & \mathbf{0}
\end{bmatrix}. </math>
The approaches that use eigenvalue decompositions are based on the QR algorithm, which is well-developed to be stable and fast. Note that the singular values are real and right- and left- singular vectors are not required to form similarity transformations. One can iteratively alternate between the QR decomposition and the LQ decomposition to find the real diagonal Hermitian matrices. The QR decomposition gives Template:Tmath and the LQ decomposition of Template:Tmath gives Template:Tmath Thus, at every iteration, we have Template:Tmath update Template:Tmath and repeat the orthogonalizations. Eventually,Template:Clarify this iteration between QR decomposition and LQ decomposition produces left- and right- unitary singular matrices. This approach cannot readily be accelerated, as the QR algorithm can with spectral shifts or deflation. This is because the shift method is not easily defined without using similarity transformations. However, this iterative approach is very simple to implement, so is a good choice when speed does not matter. This method also provides insight into how purely orthogonal/unitary transformations can obtain the SVD.
Analytic result of 2 × 2 SVDEdit
The singular values of a Template:Tmath matrix can be found analytically. Let the matrix be <math>\mathbf{M} = z_0\mathbf{I} + z_1\sigma_1 + z_2\sigma_2 + z_3\sigma_3</math>
where <math>z_i \in \mathbb{C}</math> are complex numbers that parameterize the matrix, Template:Tmath is the identity matrix, and <math>\sigma_i</math> denote the Pauli matrices. Then its two singular values are given by
<math display=block>\begin{align} \sigma_\pm &= \sqrt{|z_0|^2 + |z_1|^2 + |z_2|^2 + |z_3|^2 \pm
\sqrt{\bigl(|z_0|^2 + |z_1|^2 + |z_2|^2 + |z_3|^2\bigr)^2 - |z_0^2 - z_1^2 - z_2^2 - z_3^2|^2}} \\
&= \sqrt{|z_0|^2 + |z_1|^2 + |z_2|^2 + |z_3|^2 \pm
2\sqrt{(\operatorname{Re}z_0z_1^*)^2 + (\operatorname{Re}z_0z_2^*)^2 + (\operatorname{Re}z_0z_3^*)^2 + (\operatorname{Im}z_1z_2^*)^2 + (\operatorname{Im}z_2z_3^*)^2 + (\operatorname{Im}z_3z_1^*)^2}}
\end{align}</math>
Reduced SVDsEdit
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 Template:Tmath matrix Template:Tmath of rank Template:Tmath:
Thin SVDEdit
The thin, or economy-sized, SVD of a matrix Template:Tmath is given by<ref> Template:Cite book </ref>
<math display=block> \mathbf{M} = \mathbf{U}_k \mathbf \Sigma_k \mathbf{V}^*_k, </math>
where <math>k = \min(m, n),</math> the matrices Template:Tmath and Template:Tmath contain only the first Template:Tmath columns of Template:Tmath and Template:Tmath and Template:Tmath contains only the first Template:Tmath singular values from Template:Tmath The matrix Template:Tmath is thus Template:Tmath Template:Tmath is Template:Tmath diagonal, and Template:Tmath is Template:Tmath
The thin SVD uses significantly less space and computation time if Template:Tmath The first stage in its calculation will usually be a QR decomposition of Template:Tmath which can make for a significantly quicker calculation in this case.
Compact SVDEdit
The compact SVD of a matrix Template:Tmath is given by
<math display=block> \mathbf{M} = \mathbf U_r \mathbf \Sigma_r \mathbf V_r^*. </math>
Only the Template:Tmath column vectors of Template:Tmath and Template:Tmath row vectors of Template:Tmath corresponding to the non-zero singular values Template:Tmath are calculated. The remaining vectors of Template:Tmath and Template:Tmath are not calculated. This is quicker and more economical than the thin SVD if Template:Tmath The matrix Template:Tmath is thus Template:Tmath Template:Tmath is Template:Tmath diagonal, and Template:Tmath is Template:Tmath
Truncated SVDEdit
In many applications the number Template:Tmath of the non-zero singular values is large making even the Compact SVD impractical to compute. In such cases, the smallest singular values may need to be truncated to compute only Template:Tmath non-zero singular values. The truncated SVD is no longer an exact decomposition of the original matrix Template:Tmath but rather provides the optimal low-rank matrix approximation Template:Tmath by any matrix of a fixed rank Template:Tmath
<math display=block> \tilde{\mathbf{M}} = \mathbf{U}_t \mathbf \Sigma_t \mathbf{V}_t^*, </math>
where matrix Template:Tmath is Template:Tmath Template:Tmath is Template:Tmath diagonal, and Template:Tmath is Template:Tmath Only the Template:Tmath column vectors of Template:Tmath and Template:Tmath row vectors of Template:Tmath corresponding to the Template:Tmath largest singular values Template:Tmath are calculated. This can be much quicker and more economical than the compact SVD if Template:Tmath but requires a completely different toolset of numerical solvers.
In applications that require an approximation to the Moore–Penrose inverse of the matrix Template:Tmath the smallest singular values of Template:Tmath are of interest, which are more challenging to compute compared to the largest ones.
Truncated SVD is employed in latent semantic indexing.<ref>Template:Cite journal </ref>
NormsEdit
Ky Fan normsEdit
The sum of the Template:Tmath largest singular values of Template:Tmath is a matrix norm, the Ky Fan Template:Tmath-norm of Template:Tmath<ref>Template:Cite journal</ref>
The first of the Ky Fan norms, the Ky Fan 1-norm, is the same as the operator norm of Template:Tmath as a linear operator with respect to the Euclidean norms of Template:Tmath and Template:Tmath In other words, the Ky Fan 1-norm is the operator norm induced by the standard <math>\ell^2</math> Euclidean inner product. For this reason, it is also called the operator 2-norm. One can easily verify the relationship between the Ky Fan 1-norm and singular values. It is true in general, for a bounded operator Template:Tmath on (possibly infinite-dimensional) Hilbert spaces
<math display=block> \| \mathbf M \| = \| \mathbf M^* \mathbf M \|^\frac{1}{2} </math>
But, in the matrix case, Template:Tmath is a normal matrix, so <math> \|\mathbf M^* \mathbf M\|^{1/2} </math> is the largest eigenvalue of Template:Tmath i.e. the largest singular value of Template:Tmath
The last of the Ky Fan norms, the sum of all singular values, is the trace norm (also known as the 'nuclear norm'), defined by <math>\| \mathbf M \| = \operatorname{Tr}(\mathbf M^* \mathbf M)^{1/2}</math> (the eigenvalues of Template:Tmath are the squares of the singular values).
Hilbert–Schmidt normTemplate:AnchorEdit
The singular values are related to another norm on the space of operators. Consider the Hilbert–Schmidt inner product on the Template:Tmath matrices, defined by
<math display=block> \langle \mathbf{M}, \mathbf{N} \rangle = \operatorname{tr} \left( \mathbf{N}^*\mathbf{M} \right). </math>
So the induced norm is
<math display=block> \| \mathbf{M} \| = \sqrt{\langle \mathbf{M}, \mathbf{M} \rangle} = \sqrt{\operatorname{tr} \left( \mathbf{M}^*\mathbf{M} \right)}. </math>
Since the trace is invariant under unitary equivalence, this shows
<math display=block> \| \mathbf{M} \| = \sqrt{\vphantom\bigg|\sum_i \sigma_i ^2} </math>
where Template:Tmath are the singular values of Template:Tmath This is called the Frobenius norm, Schatten 2-norm, or Hilbert–Schmidt norm of Template:Tmath Direct calculation shows that the Frobenius norm of Template:Tmath coincides with:
<math display=block> \sqrt{\vphantom\bigg|\sum_{ij} | m_{ij} |^2}. </math>
In addition, the Frobenius norm and the trace norm (the nuclear norm) are special cases of the Schatten norm.
Variations and generalizationsEdit
Scale-invariant SVDEdit
The singular values of a matrix Template:Tmath are uniquely defined and are invariant with respect to left and/or right unitary transformations of Template:Tmath In other words, the singular values of Template:Tmath for unitary matrices Template:Tmath and Template:Tmath are equal to the singular values of Template:Tmath This is an important property for applications in which it is necessary to preserve Euclidean distances and invariance with respect to rotations.
The Scale-Invariant SVD, or SI-SVD,<ref>Template:Citation</ref> is analogous to the conventional SVD except that its uniquely-determined singular values are invariant with respect to diagonal transformations of Template:Tmath In other words, the singular values of Template:Tmath for invertible diagonal matrices Template:Tmath and Template:Tmath are equal to the singular values of Template:Tmath This is an important property for applications for which invariance to the choice of units on variables (e.g., metric versus imperial units) is needed.
Bounded operators on Hilbert spacesEdit
The factorization Template:Tmath can be extended to a bounded operator Template:Tmath on a separable Hilbert space Template:Tmath Namely, for any bounded operator Template:Tmath there exist a partial isometry Template:Tmath a unitary Template:Tmath a measure space Template:Tmath and a non-negative measurable Template:Tmath such that
<math display=block> \mathbf{M} = \mathbf{U} T_f \mathbf{V}^* </math>
where Template:Tmath is the [[multiplication operator|multiplication by Template:Tmath]] on Template:Tmath
This can be shown by mimicking the linear algebraic argument for the matrix case above. Template:Tmath is the unique positive square root of Template:Tmath as given by the Borel functional calculus for self-adjoint operators. The reason why Template:Tmath need not be unitary is that, unlike the finite-dimensional case, given an isometry Template:Tmath with nontrivial kernel, a suitable Template:Tmath may not be found such that
<math display=block> \begin{bmatrix} U_1 \\ U_2 \end{bmatrix} </math>
is a unitary operator.
As for matrices, the singular value factorization is equivalent to the polar decomposition for operators: we can simply write
<math display=block> \mathbf M = \mathbf U \mathbf V^* \cdot \mathbf V T_f \mathbf V^* </math>
and notice that Template:Tmath is still a partial isometry while Template:Tmath is positive.
Singular values and compact operatorsEdit
The notion of singular values and left/right-singular vectors can be extended to compact operator on Hilbert space as they have a discrete spectrum. If Template:Tmath is compact, every non-zero Template:Tmath in its spectrum is an eigenvalue. Furthermore, a compact self-adjoint operator can be diagonalized by its eigenvectors. If Template:Tmath is compact, so is Template:Tmath. Applying the diagonalization result, the unitary image of its positive square root Template:Tmath has a set of orthonormal eigenvectors Template:Tmath corresponding to strictly positive eigenvalues Template:Tmath. For any Template:Tmath in Template:Tmath
<math display=block> \mathbf{M} \psi = \mathbf{U} T_f \mathbf{V}^* \psi = \sum_i \left \langle \mathbf{U} T_f \mathbf{V}^* \psi, \mathbf{U} e_i \right \rangle \mathbf{U} e_i = \sum_i \sigma_i \left \langle \psi, \mathbf{V} e_i \right \rangle \mathbf{U} e_i, </math>
where the series converges in the norm topology on Template:Tmath Notice how this resembles the expression from the finite-dimensional case. Template:Tmath are called the singular values of Template:Tmath Template:Tmath (resp. Template:Tmath) can be considered the left-singular (resp. right-singular) vectors of Template:Tmath
Compact operators on a Hilbert space are the closure of finite-rank operators in the uniform operator topology. The above series expression gives an explicit such representation. An immediate consequence of this is:
- Theorem. Template:Tmath is compact if and only if Template:Tmath is compact.
HistoryEdit
The singular value decomposition was originally developed by differential geometers, who wished to determine whether a real bilinear form 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 independently of both Beltrami and Jordan. Sylvester called the singular values the canonical multipliers of the matrix Template:Tmath 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 Carl Eckart and Gale J. Young in 1936;<ref>Template:Cite journal</ref> 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 (which are compact, under some weak technical assumptions); 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 in French, valeurs singulières).
Practical methods for computing the SVD date back to Kogbetliantz in 1954–1955 and Hestenes in 1958,<ref>Template:Cite journal</ref> resembling closely the Jacobi eigenvalue algorithm, which uses plane rotations or Givens rotations. However, these were replaced by the method of Gene Golub and William Kahan published in 1965,<ref>Template:Harv</ref> which uses Householder transformations or reflections. In 1970, Golub and Christian Reinsch<ref>Template:Cite journal</ref> published a variant of the Golub/Kahan algorithm that is still the one most-used today.
See alsoEdit
NotesEdit
ReferencesEdit
- Template:Citation
- Template:Cite book
- Template:Cite journal
- Template:Cite book
- Template:Cite journal
- Template:Cite journal
- Template:Cite book
- Template:Cite book
- 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.
- Template:Cite journal
- Template:Cite book
- Template:Cite book
- Template:Cite book
- Template:Cite book
- Template:Cite journal
- Template:Cite book
- Template:Citation
External linksEdit
Template:Numerical linear algebra Template:Functional Analysis Template:SpectralTheory