Singular Value Decomposition for symmetric matrix (GESVDJ)¶
Overview¶
The singular value decomposition (SVD) is a very useful technique for dealing with general dense matrix problems. Recent years, SVD has become a computationally viable tool for solving a wide variety of problems raised in many practical applications, such as least squares data fitting, image compression, facial recognition, principal component analysis, latent semantic analysis, and computing the 2-norm, condition number, and numerical rank of a matrix.
For more information, please refer “Jack Dongarra, Mark Gates, Azzam Haidar. The Singular Value Decomposition: Anatomy of Optimizing an Algorithm for Extreme Scale. 2018 SIAM Review, vol.60, No.4, pp.808-865”
Theory¶
The SVD of m-by-m symmetric matrix A is given by
where U is an orthogonal (unitary) matrix and Σ is an m-by-m matrix with real diagonal elements.
There are two dominant categories of SVD algorithms for dense matrix: bidiagonalization methods and Jacobi methods. The classical bidiagonalization method is a long sequential calculation, the oPGA has no advantage in the calculation. In contrast, Jacobi methods apply plane rotations to the entire matrix A. Two-sided Jacobi methods iteratively apply rotations on both sides of the matrix A to bring it to diagonal form, while one-sided Hestenes Jacobi methods apply rotations on one side to orthogonalize the columns of matrix A, and bring ATA to diagonal form. While Jacobi methods are often slow than bidiagonalization methods, they have a better potential in unrolling and pipelining.
Jacobi Methods¶
Jacobi uses a sequence of plane rotations to reduce a symmetric matrix A to a diagonal matrix
Each plane rotation, Jk=Jk(i,j,θ), now called a Jacobi or Givens rotation
where c=cosθ and s=sinθ. The angle θ is chosen to eliminate the pair aij, aji by applying J(i,j,θ) on the left and right of A, which can be viewed as the 2x2 eigenvalue problem
where ˆA is a 2X2 submatrix of matrix A. After the Givens rotations of the whole matrix A, the off-diagonal value of A will be reduced to zero-like value after 3-15 times iteration of the process.