Singular value decomposition

From HandWiki
Short description: Matrix decomposition


Illustration of the singular value decomposition UΣV of a real 2×2 matrix M.
  • Top: The action of M, indicated by its effect on the unit disc D and the two canonical unit vectors e1 and e2.
  • Left: The action of V, a rotation, on D, e1, and e2.
  • Bottom: The action of Σ, a scaling by the singular values σ1 horizontally and σ2 vertically.
  • Right: The action of U, another rotation.

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 [math]\displaystyle{ \ m \times n\ }[/math] matrix. It is related to the polar decomposition.

Specifically, the singular value decomposition of an [math]\displaystyle{ \ m \times n\ }[/math] complex matrix M is a factorization of the form [math]\displaystyle{ \ \mathbf{M} = \mathbf{U\Sigma V^*}\ , }[/math] where U is an [math]\displaystyle{ \ m \times m\ }[/math] complex unitary matrix, [math]\displaystyle{ \ \mathbf{\Sigma}\ }[/math] is an [math]\displaystyle{ \ m \times n\ }[/math] rectangular diagonal matrix with non-negative real numbers on the diagonal, V is an [math]\displaystyle{ n \times n }[/math] complex unitary matrix, and [math]\displaystyle{ \ \mathbf{V^*}\ }[/math] is the conjugate transpose of V. Such decomposition always exists for any complex matrix. If M is real, then U and V can be guaranteed to be real orthogonal matrices; in such contexts, the SVD is often denoted [math]\displaystyle{ \ \mathbf{ U\Sigma V}^\operatorname{T} }[/math].

The diagonal entries [math]\displaystyle{ \ \sigma_i = \Sigma_{i i}\ }[/math] of [math]\displaystyle{ \ \mathbf{\Sigma}\ }[/math] are uniquely determined by M and are known as the singular values of M. The number of non-zero singular values is equal to the rank of M. The columns of U and the columns of V are called left-singular vectors and right-singular vectors of M, respectively. They form two sets of orthonormal bases u1, ..., um and v1, ..., vn , and if they are sorted so that the singular values [math]\displaystyle{ \ \sigma_i\ }[/math] with value zero are all in the highest-numbered columns (or rows), the singular value decomposition can be written as [math]\displaystyle{ \ \mathbf{M} = \sum_{i=1}^{r}\sigma_i\mathbf{u}_i\mathbf{v}_i^{*}\ , }[/math] where [math]\displaystyle{ \ r \leq \min\{m,n\}\ }[/math] is the rank of M.

The SVD is not unique. It is always possible to choose the decomposition so that the singular values [math]\displaystyle{ \Sigma_{i i} }[/math] are in descending order. In this case, [math]\displaystyle{ \mathbf{\Sigma} }[/math] (but not U and V) is uniquely determined by M.

The term sometimes refers to the compact SVD, a similar decomposition [math]\displaystyle{ \ \mathbf{M} = \mathbf{U\Sigma V^*}\ }[/math] in which [math]\displaystyle{ \ \mathbf{\Sigma}\ }[/math] is square diagonal of size [math]\displaystyle{ r \times r }[/math], where [math]\displaystyle{ \ r \leq \min\{m,n\}\ }[/math] is the rank of M, and has only the non-zero singular values. In this variant, U is an [math]\displaystyle{ m \times r }[/math] semi-unitary matrix and [math]\displaystyle{ \ \mathbf{V}\ }[/math] is an [math]\displaystyle{ n \times r }[/math] semi-unitary matrix, such that [math]\displaystyle{ \ \mathbf{U^* U} = \mathbf{V^* 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 all areas of science, engineering, and statistics, such as signal processing, least squares fitting of data, and process control.

Intuitive interpretations

Animated illustration of the SVD of a 2D, real shearing matrix M. First, we see the unit disc in blue together with the two canonical unit vectors. We then see the actions of M, which distorts the disk to an ellipse. The SVD decomposes M into three simple transformations: an initial rotation V, a scaling [math]\displaystyle{ \mathbf{\Sigma} }[/math] along the coordinate axes, and a final rotation U. The lengths σ1 and σ2 of the semi-axes of the ellipse are the singular values of M, namely Σ1,1 and Σ2,2.
Visualization of the matrix multiplications in singular value decomposition

Rotation, coordinate scaling, and reflection

In the special case when M is an m × m real square matrix, the matrices U and V can be chosen to be real m × m 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 A, as a linear transformation xAx of the space Rm, the matrices U and V represent rotations or reflection of the space, while [math]\displaystyle{ \mathbf{\Sigma} }[/math] represents the scaling of each coordinate xi by the factor σi. Thus the SVD decomposition breaks down any linear transformation of Rm into a composition of three geometrical transformations: a rotation or reflection (V), followed by a coordinate-by-coordinate scaling ([math]\displaystyle{ \mathbf{\Sigma} }[/math]), followed by another rotation or reflection (U).

In particular, if M has a positive determinant, then U and V can be chosen to be both rotations with reflections, or both rotations without reflections. 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 M is real but not square, namely m×n with mn, it can be interpreted as a linear transformation from Rn to Rm. Then U and V can be chosen to be rotations/reflections of Rm and Rn, respectively; and [math]\displaystyle{ \mathbf{\Sigma} }[/math], besides scaling the first [math]\displaystyle{ \min\{m,n\} }[/math] coordinates, also extends the vector with zeros, i.e. removes trailing coordinates, so as to turn Rn into Rm.

Singular values as semiaxes of an ellipse or ellipsoid

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 n-dimensional Euclidean space, with the singular values of any n × n square matrix being viewed as the magnitude of the semiaxis of an n-dimensional ellipsoid. Similarly, the singular values of any m × n matrix can be viewed as the magnitude of the semiaxis of an n-dimensional ellipsoid in m-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 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. The matrix M maps the basis vector Vi to the stretched unit vector σi Ui. By the definition of a unitary matrix, the same is true for their conjugate transposes U and V, except the geometric interpretation of the singular values as stretches is lost. In short, the columns of U, U, V, and V are orthonormal bases. When [math]\displaystyle{ \mathbf{M} }[/math] is a positive-semidefinite Hermitian matrix, U and V are both equal to the unitary matrix used to diagonalize [math]\displaystyle{ \mathbf{M} }[/math]. However, when [math]\displaystyle{ \mathbf{M} }[/math] is not positive-semidefinite and Hermitian but still diagonalizable, its eigendecomposition and singular value decomposition are distinct.

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

[math]\displaystyle{ T \colon \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]\displaystyle{ T(\mathbf{V}_i) = \sigma_i \mathbf{U}_i, \qquad i = 1, \ldots, \min(m, n), }[/math]

where σi is the i-th diagonal entry of [math]\displaystyle{ \mathbf{\Sigma} }[/math], 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 : KnKm 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.

To get a more visual flavor of singular values and SVD factorization – at least when working on real vector spaces – consider the sphere S of radius one in Rn. The linear map T maps this sphere onto an ellipsoid in Rm. Non-zero singular values are simply the lengths of the semi-axes of this ellipsoid. Especially when n = m, and all the singular values are distinct and non-zero, the SVD of the linear map T can be easily analyzed as a succession of three consecutive moves: consider the ellipsoid T(S) and specifically its axes; then consider the directions in Rn sent by T onto these axes. These directions happen to be mutually orthogonal. Apply first an isometry V sending these directions to the coordinate axes of Rn. On a second move, apply an endomorphism D diagonalized along the coordinate axes and stretching or shrinking in each direction, using the semi-axes lengths of T(S) as stretching coefficients. The composition DV then sends the unit-sphere onto an ellipsoid isometric to T(S). To define the third and last move, apply an isometry U to this ellipsoid to obtain T(S). As can be easily checked, the composition UDV coincides with T.

Example

Consider the 4 × 5 matrix

[math]\displaystyle{ \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 UΣV

[math]\displaystyle{ \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] \boldsymbol{\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 [math]\displaystyle{ \mathbf{\Sigma} }[/math] 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 U and V are unitary, multiplying by their respective conjugate transposes yields identity matrices, as shown below. In this case, because U and V are real valued, each is an orthogonal matrix.

[math]\displaystyle{ \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. Choosing [math]\displaystyle{ \mathbf V }[/math] such that

[math]\displaystyle{ \mathbf{V}^* = \begin{bmatrix} \color{Violet}0 & \color{Violet}1 & \color{Violet}0 & \color{Violet}0 & \color{Violet}0 \\ \color{Plum}0 & \color{Plum}0 & \color{Plum}1 & \color{Plum}0 & \color{Plum}0 \\ \color{Magenta}\sqrt{0.2} & \color{Magenta}0 & \color{Magenta}0 & \color{Magenta}0 & \color{Magenta}\sqrt{0.8} \\ \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]

is also a valid singular value decomposition.

SVD and spectral decomposition

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 unit-length vectors [math]\displaystyle{ \mathbf{u} }[/math] in Km and [math]\displaystyle{ \mathbf{v} }[/math] in Kn such that[math]\displaystyle{ \mathbf{M v} = \sigma \mathbf{u} \,\text{ and } \mathbf{M}^*\mathbf{u} = \sigma \mathbf{v}. }[/math]The vectors [math]\displaystyle{ \mathbf{u} }[/math] and [math]\displaystyle{ \mathbf{v} }[/math] are called left-singular and right-singular vectors for σ, respectively.

In any singular value decomposition[math]\displaystyle{ \mathbf{M} = \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^* }[/math]the diagonal entries of [math]\displaystyle{ \mathbf{\Sigma} }[/math] are equal to the singular values of M. The first p = min(m, n) columns of U and V are, respectively, left- and right-singular vectors for the corresponding singular values. Consequently, the above theorem implies that:

  • An m × n matrix M has at most p distinct singular values.
  • It is always possible to find a unitary basis U for Km with a subset of basis vectors spanning the left-singular vectors of each singular value of M.
  • It is always possible to find a unitary basis V for Kn with a subset of basis vectors spanning the right-singular vectors of each singular value of M.

A singular value for which we can find two left (or right) singular vectors that are linearly independent is called degenerate. If [math]\displaystyle{ \mathbf{u}_1 }[/math] and [math]\displaystyle{ \mathbf{u}_2 }[/math] 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 U and V corresponding to diagonal elements of [math]\displaystyle{ \mathbf{\Sigma} }[/math] all with the same value σ.

As an exception, the left and right-singular vectors of singular value 0 comprise all unit vectors in the cokernel and kernel, respectively, of M, which by the rank–nullity theorem cannot be the same dimension if mn. Even if all singular values are nonzero, if m > n then the cokernel is nontrivial, in which case U is padded with mn orthogonal vectors from the cokernel. Conversely, if m < n, then V is padded by nm orthogonal vectors from the kernel. However, if the singular value of 0 exists, the extra columns of U or V 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 eiφ (for the real case up to a sign). Consequently, if all singular values of a square matrix 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. In general, the SVD is unique up to arbitrary unitary transformations applied uniformly to the column vectors of both U and V spanning the subspaces of each singular value, and up to arbitrary unitary transformations on vectors of U and V spanning the kernel and cokernel, respectively, of M.

Relation to eigenvalue decomposition

The singular value decomposition is very general in the sense that it can be applied to any m × n matrix, whereas eigenvalue decomposition can only be applied to squared diagonalizable matrices. Nevertheless, the two decompositions are related.

If M has SVD [math]\displaystyle{ \mathbf{M} = \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^* }[/math], the following two relations hold:[math]\displaystyle{ \begin{align} \mathbf{M}^* \mathbf{M} &= \mathbf{V} \boldsymbol{\Sigma}^* \mathbf{U}^*\, \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^* = \mathbf{V} (\boldsymbol{\Sigma}^* \boldsymbol{\Sigma}) \mathbf{V}^* \\ \mathbf{M} \mathbf{M}^* &= \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^*\, \mathbf{V} \boldsymbol{\Sigma}^* \mathbf{U}^* = \mathbf{U} (\boldsymbol{\Sigma} \boldsymbol{\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 V (referred to as right-singular vectors) are eigenvectors of MM.
  • The columns of U (referred to as left-singular vectors) are eigenvectors of MM.
  • The non-zero elements of [math]\displaystyle{ \mathbf{\Sigma} }[/math] (non-zero singular values) are the square roots of the non-zero eigenvalues of MM or MM.

In the special case of M being a normal matrix, and thus also squared, the spectral theorem ensures that it can be unitarily diagonalized using a basis of eigenvectors, and thus decomposed as [math]\displaystyle{ \mathbf M=\mathbf U\mathbf D\mathbf U^* }[/math] for some unitary matrix U and diagonal matrix D with complex elements σi along the diagonal. When M is positive semi-definite, σi will be non-negative real numbers so that the decomposition M = UDU is also a singular value decomposition. Otherwise, it can be recast as an SVD by moving the phase e of each σi to either its corresponding Vi or Ui. The natural connection of the SVD to non-normal matrices is through the polar decomposition theorem: M = SR, where S = UΣU is positive semidefinite and normal, and R = UV is unitary.

Thus, except for positive semi-definite matrices, the eigenvalue decomposition and SVD of M, while related, differ: the eigenvalue decomposition is M = UDU−1, where U is not necessarily unitary and D is not necessarily positive semi-definite, while the SVD is M = UΣV, where [math]\displaystyle{ \mathbf{\Sigma} }[/math] is diagonal and positive semi-definite, and U and V are unitary matrices that are not necessarily related except through the matrix M. While only non-defective square matrices have an eigenvalue decomposition, any [math]\displaystyle{ m \times n }[/math] matrix has a SVD.

Applications of the SVD

Pseudoinverse

The singular value decomposition can be used for computing the pseudoinverse of a matrix. The pseudoinverse of the matrix [math]\displaystyle{ \mathbf M }[/math] with singular value decomposition [math]\displaystyle{ \mathbf M = \mathbf U \boldsymbol \Sigma \mathbf V^\ast }[/math] is, [math]\displaystyle{ \mathbf M^+ = \mathbf V \boldsymbol \Sigma^+ \mathbf U^\ast, }[/math]where [math]\displaystyle{ \boldsymbol \Sigma^+ }[/math] is the pseudoinverse of [math]\displaystyle{ \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 equations

A set of homogeneous linear equations can be written as Ax = 0 for a matrix A and vector x. A typical situation is that A is known and a non-zero x is to be determined which satisfies the equation. Such an x belongs to A's null space and is sometimes called a (right) null vector of A. The vector x can be characterized as a right-singular vector corresponding to a singular value of A that is zero. This observation means that if A is a square matrix and has no vanishing singular value, the equation has no non-zero x 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 x satisfying xA = 0, with x denoting the conjugate transpose of x, is called a left null vector of A.

Total least squares minimization

A total least squares problem seeks the vector x that minimizes the 2-norm of a vector Ax under the constraint ||x|| = 1. The solution turns out to be the right-singular vector of A corresponding to the smallest singular value.

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 and the left-singular vectors corresponding to the non-zero singular values of M span the range of M. For example, in the above example the null space is spanned by the last two rows of V and the range is spanned by the first three columns of U.

As a consequence, the rank of M equals the number of non-zero singular values which is the same as the number of non-zero diagonal elements in [math]\displaystyle{ \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 approximation

Some practical applications need to solve the problem of approximating a matrix M with another matrix [math]\displaystyle{ \tilde{\mathbf{M}} }[/math], said to be truncated, which has a specific rank r. In the case that the approximation is based on minimizing the Frobenius norm of the difference between M and [math]\displaystyle{ \tilde{\mathbf{M}} }[/math] under the constraint that [math]\displaystyle{ \operatorname{rank}\left(\tilde{\mathbf{M}}\right) = r }[/math], it turns out that the solution is given by the SVD of M, namely[math]\displaystyle{ \tilde{\mathbf{M}} = \mathbf{U} \tilde{\boldsymbol{\Sigma}} \mathbf{V}^*, }[/math]where [math]\displaystyle{ \tilde{\boldsymbol{\Sigma}} }[/math] is the same matrix as [math]\displaystyle{ \mathbf{\Sigma} }[/math] except that it contains only the r 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 Stewart 1993).

Separable models

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 A can be written as an outer product of two vectors A = uv, or, in coordinates, [math]\displaystyle{ A_{ij} = u_i v_j }[/math]. Specifically, the matrix M can be decomposed as,[math]\displaystyle{ \mathbf{M} = \sum_i \mathbf{A}_i = \sum_i \sigma_i \mathbf U_i \otimes \mathbf V_i. }[/math]Here Ui and Vi are the i-th columns of the corresponding SVD matrices, σi are the ordered singular values, and each Ai 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 σi is exactly the rank of the matrix.[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[1] 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 U in the SVD factorization is then a Gabor while the first column of V represents the time modulation (or vice versa). One may then define an index of separability

[math]\displaystyle{ \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.[2]

Nearest orthogonal matrix

It is possible to use the SVD of a square matrix A to determine the orthogonal matrix O closest to A. The closeness of fit is measured by the Frobenius norm of OA. The solution is the product UV.[3] This intuitively makes sense because an orthogonal matrix would have the decomposition UIV where I is the identity matrix, so that if A = UΣV then the product A = UV amounts to replacing the singular values with ones. Equivalently, the solution is the unitary matrix R = UV of the Polar Decomposition M = RP = P'R 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 O which most closely maps A to B. Specifically,

[math]\displaystyle{ \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]\displaystyle{ \| \cdot \|_F }[/math] denotes the Frobenius norm.

This problem is equivalent to finding the nearest orthogonal matrix to a given matrix [math]\displaystyle{ \mathbf M = \mathbf A^\operatorname{T} \mathbf B }[/math].

The Kabsch algorithm

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.

Signal processing

The SVD and pseudoinverse have been successfully applied to signal processing,[4] image processing[5] and big data (e.g., in genomic signal processing).[6][7][8][9]

Astrodynamics

In Astrodynamics, the SVD and its variants are used as an option to determine suitable maneuver directions for transfer trajectory design[10] and Orbital station-keeping.[11]

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 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]\displaystyle{ \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.[12][13]

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]\displaystyle{ \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.[14]

Interestingly, SVD has been used to improve gravitational waveform modeling by the ground-based gravitational-wave interferometer aLIGO.[15] 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.[16] Distributed algorithms have been developed for the purpose of calculating the SVD on clusters of commodity machines.[17]

Low-rank SVD has been applied for hotspot detection from spatiotemporal data with application to disease outbreak detection.[18] 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.[19]

Proof of existence

An eigenvalue λ of a matrix M is characterized by the algebraic relation Mu = λu. When M is Hermitian, a variational characterization is also available. Let M be a real n × n symmetric matrix. Define[math]\displaystyle{ \begin{cases} f : \R^n \to \R \\ f : \mathbf{x} \mapsto \mathbf{x}^\operatorname{T} \mathbf{M} \mathbf{x} \end{cases} }[/math]By the extreme value theorem, this continuous function attains a maximum at some u when restricted to the unit sphere {||x|| = 1}. By the Lagrange multipliers theorem, u necessarily satisfies[math]\displaystyle{ \nabla \mathbf{u}^\operatorname{T} \mathbf{M} \mathbf{u} - \lambda \cdot \nabla \mathbf{u}^\operatorname{T} \mathbf{u} = 0 }[/math]for some real number λ. The nabla symbol, , is the del operator (differentiation with respect to x). Using the symmetry of M we obtain[math]\displaystyle{ \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 Mu = λu, so u is a unit length eigenvector of M. For every unit length eigenvector v of M its eigenvalue is f(v), so λ is the largest eigenvalue of M. The same calculation performed on the orthogonal complement of u gives the next largest eigenvalue and so on. The complex Hermitian case is similar; there f(x) = x* M x is a real-valued function of 2n 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 M is no longer required.

This section gives these two arguments for existence of singular value decomposition.

Based on the spectral theorem

Let [math]\displaystyle{ \mathbf{M} }[/math] be an m × n complex matrix. Since [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] is positive semi-definite and Hermitian, by the spectral theorem, there exists an n × n unitary matrix [math]\displaystyle{ \mathbf{V} }[/math] such that

[math]\displaystyle{ \mathbf{V}^* \mathbf{M}^* \mathbf{M} \mathbf{V} = \bar\mathbf{D} = \begin{bmatrix} \mathbf{D} & 0 \\ 0 & 0\end{bmatrix}, }[/math]

where [math]\displaystyle{ \mathbf{D} }[/math] is diagonal and positive definite, of dimension [math]\displaystyle{ \ell\times \ell }[/math], with [math]\displaystyle{ \ell }[/math] the number of non-zero eigenvalues of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] (which can be shown to verify [math]\displaystyle{ \ell\le\min(n,m) }[/math]). Note that [math]\displaystyle{ \mathbf{V} }[/math] is here by definition a matrix whose [math]\displaystyle{ i }[/math]-th column is the [math]\displaystyle{ i }[/math]-th eigenvector of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math], corresponding to the eigenvalue [math]\displaystyle{ \bar{\mathbf{D}}_{ii} }[/math]. Moreover, the [math]\displaystyle{ j }[/math]-th column of [math]\displaystyle{ \mathbf{V} }[/math], for [math]\displaystyle{ j\gt \ell }[/math], is an eigenvector of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] with eigenvalue [math]\displaystyle{ \bar{\mathbf{D}}_{jj}=0 }[/math]. This can be expressed by writing [math]\displaystyle{ \mathbf{V} }[/math] as [math]\displaystyle{ \mathbf{V}=\begin{bmatrix}\mathbf{V}_1 &\mathbf{V}_2\end{bmatrix} }[/math], where the columns of [math]\displaystyle{ \mathbf{V}_1 }[/math] and [math]\displaystyle{ \mathbf{V}_2 }[/math] therefore contain the eigenvectors of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] corresponding to non-zero and zero eigenvalues, respectively. Using this rewriting of [math]\displaystyle{ \mathbf{V} }[/math], the equation becomes:

[math]\displaystyle{ \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]\displaystyle{ \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]\displaystyle{ \mathbf{M}\mathbf{V}_2 = \mathbf{0} }[/math].[20] Finally, the unitary-ness of [math]\displaystyle{ \mathbf{V} }[/math] translates, in terms of [math]\displaystyle{ \mathbf{V}_1 }[/math] and [math]\displaystyle{ \mathbf{V}_2 }[/math], into the following conditions:

[math]\displaystyle{ \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]\displaystyle{ \mathbf{U}_1 = \mathbf{M} \mathbf{V}_1 \mathbf{D}^{-\frac{1}{2}}. }[/math]

Then,

[math]\displaystyle{ \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]\displaystyle{ \mathbf{M}\mathbf{V}_2 = \mathbf{0}. }[/math] This can be also seen as immediate consequence of the fact that [math]\displaystyle{ \mathbf{M}\mathbf{V}_1\mathbf{V}_1^* = \mathbf{M} }[/math]. This is equivalent to the observation that if [math]\displaystyle{ \{\boldsymbol v_i\}_{i=1}^\ell }[/math] is the set of eigenvectors of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] corresponding to non-vanishing eigenvalues [math]\displaystyle{ \{\lambda_i\}_{i=1}^\ell }[/math], then [math]\displaystyle{ \{\mathbf M \boldsymbol v_i\}_{i=1}^\ell }[/math] is a set of orthogonal vectors, and [math]\displaystyle{ \{\lambda_i^{-1/2}\mathbf M \boldsymbol v_i\}_{i=1}^\ell }[/math] is a (generally not complete) set of orthonormal vectors. This matches with the matrix formalism used above denoting with [math]\displaystyle{ \mathbf{V}_1 }[/math] the matrix whose columns are [math]\displaystyle{ \{\boldsymbol v_i\}_{i=1}^\ell }[/math], with [math]\displaystyle{ \mathbf{V}_2 }[/math] the matrix whose columns are the eigenvectors of [math]\displaystyle{ \mathbf{M}^* \mathbf{M} }[/math] with vanishing eigenvalue, and [math]\displaystyle{ \mathbf{U}_1 }[/math] the matrix whose columns are the vectors [math]\displaystyle{ \{\lambda_i^{-1/2}\mathbf M \boldsymbol v_i\}_{i=1}^\ell }[/math].

We see that this is almost the desired result, except that [math]\displaystyle{ \mathbf{U}_1 }[/math] and [math]\displaystyle{ \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]\displaystyle{ \mathbf{U}_1 }[/math] is no smaller than the number of columns, since the dimensions of [math]\displaystyle{ \mathbf{D} }[/math] is no greater than [math]\displaystyle{ m }[/math] and [math]\displaystyle{ n }[/math]. Also, since

[math]\displaystyle{ \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]\displaystyle{ \mathbf{U}_1 }[/math] are orthonormal and can be extended to an orthonormal basis. This means that we can choose [math]\displaystyle{ \mathbf{U}_2 }[/math] such that [math]\displaystyle{ \mathbf{U} = \begin{bmatrix} \mathbf{U}_1 & \mathbf{U}_2 \end{bmatrix} }[/math] is unitary.

For V1 we already have V2 to make it unitary. Now, define

[math]\displaystyle{ \boldsymbol{\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 U2, and hence the overall dimensions of [math]\displaystyle{ \boldsymbol{\Sigma} }[/math] equal to [math]\displaystyle{ m\times n }[/math]. Then

[math]\displaystyle{ \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]\displaystyle{ \mathbf{M} = \mathbf{U} \boldsymbol{\Sigma} \mathbf{V}^*. }[/math]

Notice the argument could begin with diagonalizing MM rather than MM (This shows directly that MM and MM have the same non-zero eigenvalues).

Based on variational characterization

The singular values can also be characterized as the maxima of uTMv, considered as a function of u and v, over particular subspaces. The singular vectors are the values of u and v where these maxima are attained.

Let M denote an m × n matrix with real entries. Let Sk−1 be the unit [math]\displaystyle{ (k-1) }[/math]-sphere in [math]\displaystyle{ \mathbb{R}^k }[/math], and define [math]\displaystyle{ \sigma(\mathbf{u}, \mathbf{v}) = \mathbf{u}^\operatorname{T} \mathbf{M} \mathbf{v},\ \mathbf{u} \in S^{m-1}, \mathbf{v} \in S^{n-1}. }[/math]

Consider the function σ restricted to Sm−1 × Sn−1. Since both Sm−1 and Sn−1 are compact sets, their product is also compact. Furthermore, since σ is continuous, it attains a largest value for at least one pair of vectors uSm−1 and vSn−1. This largest value is denoted σ1 and the corresponding vectors are denoted u1 and v1. Since σ1 is the largest value of σ(u, v) it must be non-negative. If it were negative, changing the sign of either u1 or v1 would make it positive and therefore larger.

Statement. u1, v1 are left and right-singular vectors of M with corresponding singular value σ1.

Proof. Similar to the eigenvalues case, by assumption the two vectors satisfy the Lagrange multiplier equation:

[math]\displaystyle{ \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]\displaystyle{ \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 [math]\displaystyle{ \mathbf{u}_1^\operatorname{T} }[/math] and the second equation from left by [math]\displaystyle{ \mathbf{v}_1^\operatorname{T} }[/math] and taking ||u|| = ||v|| = 1 into account gives

[math]\displaystyle{ \sigma_1 = 2\lambda_1 = 2\lambda_2. }[/math]

Plugging this into the pair of equations above, we have

[math]\displaystyle{ \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 σ(u, v) over normalized u, v which are orthogonal to u1 and v1, respectively.

The passage from real to complex is similar to the eigenvalue case.

Calculating the SVD

The singular value decomposition can be computed using the following observations:

  • The left-singular vectors of M are a set of orthonormal eigenvectors of MM.
  • The right-singular vectors of M are a set of orthonormal eigenvectors of MM.
  • The non-zero singular values of M (found on the diagonal entries of [math]\displaystyle{ \mathbf{\Sigma} }[/math]) are the square roots of the non-zero eigenvalues of both MM and MM.

Numerical approach

The SVD of a matrix M is typically computed by a two-step procedure. In the first step, the matrix is reduced to a bidiagonal matrix. This takes O(mn2) floating-point operations (flop), assuming that mn. 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 O(n) iterations, each costing O(n) flops. Thus, the first step is more expensive, and the overall cost is O(mn2) flops (Trefethen Bau III).

The first step can be done using Householder reflections for a cost of 4mn2 − 4n3/3 flops, assuming that only the singular values are needed and not the singular vectors. If m is much larger than n then it is advantageous to first reduce the matrix M 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 2mn2 + 2n3 flops (Trefethen Bau III).

The second step can be done by a variant of the QR algorithm for the computation of eigenvalues, which was first described by (Golub Kahan). The LAPACK subroutine DBDSQR[21] implements this iterative method, with some modifications to cover the case where the singular values are very small (Demmel Kahan). Together with a first step using Householder reflections and, if appropriate, QR decomposition, this forms the DGESVD[22] 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 (GSL Team 2007). This method computes the SVD of the bidiagonal matrix by solving a sequence of 2 × 2 SVD problems, similar to how the Jacobi eigenvalue algorithm solves a sequence of 2 × 2 eigenvalue methods (Golub Van Loan). Yet another method for step 2 uses the idea of divide-and-conquer eigenvalue algorithms (Trefethen Bau III).

There is an alternative way that does not explicitly use the eigenvalue decomposition.[23] Usually the singular value problem of a matrix M is converted into an equivalent symmetric eigenvalue problem such as M M, MM, or

[math]\displaystyle{ \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 MQ R and the LQ decomposition of R gives RL P. Thus, at every iteration, we have MQ L P, update ML and repeat the orthogonalizations. Eventually,[clarification needed] 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 SVD

The singular values of a 2 × 2 matrix can be found analytically. Let the matrix be [math]\displaystyle{ \mathbf{M} = z_0\mathbf{I} + z_1\sigma_1 + z_2\sigma_2 + z_3\sigma_3 }[/math]

where [math]\displaystyle{ z_i \in \mathbb{C} }[/math] are complex numbers that parameterize the matrix, I is the identity matrix, and [math]\displaystyle{ \sigma_i }[/math] denote the Pauli matrices. Then its two singular values are given by

[math]\displaystyle{ \begin{align} \sigma_\pm &= \sqrt{|z_0|^2 + |z_1|^2 + |z_2|^2 + |z_3|^2 \pm \sqrt{(|z_0|^2 + |z_1|^2 + |z_2|^2 + |z_3|^2)^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 SVDs

Visualization of Reduced SVD variants. From top to bottom: 1: Full SVD, 2: Thin SVD (remove columns of U not corresponding to rows of V*), 3: Compact SVD (remove vanishing singular values and corresponding columns/rows in U and V*), 4: Truncated SVD (keep only largest t singular values and corresponding columns/rows in U and V*)

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

The thin, or economy-sized, SVD of a matrix M is given by[24]

[math]\displaystyle{ \mathbf{M} = \mathbf{U}_k \boldsymbol{\Sigma}_k \mathbf{V}^*_k, }[/math]

where

[math]\displaystyle{ k = \operatorname{min}(m, n) }[/math],

the matrices Uk and Vk contain only the first k columns of U and V, and Σk contains only the first k singular values from Σ. The matrix Uk is thus m×k, Σk is k×k diagonal, and Vk* is k×n.

The thin SVD uses significantly less space and computation time if k ≪ max(m, n). The first stage in its calculation will usually be a QR decomposition of M, which can make for a significantly quicker calculation in this case.

Compact SVD

[math]\displaystyle{ \mathbf{M} = \mathbf{U}_r \boldsymbol{\Sigma}_r \mathbf{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 ≪ min(m, n). The matrix Ur is thus m×r, Σr is r×r diagonal, and Vr* is r×n.

Truncated SVD

In many applications the number r 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 t ≪ r non-zero singular values. The truncated SVD is no longer an exact decomposition of the original matrix M, but rather provides the optimal low-rank matrix approximation [math]\displaystyle{ \tilde{\mathbf{M}} }[/math] by any matrix of a fixed rank t

[math]\displaystyle{ \tilde{\mathbf{M}} = \mathbf{U}_t \boldsymbol{\Sigma}_t \mathbf{V}_t^* }[/math],

where matrix Ut is m×t, Σt is t×t diagonal, and Vt* is t×n. Only the t column vectors of U and t row vectors of V* corresponding to the t largest singular values Σt are calculated. This can be much quicker and more economical than the compact SVD if tr, but requires a completely different toolset of numerical solvers.

In applications that require an approximation to the Moore–Penrose inverse of the matrix M, the smallest singular values of M are of interest, which are more challenging to compute compared to the largest ones.

Truncated SVD is employed in latent semantic indexing.[25]

Norms

Ky Fan norms

The sum of the k largest singular values of M is a matrix norm, the Ky Fan k-norm of M.[26]

The first of the Ky Fan norms, the Ky Fan 1-norm, is the same as the operator norm of M as a linear operator with respect to the Euclidean norms of Km and Kn. In other words, the Ky Fan 1-norm is the operator norm induced by the standard 2 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 M on (possibly infinite-dimensional) Hilbert spaces

[math]\displaystyle{ \| \mathbf{M} \| = \| \mathbf{M}^* \mathbf{M} \|^\frac{1}{2} }[/math]

But, in the matrix case, (M* M)1/2 is a normal matrix, so ||M* M||1/2 is the largest eigenvalue of (M* M)1/2, i.e. the largest singular value of M.

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 ||M|| = Tr[(M* M)1/2] (the eigenvalues of M* M are the squares of the singular values).

Hilbert–Schmidt norm

The singular values are related to another norm on the space of operators. Consider the Hilbert–Schmidt inner product on the n × n matrices, defined by

[math]\displaystyle{ \langle \mathbf{M}, \mathbf{N} \rangle = \operatorname{tr} \left (\mathbf{N}^*\mathbf{M} \right ). }[/math]

So the induced norm is

[math]\displaystyle{ \| \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]\displaystyle{ \| \mathbf{M} \| = \sqrt{\sum_i \sigma_i ^2} }[/math]

where σi are the singular values of M. This is called the Frobenius norm, Schatten 2-norm, or Hilbert–Schmidt norm of M. Direct calculation shows that the Frobenius norm of M = (mij) coincides with:

[math]\displaystyle{ \sqrt{\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 generalizations

Scale-invariant SVD

The singular values of a matrix A are uniquely defined and are invariant with respect to left and/or right unitary transformations of A. In other words, the singular values of UAV, for unitary U and V, are equal to the singular values of A. 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,[27] is analogous to the conventional SVD except that its uniquely-determined singular values are invariant with respect to diagonal transformations of A. In other words, the singular values of DAE, for invertible diagonal matrices D and E, are equal to the singular values of A. 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 spaces

The factorization M = UΣV can be extended to a bounded operator M on a separable Hilbert space H. Namely, for any bounded operator M, there exist a partial isometry U, a unitary V, a measure space (Xμ), and a non-negative measurable f such that

[math]\displaystyle{ \mathbf{M} = \mathbf{U} T_f \mathbf{V}^* }[/math]

where [math]\displaystyle{ T_f }[/math] is the multiplication by f on L2(X, μ).

This can be shown by mimicking the linear algebraic argument for the matricial case above. VTfV* is the unique positive square root of M*M, as given by the Borel functional calculus for self-adjoint operators. The reason why U need not be unitary is because, unlike the finite-dimensional case, given an isometry U1 with nontrivial kernel, a suitable U2 may not be found such that

[math]\displaystyle{ \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]\displaystyle{ \mathbf{M} = \mathbf{U} \mathbf{V}^* \cdot \mathbf{V} T_f \mathbf{V}^* }[/math]

and notice that U V* is still a partial isometry while VTfV* is positive.

Singular values and compact operators

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 T is compact, every non-zero λ in its spectrum is an eigenvalue. Furthermore, a compact self-adjoint operator can be diagonalized by its eigenvectors. If M is compact, so is MM. Applying the diagonalization result, the unitary image of its positive square root Tf  has a set of orthonormal eigenvectors {ei} corresponding to strictly positive eigenvalues {σi}. For any ψH,

[math]\displaystyle{ \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 H. Notice how this resembles the expression from the finite-dimensional case. σi are called the singular values of M. {Uei} (resp. {Vei}) can be considered the left-singular (resp. right-singular) vectors of M.

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. M is compact if and only if MM is compact.

History

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 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 Carl Eckart and Gale J. Young in 1936;Cite error: Closing </ref> missing for <ref> tag 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,[28] which uses Householder transformations or reflections. In 1970, Golub and Christian Reinsch[29] published a variant of the Golub/Kahan algorithm that is still the one most-used today.

See also

Notes

  1. DeAngelis, G. C.; Ohzawa, I.; Freeman, R. D. (October 1995). "Receptive-field dynamics in the central visual pathways". Trends Neurosci. 18 (10): 451–8. doi:10.1016/0166-2236(95)94496-R. PMID 8545912. 
  2. Depireux, D. A.; Simon, J. Z.; Klein, D. J.; Shamma, S. A. (March 2001). "Spectro-temporal response field characterization with dynamic ripples in ferret primary auditory cortex". J. Neurophysiol. 85 (3): 1220–34. doi:10.1152/jn.2001.85.3.1220. PMID 11247991. 
  3. The Singular Value Decomposition in Symmetric (Lowdin) Orthogonalization and Data Compression
  4. Sahidullah, Md.; Kinnunen, Tomi (March 2016). "Local spectral variability features for speaker verification". Digital Signal Processing 50: 1–11. doi:10.1016/j.dsp.2015.10.011. https://erepo.uef.fi/handle/123456789/4375. 
  5. Mademlis, Ioannis; Tefas, Anastasios; Pitas, Ioannis (2018). "Regularized SVD-Based Video Frame Saliency for Unsupervised Activity Video Summarization". 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE. pp. 2691–2695. doi:10.1109/ICASSP.2018.8462274. ISBN 978-1-5386-4658-8. https://ieeexplore.ieee.org/document/8462274. Retrieved 19 January 2023. 
  6. O. Alter, P. O. Brown and D. Botstein (September 2000). "Singular Value Decomposition for Genome-Wide Expression Data Processing and Modeling". PNAS 97 (18): 10101–10106. doi:10.1073/pnas.97.18.10101. PMID 10963673. Bibcode2000PNAS...9710101A. 
  7. O. Alter; G. H. Golub (November 2004). "Integrative Analysis of Genome-Scale Data by Using Pseudoinverse Projection Predicts Novel Correlation Between DNA Replication and RNA Transcription". PNAS 101 (47): 16577–16582. doi:10.1073/pnas.0406767101. PMID 15545604. Bibcode2004PNAS..10116577A. 
  8. O. Alter; G. H. Golub (August 2006). "Singular Value Decomposition of Genome-Scale mRNA Lengths Distribution Reveals Asymmetry in RNA Gel Electrophoresis Band Broadening". PNAS 103 (32): 11828–11833. doi:10.1073/pnas.0604756103. PMID 16877539. Bibcode2006PNAS..10311828A. 
  9. Bertagnolli, N. M.; Drake, J. A.; Tennessen, J. M.; Alter, O. (November 2013). "SVD Identifies Transcript Length Distribution Functions from DNA Microarray Data and Reveals Evolutionary Forces Globally Affecting GBM Metabolism". PLOS ONE 8 (11): e78913. doi:10.1371/journal.pone.0078913. Highlight. PMID 24282503. Bibcode2013PLoSO...878913B. 
  10. Muralidharan, Vivek; Howell, Kathleen (2023). "Stretching directions in cislunar space: Applications for departures and transfer design". Astrodynamics 7 (2): 153–178. doi:10.1007/s42064-022-0147-z. Bibcode2023AsDyn...7..153M. 
  11. Muralidharan, Vivek; Howell, Kathleen (2022). "Leveraging stretching directions for stationkeeping in Earth-Moon halo orbits". Advances in Space Research 69 (1): 620–646. doi:10.1016/j.asr.2021.10.028. Bibcode2022AdSpR..69..620M. 
  12. Edelman, Alan (1992). "On the distribution of a scaled condition number". Math. Comp. 58 (197): 185–190. doi:10.1090/S0025-5718-1992-1106966-2. Bibcode1992MaCom..58..185E. http://math.mit.edu/~edelman/publications/distribution_of_a_scaled.pdf. 
  13. Shen, Jianhong (Jackie) (2001). "On the singular values of Gaussian random matrices". Linear Alg. Appl. 326 (1–3): 1–14. doi:10.1016/S0024-3795(00)00322-0. 
  14. Walton, S.; Hassan, O.; Morgan, K. (2013). "Reduced order modelling for unsteady fluid flow using proper orthogonal decomposition and radial basis functions". Applied Mathematical Modelling 37 (20–21): 8930–8945. doi:10.1016/j.apm.2013.04.025. 
  15. Setyawati, Y.; Ohme, F.; Khan, S. (2019). "Enhancing gravitational waveform model through dynamic calibration". Physical Review D 99 (2): 024010. doi:10.1103/PhysRevD.99.024010. Bibcode2019PhRvD..99b4010S. 
  16. Sarwar, Badrul; Karypis, George; Konstan, Joseph A.; Riedl, John T. (2000). Application of Dimensionality Reduction in Recommender System – A Case Study. University of Minnesota. http://files.grouplens.org/papers/webKDD00.pdf. 
  17. Bosagh Zadeh, Reza; Carlsson, Gunnar (2013). Dimension Independent Matrix Square Using MapReduce. Bibcode2013arXiv1304.1467B. https://stanford.edu/~rezab/papers/dimsum.pdf. 
  18. Hadi Fanaee Tork; João Gama (September 2014). "Eigenspace method for spatiotemporal hotspot detection". Expert Systems 32 (3): 454–464. doi:10.1111/exsy.12088. Bibcode2014arXiv1406.3506F. 
  19. Hadi Fanaee Tork; João Gama (May 2015). "EigenEvent: An Algorithm for Event Detection from Complex Data Streams in Syndromic Surveillance". Intelligent Data Analysis 19 (3): 597–616. doi:10.3233/IDA-150734. 
  20. To see this, we just have to notice that [math]\displaystyle{ \operatorname{Tr}(\mathbf{V}_2^* \mathbf{M}^* \mathbf{M} \mathbf{V}_2) = \|\mathbf{M} \mathbf{V}_2\|^2 }[/math], and remember that [math]\displaystyle{ \|A\| = 0 \Leftrightarrow A = 0 }[/math].
  21. Netlib.org
  22. Netlib.org
  23. mathworks.co.kr/matlabcentral/fileexchange/12674-simple-svd
  24. Bai, Zhaojun; Demmel, James; Dongarra, Jack J.; Ruhe, Axel; van der Vorst, Henk A. (2000). "Decompositions". Templates for the Solution of Algebraic Eigenvalue Problems. Society for Industrial and Applied Mathematics. doi:10.1137/1.9780898719581. ISBN 978-0-89871-471-5. http://www.netlib.org/utk/people/JackDongarra/etemplates/node43.html. 
  25. Chicco, D; Masseroli, M (2015). "Software suite for gene and protein annotation prediction and similarity search". IEEE/ACM Transactions on Computational Biology and Bioinformatics 12 (4): 837–843. doi:10.1109/TCBB.2014.2382127. PMID 26357324. https://doi.org/10.1109/TCBB.2014.2382127. 
  26. Fan, Ky. (1951). "Maximum properties and inequalities for the eigenvalues of completely continuous operators". Proceedings of the National Academy of Sciences of the United States of America 37 (11): 760–766. doi:10.1073/pnas.37.11.760. PMID 16578416. Bibcode1951PNAS...37..760F. 
  27. Uhlmann, Jeffrey (2018), A Generalized Matrix Inverse that is Consistent with Respect to Diagonal Transformations, SIAM Journal on Matrix Analysis, 239, pp. 781–800, http://faculty.missouri.edu/uhlmannj/UC-SIMAX-Final.pdf 
  28. (Golub Kahan)
  29. "Singular value decomposition and least squares solutions". Numerische Mathematik 14 (5): 403–420. 1970. doi:10.1007/BF02163027. 

References

External links