Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

please can I ask a bit stupid question? I have a complex matrix A as a set of equations. I wanted to find the solution of Ax=b where b is vector of right-hand side. So I have called zgetrf on A (does LU factorization) and then zgetrs on A and b (solves linear system of LU matrix) from Lapack/MKL. But this ends up with error, zgetrf can't factorize the matrix A and says that it is singular. So I have called SVD on it - zgesvd. And this works. But the eigenvalues of the matrix A are as follows:

(2885.24776463951,8.34234423485148)

(1.41421356237310,1.41421356237310)

(1.41421356237309,0.144427825453540)

(1.257628062933306E-014,0.000000000000000E+000)

(0.000000000000000E+000,0.000000000000000E+000)

(0.000000000000000E+000,0.000000000000000E+000)

(0.000000000000000E+000,0.000000000000000E+000)

(0.000000000000000E+000,0.000000000000000E+000)

Can I find where is the problem for zgetrf to factorize? I think such eigenvalues say that the matrix A is only of rank 4 in spite of having physical dimension 8 x 8... can I estimate which lines are dependent? Thank you very much

share|improve this question
2  
I would say the matrix has rank 3. A singular value of 1e-14 is, for all practical reasons, zero when there are other eigenvalues of size 1 or large. –  Wolfgang Bangerth Feb 13 '13 at 0:57
    
Hi Wolfgang, this seems me too small as well, unfortunately :( –  lovis Feb 13 '13 at 7:18
    
This question may be interesting for you as well: scicomp.stackexchange.com/questions/2510/… –  Alexander Feb 13 '13 at 8:55
add comment

1 Answer

up vote 3 down vote accepted

I'm going to assume you've given us the singular values from SVD, not the eigenvalues (they are related, but not the same). You are right: this means your matrix is rank 4 despite being an 8x8 matrix. The SVD has already given you everything you need: the first four left and right singular vectors are a basis that represents your operator as a 4x4 matrix. If the matrix A is static, then you could transform your whole calculation in to that those bases and proceed with a non-singular matrix. A better idea is probably to use the SVD to form a pseudo-inverse of $A$. Recall the SVD of $A$: $$ A = U \Sigma V^* $$ where $U$, $V$ are unitary and $\Sigma$ is diagonal with non-negative values (but some zeros, as in your case). The diagonal elements of $\Sigma$ are ordered and called the singular values. You can construct a pseudo-inverse as: $$A^\dagger = V \Sigma^\dagger U^* \quad \Sigma^\dagger_{ii} = \Sigma_{ii}^{-1} \text{ if } \Sigma_{ii} > 0, \text{ else } 0 $$

share|improve this answer
    
yes, many thanks! I will do it. Many thanks for your help. Yes, the values are singular values. –  lovis Feb 13 '13 at 7:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.