zgeev() eigenvalue ordering in Lapack

Open discussion regarding features, bugs, issues, vendors, etc.

zgeev() eigenvalue ordering in Lapack

Postby tirion » Wed Apr 27, 2005 11:42 am

Hi

I'm using zgeev() from LAPACK to solve an eigenvalue/vector problem. However the documentation is not clear on the ordering of the eigenvalues the function outputs. My problem is that I'm solving the system as a function of two parameters, called say 's' and 'r', and I want to look at how the derivatives of one of the eigenvalues changes as a function of 's' and 'r'. this eigenvalue is the one which is zero (null) for s=r= 1 (the details arn't important).

previously I just looked at the eigenvalues for s=r=1, found which one was zero, and looked at the same position in the vector of eigenvalues for other values of 's' and 'r', assuming this corresponded to the same eigenvalue at the corresponding different values of s and r.

However now I have made some changes to my matrix and it appears that the eigenvalue I am trying to keep track of is no longer held in the same position in the vector as I change s and r.... or at least this is my guess as to why my derivatives don't work any more!

I hope this question is clear...


thanks,
Neill
tirion
 
Posts: 4
Joined: Wed Apr 27, 2005 11:35 am

Postby Julien Langou » Wed Apr 27, 2005 12:42 pm

Hello,
the routines xGEEV('N','N',...) returns the eigenvalues of the matrix but there
is no a-priori rule that gives you the order in which the eigenvalues are. You just get all the eigenvalues of your matrix and that's it.
If you ask for the eigenvectors [e.g. xGEEV('N','V',...) ] , the order of the eigenvectors are
the same as the one of the eigenvalues, but once more, there is no a-priori rule that gives you the order in which the eigenvalues are.
So in your case, the null eigenvalue of your matrix can be a-priori anywhere, you need to look for its position in the array of eigenvalues for each different matrix,
Julien Langou
Julien Langou
 
Posts: 734
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby tirion » Thu Apr 28, 2005 5:33 am

Hi,

Thanks for the reply. The problem is the eigenvalue I need is only null for a particular choice of 's' and 'r'. I then want to see how this eigenvalue behaves around this choice, which means changing the parameters and recalculating the eigenvalues... but each time I do this the position of the eigenvalue I want may change?

Neill
tirion
 
Posts: 4
Joined: Wed Apr 27, 2005 11:35 am

Postby Julien Langou » Thu Apr 28, 2005 11:47 am

Hello,
if you are using two different matrices but they are relatively close, there is good chance that your eigenvalue of interest will be located at the same place (the algorithm will do almost the same thing for both matrices). However I would not bet on it in general, and I have no idea what 'relatively close' means.
So, yes the position of the eigenvalue of interest may change.
Julien Langou.
Julien Langou
 
Posts: 734
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby tirion » Thu Apr 28, 2005 1:15 pm

Hey

Yeah, I think you are right. For certain choices of parameters it remains in the same place, for others it definately doesn't.

On the other hand, I could search for the smallest eigenvalue for every choice of 's' and 'r', and that should probably give me the one which is null @ '1'

Thanks for the replies, I think this should sort it.

Neill
tirion
 
Posts: 4
Joined: Wed Apr 27, 2005 11:35 am

Postby tirion » Thu Apr 28, 2005 1:32 pm

Hey

Just a quick follow up. I made the changes, to always check for the smallest eigenvalue, rather than try and track the one which is null etc etc, and it works! no more problems!

Thanks again, this has been annoying me all week.

Neill
tirion
 
Posts: 4
Joined: Wed Apr 27, 2005 11:35 am


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest