Wrong calculation of eigenvalues

Hello all!
I'm trying to solve the generalized eigenvalue problem (A-λB)*V=0 and find the eigenvalues λ. Using qz command (or eig command for the problem (inv(B)*A-λI)*V=0) in Matlab I take the eigenvalues. In order to validate my results for a given eigenvalue λi, I calculate the det(A-λiB), which I want to be near zero. Unfortunately, I come up with a result of rank 1e80!!
Additionally, the condition number of the equivalent matrix inv(B)*A is of rank 1e9. Is this normal? I assume that I have to deal with a singular matrix, but I don't understand why Matlab doesn't warn me for that...
Please, any help would be appreciated.
Thanks, Antigoni

 採用された回答

Antigoni
Antigoni 2013 年 6 月 27 日
編集済み: Matt J 2013 年 6 月 27 日

0 投票

Relocated to Comment by Matt J

その他の回答 (1 件)

Matt J
Matt J 2013 年 6 月 27 日

0 投票

I calculate the det(A-λiB), which I want to be near zero
You should really look at rcond(A-λiB) instead of the determinant.

6 件のコメント

Matt J
Matt J 2013 年 6 月 27 日
編集済み: Matt J 2013 年 6 月 27 日
As an example of why det() is unreliable, the following matrix is pretty clearly singular for numerical purposes, but has a huge determinant
>> A=diag(10*ones(90,1)); A(end)=1e-9;
>> det(A)
ans =
1.0000e+80
Matt J
Matt J 2013 年 6 月 27 日
Antigone Commented:
Hi Matt!
Thanks for the answer. I computed rcond(A-λiB) and is equal to 6.3025e-020 for the first eigenvalue. Documentation says that if rcond(X) is near 1, then X is well-conditioned, else if is near EPS, then X is badly conditioned. I think in my case, A-λiB is badly conditioned, right? So I should try to find alternative ways to compute eigenvalues? On the other hand, if I write [V,D]=eig(A,B) and compare A*V with B*V*D (as documentation of eig says), then these two results are very close. Which conclusion is the right one? I'm a bit confused here...
Matt J
Matt J 2013 年 6 月 27 日
編集済み: Matt J 2013 年 6 月 27 日
Hi Antigone. The result 6.3025e-020 is a good one. rcond measures how non-singular a matrix is (a more useful measure than the determinant). This result is telling you that A-λiB is highly singular, which is precisely what you wanted to verify.
Antigoni
Antigoni 2013 年 6 月 27 日
Thanks a lot!!
Matt J
Matt J 2013 年 6 月 27 日
編集済み: Matt J 2013 年 6 月 27 日
No problem, but for future reference, it would have been more appropriate for you to accept-click my Answer (since it helped you) than your own :-)
Antigoni
Antigoni 2013 年 6 月 27 日
Oops! Wrong click I guess. I'm sorry...

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by