Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
Singular Value Decomposition: LAPACK Computational Routines
This topic describes LAPACK routines for computing the singular value decomposition (SVD) of a general m -by- n matrix A :
A = UΣV^{H} .
In this decomposition, U and V are unitary (for complex A ) or orthogonal (for real A ); Σ is an m -by- n diagonal matrix with real diagonal elements σ i :
σ_{1}≥σ_{2}≥ ... ≥σ_{min(m, n)}≥ 0 .
The diagonal elements σ i are singular values of A . The first min(m, n) columns of the matrices U and V are, respectively, left and right singular vectors of A . The singular values and singular vectors satisfy
Av_{i} = σ_{i}u_{i} and A^{H}u_{i} = σ_{i}v_{i}
where ui and vi are the i -th columns of U and V , respectively.
To find the SVD of a general matrix A , call the LAPACK routine ?gebrd or ?gbbrd for reducing A to a bidiagonal matrix B by a unitary (orthogonal) transformation: A = QBP^{H} . Then call ?bdsqr , which forms the SVD of a bidiagonal matrix: B = U_{1}ΣV_{1}^{H} .
Thus, the sought-for SVD of A is given by A = UΣV^{H} =(QU_{1})Σ(V_{1}^{H}P^{H}) .
Table “Computational Routines for Singular Value Decomposition (SVD)” lists LAPACK routines (FORTRAN 77 interface) that perform singular value decomposition of matrices.
Table “Computational Routines for Singular Value Decomposition (SVD)” lists LAPACK routines that perform singular value decomposition of matrices. The corresponding routine names in the Fortran 95 interface are the same except that the first character is removed.
Computational Routines for Singular Value Decomposition (SVD)
Operation |
Real matrices |
Complex matrices |
|---|---|---|
Reduce A to a bidiagonal matrix B : A = QBP^{H} (full storage) |
||
Reduce A to a bidiagonal matrix B : A = QBP^{H} (band storage) |
||
Generate the orthogonal (unitary) matrix Q or P |
||
Apply the orthogonal (unitary) matrix Q or P |
||
Form singular value decomposition of the bidiagonal matrix B : B = UΣV^{H} |
You can use the SVD to find a minimum-norm solution to a (possibly) rank-deficient least squares problem of minimizing ||Ax - b||_{2} . The effective rank k of the matrix A can be determined as the number of singular values which exceed a suitable threshold. The minimum-norm solution is
x = V_{k}(Σ_{k})^{-1}c
where Σ k is the leading k -by- k submatrix of Σ , the matrix Vk consists of the first k columns of V = PV_{1} , and the vector c consists of the first k elements of U^{H}b = U_{1}^{H}Q^{H}b .