Singular value decomposition

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

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

The diagonal entries  σ i = Σ i i {\displaystyle \sigma _{i}=\Sigma _{ii}} of  Σ {\displaystyle \mathbf {\Sigma } } are uniquely determined by ⁠ M {\displaystyle \mathbf {M} } ⁠ and are known as the singular values of ⁠ M {\displaystyle \mathbf {M} } ⁠. The number of non-zero singular values is equal to the rank of ⁠ M {\displaystyle \mathbf {M} } ⁠. The columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ and the columns of ⁠ V {\displaystyle \mathbf {V} } ⁠ are called left-singular vectors and right-singular vectors of ⁠ M {\displaystyle \mathbf {M} } ⁠, respectively. They form two sets of orthonormal bases ⁠ u 1 , … , u m {\displaystyle \mathbf {u} _{1},\ldots ,\mathbf {u} _{m}} ⁠ and ⁠ v 1 , … , v n , {\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{n},} ⁠ and if they are sorted so that the singular values  σ i {\displaystyle \sigma _{i}} with value zero are all in the highest-numbered columns (or rows), the singular value decomposition can be written as

M = ∑ i = 1 r σ i u i v i ∗ , {\displaystyle \mathbf {M} =\sum _{i=1}^{r}\sigma _{i}\mathbf {u} _{i}\mathbf {v} _{i}^{*},}

where  r ≤ min { m , n } {\displaystyle r\leq \min\\{m,n\\}} is the rank of ⁠ M . {\displaystyle \mathbf {M} .} ⁠

The SVD is not unique, however it is always possible to choose the decomposition such that the singular values  Σ i i {\displaystyle \Sigma _{ii}} are in descending order. In this case,  Σ {\displaystyle \mathbf {\Sigma } } (but not ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠) is uniquely determined by ⁠ M . {\displaystyle \mathbf {M} .} ⁠

The term sometimes refers to the compact SVD, a similar decomposition ⁠ M = U Σ V ∗ {\displaystyle \mathbf {M} =\mathbf {U\Sigma V} ^{*}} ⁠ in which ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ is square diagonal of size ⁠ r × r , {\displaystyle r\times r,} ⁠ where ⁠ r ≤ min { m , n } {\displaystyle r\leq \min\\{m,n\\}} ⁠ is the rank of ⁠ M , {\displaystyle \mathbf {M} ,} ⁠ and has only the non-zero singular values. In this variant, ⁠ U {\displaystyle \mathbf {U} } ⁠ is an ⁠ m × r {\displaystyle m\times r} ⁠ semi-unitary matrix and  V {\displaystyle \mathbf {V} } is an ⁠ n × r {\displaystyle n\times r} ⁠ semi-unitary matrix, such that  U ∗ U = V ∗ V = I r . {\displaystyle \mathbf {U} ^{*}\mathbf {U} =\mathbf {V} ^{*}\mathbf {V} =\mathbf {I} _{r}.}

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

[edit]

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 Σ {\displaystyle \mathbf {\Sigma } } 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

[edit]

In the special case when ⁠ M {\displaystyle \mathbf {M} } ⁠ is an ⁠ m × m {\displaystyle m\times m} ⁠ real square matrix, the matrices ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ can be chosen to be real ⁠ m × m {\displaystyle m\times 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 , {\displaystyle \mathbf {A} ,} ⁠ as a linear transformation ⁠ x ↦ A x {\displaystyle \mathbf {x} \mapsto \mathbf {Ax} } ⁠ of the space ⁠ R m , {\displaystyle \mathbf {R} _{m},} ⁠ the matrices ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ represent rotations or reflection of the space, while ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ represents the scaling of each coordinate ⁠ x i {\displaystyle \mathbf {x} _{i}} ⁠ by the factor ⁠ σ i . {\displaystyle \sigma _{i}.} ⁠ Thus the SVD decomposition breaks down any linear transformation of ⁠ R m {\displaystyle \mathbf {R} ^{m}} ⁠ into a composition of three geometrical transformations: a rotation or reflection (⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠), followed by a coordinate-by-coordinate scaling (⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠), followed by another rotation or reflection (⁠ U {\displaystyle \mathbf {U} } ⁠).

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

### Singular values as semiaxes of an ellipse or ellipsoid

[edit]

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 {\displaystyle n} ⁠-dimensional Euclidean space, with the singular values of any ⁠ n × n {\displaystyle n\times n} ⁠ square matrix being viewed as the magnitude of the semiaxis of an ⁠ n {\displaystyle n} ⁠-dimensional ellipsoid. Similarly, the singular values of any ⁠ m × n {\displaystyle m\times n} ⁠ matrix can be viewed as the magnitude of the semiaxis of an ⁠ n {\displaystyle n} ⁠-dimensional ellipsoid in ⁠ m {\displaystyle 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

[edit]

Since ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {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 {\displaystyle \mathbf {M} } ⁠ maps the basis vector ⁠ V i {\displaystyle \mathbf {V} _{i}} ⁠ to the stretched unit vector ⁠ σ i U i . {\displaystyle \sigma _{i}\mathbf {U} _{i}.} ⁠ By the definition of a unitary matrix, the same is true for their conjugate transposes ⁠ U ∗ {\displaystyle \mathbf {U} ^{*}} ⁠ and ⁠ V , {\displaystyle \mathbf {V} ,} ⁠ except the geometric interpretation of the singular values as stretches is lost. In short, the columns of ⁠ U , {\displaystyle \mathbf {U} ,} ⁠ ⁠ U ∗ , {\displaystyle \mathbf {U} ^{*},} ⁠ ⁠ V , {\displaystyle \mathbf {V} ,} ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ are orthonormal bases. When ⁠ M {\displaystyle \mathbf {M} } ⁠ is a positive-semidefinite Hermitian matrix, ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ are both equal to the unitary matrix used to diagonalize ⁠ M . {\displaystyle \mathbf {M} .} ⁠ However, when ⁠ M {\displaystyle \mathbf {M} } ⁠ is not positive-semidefinite and Hermitian but still diagonalizable, its eigendecomposition and singular value decomposition are distinct.

### Relation to the four fundamental subspaces

[edit]

* The first ⁠ r {\displaystyle r} ⁠ columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ are a basis of the column space of ⁠ M {\displaystyle \mathbf {M} } ⁠.
* The last ⁠ m − r {\displaystyle m-r} ⁠ columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ are a basis of the null space of ⁠ M ∗ {\displaystyle \mathbf {M} ^{*}} ⁠.
* The first ⁠ r {\displaystyle r} ⁠ columns of ⁠ V {\displaystyle \mathbf {V} } ⁠ are a basis of the column space of ⁠ M ∗ {\displaystyle \mathbf {M} ^{*}} ⁠ (the row space of ⁠ M {\displaystyle \mathbf {M} } ⁠ in the real case).
* The last ⁠ n − r {\displaystyle n-r} ⁠ columns of ⁠ V {\displaystyle \mathbf {V} } ⁠ are a basis of the null space of ⁠ M {\displaystyle \mathbf {M} } ⁠.

### Geometric meaning

[edit]

Because ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ are unitary, we know that the columns ⁠ U 1 , … , U m {\displaystyle \mathbf {U} _{1},\ldots ,\mathbf {U} _{m}} ⁠ of ⁠ U {\displaystyle \mathbf {U} } ⁠ yield an orthonormal basis of ⁠ K m {\displaystyle K^{m}} ⁠ and the columns ⁠ V 1 , … , V n {\displaystyle \mathbf {V} _{1},\ldots ,\mathbf {V} _{n}} ⁠ of ⁠ V {\displaystyle \mathbf {V} } ⁠ yield an orthonormal basis of ⁠ K n {\displaystyle K^{n}} ⁠ (with respect to the standard scalar products on these spaces).

The linear transformation

T : { K n -> K m x ↦ M x {\displaystyle T:\left\\{{\begin{aligned}K^{n}&\to K^{m}\\\x&\mapsto \mathbf {M} x\end{aligned}}\right.}

has a particularly simple description with respect to these orthonormal bases: we have

T ( V i ) = σ i U i , i = 1 , … , min ( m , n ) , {\displaystyle T(\mathbf {V} _{i})=\sigma _{i}\mathbf {U} _{i},\qquad i=1,\ldots ,\min(m,n),}

where ⁠ σ i {\displaystyle \sigma _{i}} ⁠ is the ⁠ i {\displaystyle i} ⁠-th diagonal entry of ⁠ Σ , {\displaystyle \mathbf {\Sigma } ,} ⁠ and ⁠ T ( V i ) = 0 {\displaystyle T(\mathbf {V} _{i})=0} ⁠ for ⁠ i > min ( m , n ) . {\displaystyle i>\min(m,n).} ⁠

The geometric content of the SVD theorem can thus be summarized as follows: for every linear map ⁠ T : K n -> K m {\displaystyle T:K^{n}\to K^{m}} ⁠ one can find orthonormal bases of ⁠ K n {\displaystyle K^{n}} ⁠ and ⁠ K m {\displaystyle K^{m}} ⁠ such that ⁠ T {\displaystyle T} ⁠ maps the ⁠ i {\displaystyle i} ⁠-th basis vector of ⁠ K n {\displaystyle K^{n}} ⁠ to a non-negative multiple of the ⁠ i {\displaystyle i} ⁠-th basis vector of ⁠ K m , {\displaystyle K^{m},} ⁠ and sends the leftover basis vectors to zero. With respect to these bases, the map ⁠ T {\displaystyle 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 {\displaystyle S} ⁠ of radius one in ⁠ R n . {\displaystyle \mathbf {R} ^{n}.} ⁠ The linear map ⁠ T {\displaystyle T} ⁠ maps this sphere onto an ellipsoid in ⁠ R m . {\displaystyle \mathbf {R} ^{m}.} ⁠ Non-zero singular values are simply the lengths of the semi-axes of this ellipsoid. Especially when ⁠ n = m , {\displaystyle n=m,} ⁠ and all the singular values are distinct and non-zero, the SVD of the linear map ⁠ T {\displaystyle T} ⁠ can be easily analyzed as a succession of three consecutive moves: consider the ellipsoid ⁠ T ( S ) {\displaystyle T(S)} ⁠ and specifically its axes; then consider the directions in ⁠ R n {\displaystyle \mathbf {R} ^{n}} ⁠ sent by ⁠ T {\displaystyle T} ⁠ onto these axes. These directions happen to be mutually orthogonal. Apply first an isometry ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ sending these directions to the coordinate axes of ⁠ R n . {\displaystyle \mathbf {R} ^{n}.} ⁠ On a second move, apply an endomorphism ⁠ D {\displaystyle \mathbf {D} } ⁠ diagonalized along the coordinate axes and stretching or shrinking in each direction, using the semi-axes lengths of ⁠ T ( S ) {\displaystyle T(S)} ⁠ as stretching coefficients. The composition ⁠ D ∘ V ∗ {\displaystyle \mathbf {D} \circ \mathbf {V} ^{*}} ⁠ then sends the unit-sphere onto an ellipsoid isometric to ⁠ T ( S ) . {\displaystyle T(S).} ⁠ To define the third and last move, apply an isometry ⁠ U {\displaystyle \mathbf {U} } ⁠ to this ellipsoid to obtain ⁠ T ( S ) . {\displaystyle T(S).} ⁠ As can be easily checked, the composition ⁠ U ∘ D ∘ V ∗ {\displaystyle \mathbf {U} \circ \mathbf {D} \circ \mathbf {V} ^{*}} ⁠ coincides with ⁠ T . {\displaystyle T.} ⁠

## Example

[edit]

Consider the ⁠ 4 × 5 {\displaystyle 4\times 5} ⁠ matrix

M = [ 1 0 0 0 2 0 0 3 0 0 0 0 0 0 0 0 2 0 0 0 ] {\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}}}

A singular value decomposition of this matrix is given by ⁠ U Σ V ∗ {\displaystyle \mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}} ⁠

U = [ 0 − 1 0 0 − 1 0 0 0 0 0 0 − 1 0 0 − 1 0 ] Σ = [ 3 0 0 0 0 0 5 0 0 0 0 0 2 0 0 0 0 0 0 0 ] V ∗ = [ 0 0 − 1 0 0 − 0.2 0 0 0 − 0.8 0 − 1 0 0 0 0 0 0 1 0 − 0.8 0 0 0 0.2 ] {\displaystyle {\begin{aligned}\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{aligned}}}

The scaling matrix ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ 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 {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ are unitary, multiplying by their respective conjugate transposes yields identity matrices, as shown below. In this case, because ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ are real valued, each is an orthogonal matrix.

U U ∗ = [ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ] = I 4 V V ∗ = [ 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 ] = I 5 {\displaystyle {\begin{aligned}\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{aligned}}}

This particular singular value decomposition is not unique. For instance, we can keep ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ the same, but change the last two rows of ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ such that

V ∗ = [ 0 0 − 1 0 0 − 0.2 0 0 0 − 0.8 0 − 1 0 0 0 0.4 0 0 0.5 − 0.1 − 0.4 0 0 0.5 0.1 ] {\displaystyle \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}}}

and get an equally valid singular value decomposition. As the matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ has rank 3, it has only 3 nonzero singular values. In taking the product ⁠ U Σ V ∗ {\displaystyle \mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}} ⁠, the final column of ⁠ U {\displaystyle \mathbf {U} } ⁠ and the final two rows of ⁠ V ∗ {\displaystyle \mathbf {V^{*}} } ⁠ 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, ⁠ M = U r Σ r V r ∗ {\displaystyle \mathbf {M} =\mathbf {U} _{r}\mathbf {\Sigma } _{r}\mathbf {V} _{r}^{*}} ⁠, eliminates these superfluous rows, columns, and singular values:

U r = [ 0 − 1 0 − 1 0 0 0 0 0 0 0 − 1 ] Σ r = [ 3 0 0 0 5 0 0 0 2 ] V r ∗ = [ 0 0 − 1 0 0 − 0.2 0 0 0 − 0.8 0 − 1 0 0 0 ] {\displaystyle {\begin{aligned}\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{aligned}}}

## SVD and spectral decomposition

[edit]

### Singular values, singular vectors, and their relation to the SVD

[edit]

A non-negative real number ⁠ σ {\displaystyle \sigma } ⁠ is a singular value for ⁠ M {\displaystyle \mathbf {M} } ⁠ if and only if there exist unit-length vectors ⁠ u {\displaystyle \mathbf {u} } ⁠ in ⁠ K m {\displaystyle K^{m}} ⁠ and ⁠ v {\displaystyle \mathbf {v} } ⁠ in ⁠ K n {\displaystyle K^{n}} ⁠ such that

M v = σ u , M ∗ u = σ v . {\displaystyle {\begin{aligned}\mathbf {Mv} &=\sigma \mathbf {u} ,\\\\[3mu]\mathbf {M} ^{*}\mathbf {u} &=\sigma \mathbf {v} .\end{aligned}}}

The vectors ⁠ u {\displaystyle \mathbf {u} } ⁠ and ⁠ v {\displaystyle \mathbf {v} } ⁠ are called left-singular and right-singular vectors for ⁠ σ , {\displaystyle \sigma ,} ⁠ respectively.

In any singular value decomposition

M = U Σ V ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}}

the diagonal entries of ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ are equal to the singular values of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ The first ⁠ p = min ( m , n ) {\displaystyle p=\min(m,n)} ⁠ columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ are, respectively, left- and right-singular vectors for the corresponding singular values. Consequently, the above theorem implies that:

* An ⁠ m × n {\displaystyle m\times n} ⁠ matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ has at most ⁠ p {\displaystyle p} ⁠ distinct singular values.
* It is always possible to find a unitary basis ⁠ U {\displaystyle \mathbf {U} } ⁠ for ⁠ K m {\displaystyle K^{m}} ⁠ with a subset of basis vectors spanning the left-singular vectors of each singular value of ⁠ M . {\displaystyle \mathbf {M} .} ⁠
* It is always possible to find a unitary basis ⁠ V {\displaystyle \mathbf {V} } ⁠ for ⁠ K n {\displaystyle K^{n}} ⁠ with a subset of basis vectors spanning the right-singular vectors of each singular value of ⁠ M . {\displaystyle \mathbf {M} .} ⁠

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

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 , {\displaystyle \mathbf {M} ,} ⁠ which by the rank–nullity theorem cannot be the same dimension if ⁠ m ≠ n . {\displaystyle m\neq n.} ⁠ Even if all singular values are nonzero, if ⁠ m > n {\displaystyle m>n} ⁠ then the cokernel is nontrivial, in which case ⁠ U {\displaystyle \mathbf {U} } ⁠ is padded with ⁠ m − n {\displaystyle m-n} ⁠ orthogonal vectors from the cokernel. Conversely, if ⁠ m < n , {\displaystyle m<n,} ⁠ then ⁠ V {\displaystyle \mathbf {V} } ⁠ is padded by ⁠ n − m {\displaystyle n-m} ⁠ orthogonal vectors from the kernel. However, if the singular value of ⁠ 0 {\displaystyle 0} ⁠ exists, the extra columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ or ⁠ V {\displaystyle \mathbf {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 ⁠ e i φ {\displaystyle e^{i\varphi }} ⁠ (for the real case up to a sign). Consequently, if all singular values of a square matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ are non-degenerate and non-zero, then its singular value decomposition is unique, up to multiplication of a column of ⁠ U {\displaystyle \mathbf {U} } ⁠ by a unit-phase factor and simultaneous multiplication of the corresponding column of ⁠ V {\displaystyle \mathbf {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 {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ spanning the subspaces of each singular value, and up to arbitrary unitary transformations on vectors of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ spanning the kernel and cokernel, respectively, of ⁠ M . {\displaystyle \mathbf {M} .} ⁠

### Relation to eigenvalue decomposition

[edit]

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

If ⁠ M {\displaystyle \mathbf {M} } ⁠ has SVD ⁠ M = U Σ V ∗ , {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*},} ⁠ the following two relations hold:

M ∗ M = V Σ ∗ U ∗ U Σ V ∗ = V ( Σ ∗ Σ ) V ∗ , M M ∗ = U Σ V ∗ V Σ ∗ U ∗ = U ( Σ Σ ∗ ) U ∗ . {\displaystyle {\begin{aligned}\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{aligned}}}

The right-hand sides of these relations describe the eigenvalue decompositions of the left-hand sides. Consequently:

* The columns of ⁠ V {\displaystyle \mathbf {V} } ⁠ (referred to as right-singular vectors) are eigenvectors of ⁠ M ∗ M . {\displaystyle \mathbf {M} ^{*}\mathbf {M} .} ⁠
* The columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ (referred to as left-singular vectors) are eigenvectors of ⁠ M M ∗ . {\displaystyle \mathbf {M} \mathbf {M} ^{*}.} ⁠
* The non-zero elements of ⁠ Σ {\displaystyle \mathbf {\Sigma } } ⁠ (non-zero singular values) are the square roots of the non-zero eigenvalues of ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ or ⁠ M M ∗ . {\displaystyle \mathbf {M} \mathbf {M} ^{*}.} ⁠

In the special case of ⁠ M {\displaystyle \mathbf {M} } ⁠ 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 ⁠ M = U D U ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {D} \mathbf {U} ^{*}} ⁠ for some unitary matrix ⁠ U {\displaystyle \mathbf {U} } ⁠ and diagonal matrix ⁠ D {\displaystyle \mathbf {D} } ⁠ with complex elements ⁠ σ i {\displaystyle \sigma _{i}} ⁠ along the diagonal. When ⁠ M {\displaystyle \mathbf {M} } ⁠ is positive semi-definite, ⁠ σ i {\displaystyle \sigma _{i}} ⁠ will be non-negative real numbers so that the decomposition ⁠ M = U D U ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {D} \mathbf {U} ^{*}} ⁠ is also a singular value decomposition. Otherwise, it can be recast as an SVD by moving the phase ⁠ e i φ {\displaystyle e^{i\varphi }} ⁠ of each ⁠ σ i {\displaystyle \sigma _{i}} ⁠ to either its corresponding ⁠ V i {\displaystyle \mathbf {V} _{i}} ⁠ or ⁠ U i . {\displaystyle \mathbf {U} _{i}.} ⁠ The natural connection of the SVD to non-normal matrices is through the polar decomposition theorem: ⁠ M = S R , {\displaystyle \mathbf {M} =\mathbf {S} \mathbf {R} ,} ⁠ where ⁠ S = U Σ U ∗ {\displaystyle \mathbf {S} =\mathbf {U} \mathbf {\Sigma } \mathbf {U} ^{*}} ⁠ is positive semidefinite and normal, and ⁠ R = U V ∗ {\displaystyle \mathbf {R} =\mathbf {U} \mathbf {V} ^{*}} ⁠ is unitary.

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

## Applications of the SVD

[edit]

### Pseudoinverse

[edit]

The singular value decomposition can be used for computing the pseudoinverse of a matrix. The pseudoinverse of the matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ with singular value decomposition ⁠ M = U Σ V ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}} ⁠ is

M + = V Σ + U ∗ , {\displaystyle \mathbf {M} ^{+}=\mathbf {V} {\boldsymbol {\Sigma }}^{+}\mathbf {U} ^{\ast },}

where  Σ + {\displaystyle {\boldsymbol {\Sigma }}^{+}} is the pseudoinverse of  Σ {\displaystyle {\boldsymbol {\Sigma }}} , 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

[edit]

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

### Total least squares minimization

[edit]

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

### Range, null space and rank

[edit]

Another application of the SVD is that it provides an explicit representation of the range and null space of a matrix ⁠ M . {\displaystyle \mathbf {M} .} ⁠ The right-singular vectors corresponding to vanishing singular values of ⁠ M {\displaystyle \mathbf {M} } ⁠ span the null space of ⁠ M {\displaystyle \mathbf {M} } ⁠ and the left-singular vectors corresponding to the non-zero singular values of ⁠ M {\displaystyle \mathbf {M} } ⁠ span the range of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ For example, in the above example the null space is spanned by the last row of ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ and the range is spanned by the first three columns of ⁠ U . {\displaystyle \mathbf {U} .} ⁠

As a consequence, the rank of ⁠ M {\displaystyle \mathbf {M} } ⁠ equals the number of non-zero singular values which is the same as the number of non-zero diagonal elements in  Σ {\displaystyle \mathbf {\Sigma } } . 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

[edit]

Some practical applications need to solve the problem of approximating a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ with another matrix  M ~ {\displaystyle {\tilde {\mathbf {M} }}} , said to be truncated, which has a specific rank ⁠ r {\displaystyle r} ⁠. In the case that the approximation is based on minimizing the Frobenius norm of the difference between ⁠ M {\displaystyle \mathbf {M} } ⁠ and ⁠ M ~ {\displaystyle {\tilde {\mathbf {M} }}} ⁠ under the constraint that  rank ⁡ ( M ~ ) = r , {\displaystyle \operatorname {rank} {\bigl (}{\tilde {\mathbf {M} }}{\bigr )}=r,} it turns out that the solution is given by the SVD of ⁠ M , {\displaystyle \mathbf {M} ,} ⁠ namely

M ~ = U Σ ~ V ∗ , {\displaystyle {\tilde {\mathbf {M} }}=\mathbf {U} {\tilde {\mathbf {\Sigma } }}\mathbf {V} ^{*},}

where  Σ ~ {\displaystyle {\tilde {\mathbf {\Sigma } }}} is the same matrix as  Σ {\displaystyle \mathbf {\Sigma } } except that it contains only the ⁠ r {\displaystyle 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

[edit]

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 {\displaystyle \mathbf {A} } ⁠ can be written as an outer product of two vectors ⁠ A = u ⊗ v , {\displaystyle \mathbf {A} =\mathbf {u} \otimes \mathbf {v} ,} ⁠ or, in coordinates, ⁠ A i j = u i v j . {\displaystyle A_{ij}=u_{i}v_{j}.} ⁠ Specifically, the matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ can be decomposed as,

M = ∑ i A i = ∑ i σ i U i ⊗ V i . {\displaystyle \mathbf {M} =\sum _{i}\mathbf {A} _{i}=\sum _{i}\sigma _{i}\mathbf {U} _{i}\otimes \mathbf {V} _{i}.}

Here ⁠ U i {\displaystyle \mathbf {U} _{i}} ⁠ and ⁠ V i {\displaystyle \mathbf {V} _{i}} ⁠ are the ⁠ i {\displaystyle i} ⁠-th columns of the corresponding SVD matrices, ⁠ σ i {\displaystyle \sigma _{i}} ⁠ are the ordered singular values, and each ⁠ A i {\displaystyle \mathbf {A} _{i}} ⁠ 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 {\displaystyle \sigma _{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 {\displaystyle \mathbf {U} } ⁠ in the SVD factorization is then a Gabor while the first column of ⁠ V {\displaystyle \mathbf {V} } ⁠ represents the time modulation (or vice versa). One may then define an index of separability

α = σ 1 2 ∑ i σ i 2 , {\displaystyle \alpha ={\frac {\sigma _{1}^{2}}{\sum _{i}\sigma _{i}^{2}}},}

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

[edit]

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

O = argmin Ω ‖ A Ω − B ‖ F subject to Ω T Ω = I , {\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} ,}

where  ‖ ⋅ ‖ F {\displaystyle \|\cdot \|_{F}} denotes the Frobenius norm.

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

### The Kabsch algorithm

[edit]

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

[edit]

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]

### Other examples

[edit]

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"  κ := σ max / σ min {\displaystyle \kappa :=\sigma _{\text{max}}/\sigma _{\text{min}}} . It often controls the error rate or convergence rate of a given computational scheme on such systems.[10][11]

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  Σ {\displaystyle \mathbf {\Sigma } } 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.[12]

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

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

In astrodynamics, the SVD and its variants are used as an option to determine suitable maneuver directions for transfer trajectory design[18] and orbital station-keeping.[19]

## Proof of existence

[edit]

An eigenvalue ⁠ λ {\displaystyle \lambda } ⁠ of a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ is characterized by the algebraic relation ⁠ M u = λ u . {\displaystyle \mathbf {M} \mathbf {u} =\lambda \mathbf {u} .} ⁠ When ⁠ M {\displaystyle \mathbf {M} } ⁠ is Hermitian, a variational characterization is also available. Let ⁠ M {\displaystyle \mathbf {M} } ⁠ be a real ⁠ n × n {\displaystyle n\times n} ⁠ symmetric matrix. Define

f : { R n -> R x ↦ x T M x {\displaystyle f:\left\\{{\begin{aligned}\mathbb {R} ^{n}&\to \mathbb {R} \\\\\mathbf {x} &\mapsto \mathbf {x} ^{\operatorname {T} }\mathbf {M} \mathbf {x} \end{aligned}}\right.}

By the extreme value theorem, this continuous function attains a maximum at some ⁠ u {\displaystyle \mathbf {u} } ⁠ when restricted to the unit sphere  { ‖ x ‖ = 1 } . {\displaystyle \\{\|\mathbf {x} \|=1\\}.} By the Lagrange multipliers theorem, ⁠ u {\displaystyle \mathbf {u} } ⁠ necessarily satisfies

∇ u T M u − λ ⋅ ∇ u T u = 0 {\displaystyle \nabla \mathbf {u} ^{\operatorname {T} }\mathbf {M} \mathbf {u} -\lambda \cdot \nabla \mathbf {u} ^{\operatorname {T} }\mathbf {u} =0}

for some real number ⁠ λ . {\displaystyle \lambda .} ⁠ The nabla symbol, ⁠ ∇ {\displaystyle \nabla } ⁠, is the del operator (differentiation with respect to ⁠ x {\displaystyle \mathbf {x} } ⁠). Using the symmetry of ⁠ M {\displaystyle \mathbf {M} } ⁠ we obtain

∇ x T M x − λ ⋅ ∇ x T x = 2 ( M − λ I ) x . {\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} .}

Therefore ⁠ M u = λ u , {\displaystyle \mathbf {M} \mathbf {u} =\lambda \mathbf {u} ,} ⁠ so ⁠ u {\displaystyle \mathbf {u} } ⁠ is a unit length eigenvector of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ For every unit length eigenvector ⁠ v {\displaystyle \mathbf {v} } ⁠ of ⁠ M {\displaystyle \mathbf {M} } ⁠ its eigenvalue is ⁠ f ( v ) , {\displaystyle f(\mathbf {v} ),} ⁠ so ⁠ λ {\displaystyle \lambda } ⁠ is the largest eigenvalue of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ The same calculation performed on the orthogonal complement of ⁠ u {\displaystyle \mathbf {u} } ⁠ gives the next largest eigenvalue and so on. The complex Hermitian case is similar; there ⁠ f ( x ) = x ∗ M x {\displaystyle f(\mathbf {x} )=\mathbf {x} ^{*}\mathbf {M} \mathbf {x} } ⁠ is a real-valued function of ⁠ 2 n {\displaystyle 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 {\displaystyle \mathbf {M} } ⁠ is no longer required.

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

### Based on the spectral theorem

[edit]

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

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

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

[ V 1 ∗ V 2 ∗ ] M ∗ M [ V 1 V 2 ] = [ V 1 ∗ M ∗ M V 1 V 1 ∗ M ∗ M V 2 V 2 ∗ M ∗ M V 1 V 2 ∗ M ∗ M V 2 ] = [ D 0 0 0 ] . {\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}}.}

This implies that

V 1 ∗ M ∗ M V 1 = D , V 2 ∗ M ∗ M V 2 = 0 . {\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} .}

Moreover, the second equation implies  M V 2 = 0 {\displaystyle \mathbf {M} \mathbf {V} _{2}=\mathbf {0} } .[20] Finally, the unitary-ness of  V {\displaystyle \mathbf {V} } translates, in terms of  V 1 {\displaystyle \mathbf {V} _{1}} and  V 2 {\displaystyle \mathbf {V} _{2}} , into the following conditions:

V 1 ∗ V 1 = I 1 , V 2 ∗ V 2 = I 2 , V 1 V 1 ∗ + V 2 V 2 ∗ = I 12 , {\displaystyle {\begin{aligned}\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{aligned}}}

where the subscripts on the identity matrices are used to remark that they are of different dimensions.

Let us now define

U 1 = M V 1 D − 1 2 . {\displaystyle \mathbf {U} _{1}=\mathbf {M} \mathbf {V} _{1}\mathbf {D} ^{-{\frac {1}{2}}}.}

Then,

U 1 D 1 2 V 1 ∗ = M V 1 D − 1 2 D 1 2 V 1 ∗ = M ( I − V 2 V 2 ∗ ) = M − ( M V 2 ) V 2 ∗ = M , {\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} ,}

since  M V 2 = 0 . {\displaystyle \mathbf {M} \mathbf {V} _{2}=\mathbf {0} .} This can be also seen as immediate consequence of the fact that  M V 1 V 1 ∗ = M {\displaystyle \mathbf {M} \mathbf {V} _{1}\mathbf {V} _{1}^{*}=\mathbf {M} } . This is equivalent to the observation that if  { v i } i = 1 ℓ {\displaystyle \\{{\boldsymbol {v}}_{i}\\}_{i=1}^{\ell }} is the set of eigenvectors of  M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } corresponding to non-vanishing eigenvalues  { λ i } i = 1 ℓ {\displaystyle \\{\lambda _{i}\\}_{i=1}^{\ell }} , then  { M v i } i = 1 ℓ {\displaystyle \\{\mathbf {M} {\boldsymbol {v}}_{i}\\}_{i=1}^{\ell }} is a set of orthogonal vectors, and  { λ i − 1 / 2 M v i } | i = 1 ℓ {\displaystyle {\bigl \\{}\lambda _{i}^{-1/2}\mathbf {M} {\boldsymbol {v}}_{i}{\bigr \\}}{\vphantom {|}}_{i=1}^{\ell }} is a (generally not complete) set of orthonormal vectors. This matches with the matrix formalism used above denoting with  V 1 {\displaystyle \mathbf {V} _{1}} the matrix whose columns are  { v i } i = 1 ℓ {\displaystyle \\{{\boldsymbol {v}}_{i}\\}_{i=1}^{\ell }} , with  V 2 {\displaystyle \mathbf {V} _{2}} the matrix whose columns are the eigenvectors of  M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } with vanishing eigenvalue, and  U 1 {\displaystyle \mathbf {U} _{1}} the matrix whose columns are the vectors  { λ i − 1 / 2 M v i } | i = 1 ℓ {\displaystyle {\bigl \\{}\lambda _{i}^{-1/2}\mathbf {M} {\boldsymbol {v}}_{i}{\bigr \\}}{\vphantom {|}}_{i=1}^{\ell }} .

We see that this is almost the desired result, except that  U 1 {\displaystyle \mathbf {U} _{1}} and  V 1 {\displaystyle \mathbf {V} _{1}} are in general not unitary, since they might not be square. However, we do know that the number of rows of  U 1 {\displaystyle \mathbf {U} _{1}} is no smaller than the number of columns, since the dimensions of  D {\displaystyle \mathbf {D} } is no greater than  m {\displaystyle m} and  n {\displaystyle n} . Also, since

U 1 ∗ U 1 = D − 1 2 V 1 ∗ M ∗ M V 1 D − 1 2 = D − 1 2 D D − 1 2 = I 1 , {\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}} ,}

the columns in  U 1 {\displaystyle \mathbf {U} _{1}} are orthonormal and can be extended to an orthonormal basis. This means that we can choose  U 2 {\displaystyle \mathbf {U} _{2}} such that  U = [ U 1 U 2 ] {\displaystyle \mathbf {U} ={\begin{bmatrix}\mathbf {U} _{1}&\mathbf {U} _{2}\end{bmatrix}}} is unitary.

For ⁠ V 1 {\displaystyle \mathbf {V} _{1}} ⁠ we already have ⁠ V 2 {\displaystyle \mathbf {V} _{2}} ⁠ to make it unitary. Now, define

Σ = [ [ D 1 2 0 0 0 ] 0 ] , {\displaystyle \mathbf {\Sigma } ={\begin{bmatrix}{\begin{bmatrix}\mathbf {D} ^{\frac {1}{2}}&0\\\0&0\end{bmatrix}}\\\0\end{bmatrix}},}

where extra zero rows are added or removed to make the number of zero rows equal the number of columns of ⁠ U 2 , {\displaystyle \mathbf {U} _{2},} ⁠ and hence the overall dimensions of  Σ {\displaystyle \mathbf {\Sigma } } equal to  m × n {\displaystyle m\times n} . Then

[ U 1 U 2 ] [ [ D 1 2 0 0 0 ] 0 ] [ V 1 V 2 ] ∗ = [ U 1 U 2 ] [ D 1 2 V 1 ∗ 0 ] = U 1 D 1 2 V 1 ∗ = M , {\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} ,}

which is the desired result:

M = U Σ V ∗ . {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}.}

Notice the argument could begin with diagonalizing ⁠ M M ∗ {\displaystyle \mathbf {M} \mathbf {M} ^{*}} ⁠ rather than ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ (This shows directly that ⁠ M M ∗ {\displaystyle \mathbf {M} \mathbf {M} ^{*}} ⁠ and ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ have the same non-zero eigenvalues).

### Based on variational characterization

[edit]

The singular values can also be characterized as the maxima of ⁠ u T M v , {\displaystyle \mathbf {u} ^{\mathrm {T} }\mathbf {M} \mathbf {v} ,} ⁠ considered as a function of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V , {\displaystyle \mathbf {V} ,} ⁠ over particular subspaces. The singular vectors are the values of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V {\displaystyle \mathbf {V} } ⁠ where these maxima are attained.

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

Consider the function ⁠ σ {\displaystyle \sigma } ⁠ restricted to ⁠ S m − 1 × S n − 1 . {\displaystyle S^{m-1}\times S^{n-1}.} ⁠ Since both ⁠ S m − 1 {\displaystyle S^{m-1}} ⁠ and ⁠ S n − 1 {\displaystyle S^{n-1}} ⁠ are compact sets, their product is also compact. Furthermore, since ⁠ σ {\displaystyle \sigma } ⁠ is continuous, it attains a largest value for at least one pair of vectors ⁠ u {\displaystyle \mathbf {u} } ⁠ in ⁠ S m − 1 {\displaystyle S^{m-1}} ⁠ and ⁠ v {\displaystyle \mathbf {v} } ⁠ in ⁠ S n − 1 . {\displaystyle S^{n-1}.} ⁠ This largest value is denoted ⁠ σ 1 {\displaystyle \sigma _{1}} ⁠ and the corresponding vectors are denoted ⁠ u 1 {\displaystyle \mathbf {u} _{1}} ⁠ and ⁠ v 1 . {\displaystyle \mathbf {v} _{1}.} ⁠ Since ⁠ σ 1 {\displaystyle \sigma _{1}} ⁠ is the largest value of ⁠ σ ( u , v ) {\displaystyle \sigma (\mathbf {u} ,\mathbf {v} )} ⁠ it must be non-negative. If it were negative, changing the sign of either ⁠ u 1 {\displaystyle \mathbf {u} _{1}} ⁠ or ⁠ v 1 {\displaystyle \mathbf {v} _{1}} ⁠ would make it positive and therefore larger.

Statement. ⁠ u 1 {\displaystyle \mathbf {u} _{1}} ⁠ and ⁠ v 1 {\displaystyle \mathbf {v} _{1}} ⁠ are left and right-singular vectors of ⁠ M {\displaystyle \mathbf {M} } ⁠ with corresponding singular value ⁠ σ 1 . {\displaystyle \sigma _{1}.} ⁠

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

∇ σ = ∇ u T M v − λ 1 ⋅ ∇ u T u − λ 2 ⋅ ∇ v T v {\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} }

After some algebra, this becomes

M v 1 = 2 λ 1 u 1 + 0 , M T u 1 = 0 + 2 λ 2 v 1 . {\displaystyle {\begin{aligned}\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{aligned}}}

Multiplying the first equation from left by ⁠ u 1 T {\displaystyle \mathbf {u} _{1}^{\textrm {T}}} ⁠ and the second equation from left by ⁠ v 1 T {\displaystyle \mathbf {v} _{1}^{\textrm {T}}} ⁠ and taking  ‖ u ‖ = ‖ v ‖ = 1 {\displaystyle \|\mathbf {u} \|=\|\mathbf {v} \|=1} into account gives

σ 1 = 2 λ 1 = 2 λ 2 . {\displaystyle \sigma _{1}=2\lambda _{1}=2\lambda _{2}.}

Plugging this into the pair of equations above, we have

M v 1 = σ 1 u 1 , M T u 1 = σ 1 v 1 . {\displaystyle {\begin{aligned}\mathbf {M} \mathbf {v} _{1}&=\sigma _{1}\mathbf {u} _{1},\\\\\mathbf {M} ^{\operatorname {T} }\mathbf {u} _{1}&=\sigma _{1}\mathbf {v} _{1}.\end{aligned}}}

This proves the statement.

More singular vectors and singular values can be found by maximizing ⁠ σ ( u , v ) {\displaystyle \sigma (\mathbf {u} ,\mathbf {v} )} ⁠ over normalized ⁠ u {\displaystyle \mathbf {u} } ⁠ and ⁠ v {\displaystyle \mathbf {v} } ⁠ which are orthogonal to ⁠ u 1 {\displaystyle \mathbf {u} _{1}} ⁠ and ⁠ v 1 , {\displaystyle \mathbf {v} _{1},} ⁠ respectively.

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

## Calculating the SVD

[edit]

### One-sided Jacobi algorithm

[edit]

One-sided Jacobi algorithm is an iterative algorithm,[21] where a matrix is iteratively transformed into a matrix with orthogonal columns. The elementary iteration is given as a Jacobi rotation,

M <- M J ( p , q , θ ) , {\displaystyle M\leftarrow MJ(p,q,\theta ),}

where the angle  θ {\displaystyle \theta } of the Jacobi rotation matrix  J ( p , q , θ ) {\displaystyle J(p,q,\theta )} is chosen such that after the rotation the columns with numbers  p {\displaystyle p} and  q {\displaystyle q} become orthogonal. The indices  ( p , q ) {\displaystyle (p,q)} are swept cyclically,  ( p = 1 … m , q = p + 1 … m ) {\displaystyle (p=1\dots m,q=p+1\dots m)} , where  m {\displaystyle m} is the number of columns.

After the algorithm has converged, the singular value decomposition  M = U S V T {\displaystyle M=USV^{T}} is recovered as follows: the matrix  V {\displaystyle V} is the accumulation of Jacobi rotation matrices, the matrix  U {\displaystyle U} is given by normalising the columns of the transformed matrix  M {\displaystyle M} , and the singular values are given as the norms of the columns of the transformed matrix  M {\displaystyle M} .

### Two-sided Jacobi algorithm

[edit]

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  R {\displaystyle R} 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,

M <- J T G M J {\displaystyle M\leftarrow J^{T}GMJ}

where  G {\displaystyle G} 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  J {\displaystyle J} 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  U {\displaystyle U} and  V {\displaystyle V} are accumulated as follows:  U <- U G T J {\displaystyle U\leftarrow UG^{T}J} ,  V <- V J {\displaystyle V\leftarrow VJ} .

### Numerical approach

[edit]

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

* The left-singular vectors of ⁠ M {\displaystyle \mathbf {M} } ⁠ are a set of orthonormal eigenvectors of ⁠ M M ∗ {\displaystyle \mathbf {M} \mathbf {M} ^{*}} ⁠.
* The right-singular vectors of ⁠ M {\displaystyle \mathbf {M} } ⁠ are a set of orthonormal eigenvectors of ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠.
* The non-zero singular values of ⁠ M {\displaystyle \mathbf {M} } ⁠ (found on the diagonal entries of  Σ {\displaystyle \mathbf {\Sigma } } ) are the square roots of the non-zero eigenvalues of both ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ and ⁠ M M ∗ {\displaystyle \mathbf {M} \mathbf {M} ^{*}} ⁠.

The SVD of a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ is typically computed by a two-step procedure. In the first step, the matrix is reduced to a bidiagonal matrix. This takes order ⁠ O ( m n 2 ) {\displaystyle O(mn^{2})} ⁠ floating-point operations (flop), assuming that ⁠ m ≥ n . {\displaystyle m\geq n.} ⁠ 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 ) {\displaystyle O(n)} ⁠ iterations, each costing ⁠ O ( n ) {\displaystyle O(n)} ⁠ flops. Thus, the first step is more expensive, and the overall cost is ⁠ O ( m n 2 ) {\displaystyle O(mn^{2})} ⁠ flops (Trefethen & Bau III 1997, Lecture 31).

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

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 (1965). The LAPACK subroutine DBDSQR[22] implements this iterative method, with some modifications to cover the case where the singular values are very small (Demmel & Kahan 1990). Together with a first step using Householder reflections and, if appropriate, QR decomposition, this forms the DGESVD[23] 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 {\displaystyle 2\times 2} ⁠ SVD problems, similar to how the Jacobi eigenvalue algorithm solves a sequence of ⁠ 2 × 2 {\displaystyle 2\times 2} ⁠ eigenvalue methods (Golub & Van Loan 1996, §8.6.3). Yet another method for step 2 uses the idea of divide-and-conquer eigenvalue algorithms (Trefethen & Bau III 1997, Lecture 31).

There is an alternative way that does not explicitly use the eigenvalue decomposition.[24] Usually the singular value problem of a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ is converted into an equivalent symmetric eigenvalue problem such as ⁠ M M ∗ , {\displaystyle \mathbf {M} \mathbf {M} ^{*},} ⁠ ⁠ M ∗ M , {\displaystyle \mathbf {M} ^{*}\mathbf {M} ,} ⁠ or

[ 0 M M ∗ 0 ] . {\displaystyle {\begin{bmatrix}\mathbf {0} &\mathbf {M} \\\\\mathbf {M} ^{*}&\mathbf {0} \end{bmatrix}}.}

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 ⁠ M ⇒ Q R {\displaystyle \mathbf {M} \Rightarrow \mathbf {Q} \mathbf {R} } ⁠ and the LQ decomposition of ⁠ R {\displaystyle \mathbf {R} } ⁠ gives ⁠ R ⇒ L P ∗ . {\displaystyle \mathbf {R} \Rightarrow \mathbf {L} \mathbf {P} ^{*}.} ⁠ Thus, at every iteration, we have ⁠ M ⇒ Q L P ∗ , {\displaystyle \mathbf {M} \Rightarrow \mathbf {Q} \mathbf {L} \mathbf {P} ^{*},} ⁠ update ⁠ M ⇐ L {\displaystyle \mathbf {M} \Leftarrow \mathbf {L} } ⁠ 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

[edit]

The singular values of a ⁠ 2 × 2 {\displaystyle 2\times 2} ⁠ matrix can be found analytically. Let the matrix be  M = z 0 I + z 1 σ 1 + z 2 σ 2 + z 3 σ 3 {\displaystyle \mathbf {M} =z_{0}\mathbf {I} +z_{1}\sigma _{1}+z_{2}\sigma _{2}+z_{3}\sigma _{3}}

where  z i ∈ C {\displaystyle z_{i}\in \mathbb {C} } are complex numbers that parameterize the matrix, ⁠ I {\displaystyle \mathbf {I} } ⁠ is the identity matrix, and  σ i {\displaystyle \sigma _{i}} denote the Pauli matrices. Then its two singular values are given by

σ ± = | z 0 | 2 + | z 1 | 2 + | z 2 | 2 + | z 3 | 2 ± ( | 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 = | z 0 | 2 + | z 1 | 2 + | z 2 | 2 + | z 3 | 2 ± 2 ( Re ⁡ z 0 z 1 ∗ ) 2 + ( Re ⁡ z 0 z 2 ∗ ) 2 + ( Re ⁡ z 0 z 3 ∗ ) 2 + ( Im ⁡ z 1 z 2 ∗ ) 2 + ( Im ⁡ z 2 z 3 ∗ ) 2 + ( Im ⁡ z 3 z 1 ∗ ) 2 {\displaystyle {\begin{aligned}\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_{0}z_{1}^{*})^{2}+(\operatorname {Re} z_{0}z_{2}^{*})^{2}+(\operatorname {Re} z_{0}z_{3}^{*})^{2}+(\operatorname {Im} z_{1}z_{2}^{*})^{2}+(\operatorname {Im} z_{2}z_{3}^{*})^{2}+(\operatorname {Im} z_{3}z_{1}^{*})^{2}}}}}\end{aligned}}}

## Reduced SVDs

[edit]

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 {\displaystyle m\times n} ⁠ matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ of rank ⁠ r {\displaystyle r} ⁠:

### Thin SVD

[edit]

The thin, or economy-sized, SVD of a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ is given by[25]

M = U k Σ k V k ∗ , {\displaystyle \mathbf {M} =\mathbf {U} _{k}\mathbf {\Sigma } _{k}\mathbf {V} _{k}^{*},}

where  k = min ( m , n ) , {\displaystyle k=\min(m,n),} the matrices ⁠ U k {\displaystyle \mathbf {U} _{k}} ⁠ and ⁠ V k {\displaystyle \mathbf {V} _{k}} ⁠ contain only the first ⁠ k {\displaystyle k} ⁠ columns of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V , {\displaystyle \mathbf {V} ,} ⁠ and ⁠ Σ k {\displaystyle \mathbf {\Sigma } _{k}} ⁠ contains only the first ⁠ k {\displaystyle k} ⁠ singular values from ⁠ Σ . {\displaystyle \mathbf {\Sigma } .} ⁠ The matrix ⁠ U k {\displaystyle \mathbf {U} _{k}} ⁠ is thus ⁠ m × k , {\displaystyle m\times k,} ⁠ ⁠ Σ k {\displaystyle \mathbf {\Sigma } _{k}} ⁠ is ⁠ k × k {\displaystyle k\times k} ⁠ diagonal, and ⁠ V k ∗ {\displaystyle \mathbf {V} _{k}^{*}} ⁠ is ⁠ k × n . {\displaystyle k\times n.} ⁠

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

### Compact SVD

[edit]

The compact SVD of a matrix ⁠ M {\displaystyle \mathbf {M} } ⁠ is given by

M = U r Σ r V r ∗ . {\displaystyle \mathbf {M} =\mathbf {U} _{r}\mathbf {\Sigma } _{r}\mathbf {V} _{r}^{*}.}

Only the ⁠ r {\displaystyle r} ⁠ column vectors of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ r {\displaystyle r} ⁠ row vectors of ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ corresponding to the non-zero singular values ⁠ Σ r {\displaystyle \mathbf {\Sigma } _{r}} ⁠ are calculated. The remaining vectors of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ are not calculated. This is quicker and more economical than the thin SVD if ⁠ r ≪ min ( m , n ) . {\displaystyle r\ll \min(m,n).} ⁠ The matrix ⁠ U r {\displaystyle \mathbf {U} _{r}} ⁠ is thus ⁠ m × r , {\displaystyle m\times r,} ⁠ ⁠ Σ r {\displaystyle \mathbf {\Sigma } _{r}} ⁠ is ⁠ r × r {\displaystyle r\times r} ⁠ diagonal, and ⁠ V r ∗ {\displaystyle \mathbf {V} _{r}^{*}} ⁠ is ⁠ r × n . {\displaystyle r\times n.} ⁠

### Truncated SVD

[edit]

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

M ~ = U t Σ t V t ∗ , {\displaystyle {\tilde {\mathbf {M} }}=\mathbf {U} _{t}\mathbf {\Sigma } _{t}\mathbf {V} _{t}^{*},}

where matrix ⁠ U t {\displaystyle \mathbf {U} _{t}} ⁠ is ⁠ m × t , {\displaystyle m\times t,} ⁠ ⁠ Σ t {\displaystyle \mathbf {\Sigma } _{t}} ⁠ is ⁠ t × t {\displaystyle t\times t} ⁠ diagonal, and ⁠ V t ∗ {\displaystyle \mathbf {V} _{t}^{*}} ⁠ is ⁠ t × n . {\displaystyle t\times n.} ⁠ Only the ⁠ t {\displaystyle t} ⁠ column vectors of ⁠ U {\displaystyle \mathbf {U} } ⁠ and ⁠ t {\displaystyle t} ⁠ row vectors of ⁠ V ∗ {\displaystyle \mathbf {V} ^{*}} ⁠ corresponding to the ⁠ t {\displaystyle t} ⁠ largest singular values ⁠ Σ t {\displaystyle \mathbf {\Sigma } _{t}} ⁠ are calculated. This can be much quicker and more economical than the compact SVD if ⁠ t ≪ r , {\displaystyle t\ll r,} ⁠ but requires a completely different toolset of numerical solvers.

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

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

## Norms

[edit]

### Ky Fan norms

[edit]

The sum of the ⁠ k {\displaystyle k} ⁠ largest singular values of ⁠ M {\displaystyle \mathbf {M} } ⁠ is a matrix norm, the Ky Fan ⁠ k {\displaystyle k} ⁠-norm of ⁠ M . {\displaystyle \mathbf {M} .} ⁠[27]

The first of the Ky Fan norms, the Ky Fan 1-norm, is the same as the operator norm of ⁠ M {\displaystyle \mathbf {M} } ⁠ as a linear operator with respect to the Euclidean norms of ⁠ K m {\displaystyle K^{m}} ⁠ and ⁠ K n . {\displaystyle K^{n}.} ⁠ In other words, the Ky Fan 1-norm is the operator norm induced by the standard  ℓ 2 {\displaystyle \ell ^{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 {\displaystyle \mathbf {M} } ⁠ on (possibly infinite-dimensional) Hilbert spaces

‖ M ‖ = ‖ M ∗ M ‖ 1 2 {\displaystyle \|\mathbf {M} \|=\|\mathbf {M} ^{*}\mathbf {M} \|^{\frac {1}{2}}}

But, in the matrix case, ⁠ ( M ∗ M ) 1 / 2 {\displaystyle (\mathbf {M} ^{*}\mathbf {M} )^{1/2}} ⁠ is a normal matrix, so  ‖ M ∗ M ‖ 1 / 2 {\displaystyle \|\mathbf {M} ^{*}\mathbf {M} \|^{1/2}} is the largest eigenvalue of ⁠ ( M ∗ M ) 1 / 2 , {\displaystyle (\mathbf {M} ^{*}\mathbf {M} )^{1/2},} ⁠ i.e. the largest singular value of ⁠ M . {\displaystyle \mathbf {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 {\displaystyle \|\mathbf {M} \|=\operatorname {Tr} (\mathbf {M} ^{*}\mathbf {M} )^{1/2}} (the eigenvalues of ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ are the squares of the singular values).

### Hilbert–Schmidt norm

[edit]

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

⟨ M , N ⟩ = tr ⁡ ( N ∗ M ) . {\displaystyle \langle \mathbf {M} ,\mathbf {N} \rangle =\operatorname {tr} \left(\mathbf {N} ^{*}\mathbf {M} \right).}

So the induced norm is

‖ M ‖ = ⟨ M , M ⟩ = tr ⁡ ( M ∗ M ) . {\displaystyle \|\mathbf {M} \|={\sqrt {\langle \mathbf {M} ,\mathbf {M} \rangle }}={\sqrt {\operatorname {tr} \left(\mathbf {M} ^{*}\mathbf {M} \right)}}.}

Since the trace is invariant under unitary equivalence, this shows

‖ M ‖ = | ∑ i σ i 2 {\displaystyle \|\mathbf {M} \|={\sqrt {{\vphantom {\bigg |}}\sum _{i}\sigma _{i}^{2}}}}

where ⁠ σ i {\displaystyle \sigma _{i}} ⁠ are the singular values of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ This is called the Frobenius norm, Schatten 2-norm, or Hilbert–Schmidt norm of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ Direct calculation shows that the Frobenius norm of ⁠ M = ( m i j ) {\displaystyle \mathbf {M} =(m_{ij})} ⁠ coincides with:

| ∑ i j | m i j | 2 . {\displaystyle {\sqrt {{\vphantom {\bigg |}}\sum _{ij}|m_{ij}|^{2}}}.}

In addition, the Frobenius norm and the trace norm (the nuclear norm) are special cases of the Schatten norm.

## Variations and generalizations

[edit]

### Scale-invariant SVD

[edit]

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

[edit]

The factorization ⁠ M = U Σ V ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {\Sigma } \mathbf {V} ^{*}} ⁠ can be extended to a bounded operator ⁠ M {\displaystyle \mathbf {M} } ⁠ on a separable Hilbert space ⁠ H . {\displaystyle H.} ⁠ Namely, for any bounded operator ⁠ M , {\displaystyle \mathbf {M} ,} ⁠ there exist a partial isometry ⁠ U , {\displaystyle \mathbf {U} ,} ⁠ a unitary ⁠ V , {\displaystyle \mathbf {V} ,} ⁠ a measure space ⁠ ( X , μ ) , {\displaystyle (X,\mu ),} ⁠ and a non-negative measurable ⁠ f {\displaystyle f} ⁠ such that

M = U T f V ∗ {\displaystyle \mathbf {M} =\mathbf {U} T_{f}\mathbf {V} ^{*}}

where ⁠ T f {\displaystyle T_{f}} ⁠ is the multiplication by ⁠ f {\displaystyle f} ⁠ on ⁠ L 2 ( X , μ ) . {\displaystyle L^{2}(X,\mu ).} ⁠

This can be shown by mimicking the linear algebraic argument for the matrix case above. ⁠ V T f V ∗ {\displaystyle \mathbf {V} T_{f}\mathbf {V} ^{*}} ⁠ is the unique positive square root of ⁠ M ∗ M , {\displaystyle \mathbf {M} ^{*}\mathbf {M} ,} ⁠ as given by the Borel functional calculus for self-adjoint operators. The reason why ⁠ U {\displaystyle \mathbf {U} } ⁠ need not be unitary is that, unlike the finite-dimensional case, given an isometry ⁠ U 1 {\displaystyle U_{1}} ⁠ with nontrivial kernel, a suitable ⁠ U 2 {\displaystyle U_{2}} ⁠ may not be found such that

[ U 1 U 2 ] {\displaystyle {\begin{bmatrix}U_{1}\\\U_{2}\end{bmatrix}}}

is a unitary operator.

As for matrices, the singular value factorization is equivalent to the polar decomposition for operators: we can simply write

M = U V ∗ ⋅ V T f V ∗ {\displaystyle \mathbf {M} =\mathbf {U} \mathbf {V} ^{*}\cdot \mathbf {V} T_{f}\mathbf {V} ^{*}}

and notice that ⁠ U V ∗ {\displaystyle \mathbf {U} \mathbf {V} ^{*}} ⁠ is still a partial isometry while ⁠ V T f V ∗ {\displaystyle \mathbf {V} T_{f}\mathbf {V} ^{*}} ⁠ is positive.

### Singular values and compact operators

[edit]

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 {\displaystyle T} ⁠ is compact, every non-zero ⁠ λ {\displaystyle \lambda } ⁠ in its spectrum is an eigenvalue. Furthermore, a compact self-adjoint operator can be diagonalized by its eigenvectors. If ⁠ M {\displaystyle \mathbf {M} } ⁠ is compact, so is ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠. Applying the diagonalization result, the unitary image of its positive square root ⁠ T f {\displaystyle T_{f}} ⁠ has a set of orthonormal eigenvectors ⁠ { e i } {\displaystyle \\{e_{i}\\}} ⁠ corresponding to strictly positive eigenvalues ⁠ { σ i } {\displaystyle \\{\sigma _{i}\\}} ⁠. For any ⁠ ψ {\displaystyle \psi } ⁠ in ⁠ H , {\displaystyle H,} ⁠

M ψ = U T f V ∗ ψ = ∑ i ⟨ U T f V ∗ ψ , U e i ⟩ U e i = ∑ i σ i ⟨ ψ , V e i ⟩ U e i , {\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},}

where the series converges in the norm topology on ⁠ H . {\displaystyle H.} ⁠ Notice how this resembles the expression from the finite-dimensional case. ⁠ σ i {\displaystyle \sigma _{i}} ⁠ are called the singular values of ⁠ M . {\displaystyle \mathbf {M} .} ⁠ ⁠ { U e i } {\displaystyle \\{\mathbf {U} e_{i}\\}} ⁠ (resp. ⁠ { U e i } {\displaystyle \\{\mathbf {U} e_{i}\\}} ⁠) can be considered the left-singular (resp. right-singular) vectors of ⁠ M . {\displaystyle \mathbf {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 {\displaystyle \mathbf {M} } ⁠ is compact if and only if ⁠ M ∗ M {\displaystyle \mathbf {M} ^{*}\mathbf {M} } ⁠ is compact.

## History

[edit]

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 . {\displaystyle \mathbf {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;[29] 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  σ k {\displaystyle \sigma _{k}} 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,[30] 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,[31] which uses Householder transformations or reflections. In 1970, Golub and Christian Reinsch[32] published a variant of the Golub/Kahan algorithm that is still the one most-used today.

## See also

[edit]

* Canonical correlation
* Canonical form
* Correspondence analysis (CA)
* Curse of dimensionality
* Digital signal processing
* Dimensionality reduction
* Eigendecomposition of a matrix
* Empirical orthogonal functions (EOFs)
* Fourier analysis
* Generalized singular value decomposition
* Inequalities about singular values
* K-SVD
* Latent semantic analysis
* Latent semantic indexing
* Linear least squares
* List of Fourier-related transforms
* Locality-sensitive hashing
* Low-rank approximation
* Matrix decomposition
* Multilinear principal component analysis (MPCA)
* Nearest neighbor search
* Non-linear iterative partial least squares
* Polar decomposition
* Principal component analysis (PCA)
* Schmidt decomposition
* Smith normal form
* Singular value
* Time series
* Two-dimensional singular-value decomposition (2DSVD)
* von Neumann's trace inequality
* Wavelet compression

## Notes

[edit]

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. S2CID 12827601.
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.
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. S2CID 52286352. 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. Bibcode:2000PNAS...9710101A. doi:10.1073/pnas.97.18.10101. PMC 27718. PMID 10963673.
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. Bibcode:2004PNAS..10116577A. doi:10.1073/pnas.0406767101. PMC 534520. PMID 15545604.
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. Bibcode:2006PNAS..10311828A. doi:10.1073/pnas.0604756103. PMC 1524674. PMID 16877539.
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. Bibcode:2013PLoSO...878913B. doi:10.1371/journal.pone.0078913. PMC 3839928. PMID 24282503. Highlight.
10. ^ Edelman, Alan (1992). "On the distribution of a scaled condition number" (PDF). Math. Comp. 58 (197): 185–190. Bibcode:1992MaCom..58..185E. doi:10.1090/S0025-5718-1992-1106966-2.
11. ^ 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.
12. ^ 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.
13. ^ Setyawati, Y.; Ohme, F.; Khan, S. (2019). "Enhancing gravitational waveform model through dynamic calibration". Physical Review D. 99 (2): 024010. arXiv:1810.07060. Bibcode:2019PhRvD..99b4010S. doi:10.1103/PhysRevD.99.024010. S2CID 118935941.
14. ^ Sarwar, Badrul; Karypis, George; Konstan, Joseph A. & Riedl, John T. (2000). "Application of Dimensionality Reduction in Recommender System – A Case Study" (PDF). University of Minnesota. `{{cite journal}}`: Cite journal requires `|journal=` (help)
15. ^ Bosagh Zadeh, Reza; Carlsson, Gunnar (2013). "Dimension Independent Matrix Square Using MapReduce" (PDF). arXiv:1304.1467. Bibcode:2013arXiv1304.1467B. `{{cite journal}}`: Cite journal requires `|journal=` (help)
16. ^ Hadi Fanaee Tork; João Gama (September 2014). "Eigenspace method for spatiotemporal hotspot detection". Expert Systems. 32 (3): 454–464. arXiv:1406.3506. Bibcode:2014arXiv1406.3506F. doi:10.1111/exsy.12088. S2CID 15476557.
17. ^ 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. arXiv:1406.3496. doi:10.3233/IDA-150734. S2CID 17966555.
18. ^ Muralidharan, Vivek; Howell, Kathleen (2023). "Stretching directions in cislunar space: Applications for departures and transfer design". Astrodynamics. 7 (2): 153–178. Bibcode:2023AsDyn...7..153M. doi:10.1007/s42064-022-0147-z. S2CID 252637213.
19. ^ Muralidharan, Vivek; Howell, Kathleen (2022). "Leveraging stretching directions for stationkeeping in Earth-Moon halo orbits". Advances in Space Research. 69 (1): 620–646. Bibcode:2022AdSpR..69..620M. doi:10.1016/j.asr.2021.10.028. S2CID 239490016.
20. ^ To see this, we just have to notice that  Tr ⁡ ( V 2 ∗ M ∗ M V 2 ) = ‖ M V 2 ‖ 2 {\displaystyle \operatorname {Tr} (\mathbf {V} _{2}^{*}\mathbf {M} ^{*}\mathbf {M} \mathbf {V} _{2})=\|\mathbf {M} \mathbf {V} _{2}\|^{2}} , and remember that  ‖ A ‖ = 0 ⇔ A = 0 {\displaystyle \|A\|=0\Leftrightarrow A=0} .
21. ^ Rijk, P.P.M. de (1989). "A one-sided Jacobi algorithm for computing the singular value decomposition on a vector computer". SIAM J. Sci. Stat. Comput. 10 (2): 359–371. doi:10.1137/0910023.
22. ^ Netlib.org
23. ^ Netlib.org
24. ^ mathworks.co.kr/matlabcentral/fileexchange/12674-simple-svd
25. ^ Demmel, James (2000). "Decompositions". Templates for the Solution of Algebraic Eigenvalue Problems. By Bai, Zhaojun; Demmel, James; Dongarra, Jack J.; Ruhe, Axel; van der Vorst, Henk A. Society for Industrial and Applied Mathematics. doi:10.1137/1.9780898719581. ISBN 978-0-89871-471-5.
26. ^ 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. hdl:11311/959408. PMID 26357324. S2CID 14714823.
27. ^ 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. Bibcode:1951PNAS...37..760F. doi:10.1073/pnas.37.11.760. PMC 1063464. PMID 16578416.
28. ^ Uhlmann, Jeffrey (2018), A Generalized Matrix Inverse that is Consistent with Respect to Diagonal Transformations (PDF), SIAM Journal on Matrix Analysis, vol. 239, pp. 781–800, archived from the original (PDF) on 17 June 2019
29. ^ Eckart, C.; Young, G. (1936). "The approximation of one matrix by another of lower rank". Psychometrika. 1 (3): 211–8. doi:10.1007/BF02288367. S2CID 10163399.
30. ^ Hestenes, M. R. (1958). "Inversion of Matrices by Biorthogonalization and Related Results". Journal of the Society for Industrial and Applied Mathematics. 6 (1): 51–90. doi:10.1137/0106005. JSTOR 2098862. MR 0092215.
31. ^ (Golub & Kahan 1965)
32. ^ Golub, G. H.; Reinsch, C. (1970). "Singular value decomposition and least squares solutions". Numerische Mathematik. 14 (5): 403–420. doi:10.1007/BF02163027. MR 1553974. S2CID 123532178.

## References

[edit]

* Banerjee, Sudipto; Roy, Anindya (2014), Linear Algebra and Matrix Analysis for Statistics, Texts in Statistical Science (1st ed.), Chapman and Hall/CRC, ISBN 978-1420095388
* Bisgard, James (2021). Analysis and Linear Algebra: The Singular Value Decomposition and Applications. Student Mathematical Library (1st ed.). AMS. ISBN 978-1-4704-6332-8.
* 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. hdl:11311/959408. PMID 26357324. S2CID 14714823.
* Trefethen, Lloyd N.; Bau III, David (1997). Numerical linear algebra. Philadelphia: Society for Industrial and Applied Mathematics. ISBN 978-0-89871-361-9.
* Demmel, James; Kahan, William (1990). "Accurate singular values of bidiagonal matrices". SIAM Journal on Scientific and Statistical Computing. 11 (5): 873–912. CiteSeerX 10.1.1.48.3740. doi:10.1137/0911052.
* Golub, Gene H.; Kahan, William (1965). "Calculating the singular values and pseudo-inverse of a matrix". Journal of the Society for Industrial and Applied Mathematics, Series B: Numerical Analysis. 2 (2): 205–224. Bibcode:1965SJNA....2..205G. doi:10.1137/0702016. JSTOR 2949777.
* Golub, Gene H.; Van Loan, Charles F. (1996). Matrix Computations (3rd ed.). Johns Hopkins. ISBN 978-0-8018-5414-9.
* GSL Team (2007). "§14.4 Singular Value Decomposition". GNU Scientific Library. Reference Manual.
* Halldor, Bjornsson and Venegas, Silvia A. (1997). "A manual for EOF and SVD analyses of climate data". McGill University, CCGCR Report No. 97-1, Montréal, Québec, 52pp.
* Hansen, P. C. (1987). "The truncated SVD as a method for regularization". BIT. 27 (4): 534–553. doi:10.1007/BF01937276. S2CID 37591557.
* Horn, Roger A.; Johnson, Charles R. (1985). "Section 7.3". Matrix Analysis. Cambridge University Press. ISBN 978-0-521-38632-6.
* Horn, Roger A.; Johnson, Charles R. (1991). "Chapter 3". Topics in Matrix Analysis. Cambridge University Press. ISBN 978-0-521-46713-1.
* Samet, H. (2006). Foundations of Multidimensional and Metric Data Structures. Morgan Kaufmann. ISBN 978-0-12-369446-1.
* Strang G. (1998). "Section 6.7". Introduction to Linear Algebra (3rd ed.). Wellesley-Cambridge Press. ISBN 978-0-9614088-5-5.
* Stewart, G. W. (1993). "On the Early History of the Singular Value Decomposition". SIAM Review. 35 (4): 551–566. CiteSeerX 10.1.1.23.1831. doi:10.1137/1035134. hdl:1903/566. JSTOR 2132388.
* Wall, Michael E.; Rechtsteiner, Andreas; Rocha, Luis M. (2003). "Singular value decomposition and principal component analysis". In D.P. Berrar; W. Dubitzky; M. Granzow (eds.). A Practical Approach to Microarray Data Analysis. Norwell, MA: Kluwer. pp. 91–109.
* Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007), "Section 2.6", Numerical Recipes: The Art of Scientific Computing (3rd ed.), New York: Cambridge University Press, ISBN 978-0-521-88068-8

## External links

[edit]

* Online SVD calculator

* v
* t
* e

Numerical linear algebra

Key concepts|

* Floating point
* Numerical stability

Problems|

* System of linear equations
* Matrix decompositions
* Matrix multiplication (algorithms)
* Matrix splitting
* Sparse problems

Hardware|

* CPU cache
* TLB
* Cache-oblivious algorithm
* SIMD
* Multiprocessing

Software|

* ATLAS
* MATLAB
* Basic Linear Algebra Subprograms (BLAS)
* LAPACK
* Specialized libraries
* General purpose software

* v
* t
* e

Functional analysis (topics – glossary)

Spaces|

* Banach
* Besov
* Fréchet
* Hilbert
* Hölder
* Nuclear
* Orlicz
* Schwartz
* Sobolev
* Topological vector

Properties|

* Barrelled
* Complete
* Dual (Algebraic / Topological)
* Locally convex
* Reflexive
* Separable

Theorems|

* Hahn–Banach
* Riesz representation
* Closed graph
* Uniform boundedness principle
* Kakutani fixed-point
* Krein–Milman
* Min–max
* Gelfand–Naimark
* Banach–Alaoglu

Operators|

* Adjoint
* Bounded
* Compact
* Hilbert–Schmidt
* Normal
* Nuclear
* Trace class
* Transpose
* Unbounded
* Unitary

Algebras|

* Banach algebra
* C*-algebra
* Spectrum of a C*-algebra
* Operator algebra
* Group algebra of a locally compact group
* Von Neumann algebra

Open problems|

* Invariant subspace problem
* Mahler's conjecture

Applications|

* Hardy space
* Spectral theory of ordinary differential equations
* Heat kernel
* Index theorem
* Calculus of variations
* Functional calculus
* Integral operator
* Jones polynomial
* Topological quantum field theory
* Noncommutative geometry
* Riemann hypothesis
* Distribution (or Generalized functions)

Advanced topics|

* Approximation property
* Balanced set
* Choquet theory
* Weak topology
* Banach–Mazur distance
* Tomita–Takesaki theory

* Category

* v
* t
* e

Spectral theory and *-algebras

Basic concepts|

* Involution/*-algebra
* Banach algebra
* B*-algebra
* C*-algebra
* Noncommutative topology
* Projection-valued measure
* Spectrum
* Spectrum of a C*-algebra
* Spectral radius
* Operator space

Main results|

* Gelfand–Mazur theorem
* Gelfand–Naimark theorem
* Gelfand representation
* Polar decomposition
* Singular value decomposition
* Spectral theorem
* Spectral theory of normal C*-algebras

Special Elements/Operators|

* Isospectral
* Normal operator
* Hermitian/Self-adjoint operator
* Unitary operator
* Unit

Spectrum|

* Krein–Rutman theorem
* Normal eigenvalue
* Spectrum of a C*-algebra
* Spectral radius
* Spectral asymmetry
* Spectral gap

Decomposition|

* Decomposition of a spectrum
* Continuous
* Point
* Residual
* Approximate point
* Compression
* Direct integral
* Discrete
* Spectral abscissa

Spectral Theorem|

* Borel functional calculus
* Min-max theorem
* Positive operator-valued measure
* Projection-valued measure
* Riesz projector
* Rigged Hilbert space
* Spectral theorem
* Spectral theory of compact operators
* Spectral theory of normal C*-algebras

Special algebras|

* Amenable Banach algebra
* With an Approximate identity
* Banach function algebra
* Disk algebra
* Nuclear C*-algebra
* Uniform algebra
* Von Neumann algebra
* Tomita–Takesaki theory

Finite-Dimensional|

* Alon–Boppana bound
* Bauer–Fike theorem
* Numerical range
* Schur–Horn theorem

Generalizations|

* Dirac spectrum
* Essential spectrum
* Pseudospectrum
* Structure space (Shilov boundary)

Miscellaneous|

* Abstract index group
* Banach algebra cohomology
* Cohen–Hewitt factorization theorem
* Extensions of symmetric operators
* Fredholm theory
* Limiting absorption principle
* Schröder–Bernstein theorems for operator algebras
* Sherman–Takeda theorem
* Unbounded operator

Examples|

* Wiener algebra

Applications|

* Almost Mathieu operator
* Corona theorem
* Hearing the shape of a drum (Dirichlet eigenvalue)
* Heat kernel
* Kuznetsov trace formula
* Lax pair
* Proto-value function
* Ramanujan graph
* Rayleigh–Faber–Krahn inequality
* Spectral geometry
* Spectral method
* Spectral theory of ordinary differential equations
* Sturm–Liouville theory
* Superstrong approximation
* Transfer operator
* Transform theory
* Weyl law
* Wiener–Khinchin theorem

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template