What's the difference between eig(A,B) and eig(A/B)

Hi all,
I'm solving a generalized eigenvalue problem Ax=lambda Bx. I can either do eig(A,B) or eig(A/B). The eigenvalues are slightly different obtained from these two methods, and the eigenvectors are totally different. It seems obviously that eig(A/B) can't get the eigenvector correct (since I enforced some boundary conditions in A and B, for eig(A,B) the resultant eigenvectors have the correct boundary conditions, while eig(A/B) doesn't). Do you know why this is the case? Thanks.

2 commentaires

Why don't you print out A/B to the command line? I think you'll see the reason.
Mengqi
Mengqi le 28 Mar 2015
Why? Sorry, I don't understand. Could you be more specific?

Connectez-vous pour commenter.

Réponses (1)

Matt J
Matt J le 29 Mar 2015
Modifié(e) : Matt J le 29 Mar 2015
The results of eig(A,B) and eig(A/B) can only have any kind of equivalence if B is non-singular, as far as I can see.
Assuming this is true, the eigenvalue results will differ between the two slightly because of floating point precision issues. The eigenvectors will differ by a transformation v=c*B\u where v is an eigenvector from eig(A,B), u is an eigenvector from eig(A/B), and c is an arbitrary complex scalar.
You can test this using the following code. You will see that V1 and V2 contain the same eigenvectors, though perhaps not in the same order,
A=rand(3); B=rand(3);
[V,~]=eig(A,B);
[U,~]=eig(A/B);
V1=bsxfun(@rdivide,V,V(1,:));
V2=(B\U);
V2=bsxfun(@rdivide,V2,V2(1,:));

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Tags

Question posée :

le 28 Mar 2015

Modifié(e) :

le 29 Mar 2015

Community Treasure Hunt

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

Start Hunting!

Translated by