Question

Do you know an algorithm that calculates SVD using BLAS or LAPACK?

Lets say I have a symmetric Matrix A:

 1            22           13         14  
22             1           45         24   
13            45            1         34   
14            24           34          1 

After I get the upper triangular Matrix G from A:

 1            22           13         14  
 0             1           45         24   
 0             0            1         34   
 0             0            0          1
  • How do I calculate SVD of A, but with the values of G?
  • Do I have to pass all of matrix A or is sufficient to pass G (the middle matrix)?

In fact, I get after processing G matrix, but as its symmetric, how do I compute SVD of symmetric A, having only G (in other words, only having A´s upper triangular matrix)?

Was it helpful?

Solution

You cannot compute the SVD of a matrix without having access to all of the values in the matrix (i.e. you can't do it based solely on the upper triangle).

To see this, look at the SVD of the matrices:

A =  0  0     and G =  0  0
     1  0              0  0

Or, more generally, take the SVD of the matrix:

B =  0  0
     x  0

for various values of x. Observe that they are different, and conclude that you can't compute an SVD based solely on the upper triangle.

Edit: Alberto correctly observes that the questioner may be working with symmetric (or hermitian) matrices, for which it is absolutely possible to compute the SVD based solely on the upper triangle.

Finally had a chance to get back to this: One generally doesn't perform a SVD for symmetric matrices, because the SVD is over-general. All the eigenvalues of a symmetric matrix are real and the eigenvectors form an orthonomal basis, so the "SVD" is really just the usual eigen-decomposition. The exact LAPACK routines that you want to use vary somewhat with the specifics of matrix storage. Intel maintains a good reference on the LAPACK routines; you may find their decision-tree for LAPACK routines for symmetric eigenproblems useful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top