Page 1 of 1

ordering of eigenvalues/eigenvectors

PostPosted: Fri Dec 19, 2008 11:50 am
by tjcarroll
Hi all,
I have a question about how eigenvalues are sorted. I'm using DSPEVD to get all of the eigenvalues and eigenvectors of my matrix. My matrix is generated from an input vector (I'm computing a Hamiltonian). I'd like to know how the order of the sorted eigenvalues/eigenvectors corresponds to my original input vector. In other words, can I perform the same re-ordering on my original input vector?

My problem is that I generate the matrix for a variable parameter (a distance in this case) and that changes the relative ordering of the eigenvalues/eigenvectors. Does anyone have a suggestion? (perhaps it's just my thinking that needs to be re-ordered?)

Thanks!
tom

Re: ordering of eigenvalues/eigenvectors

PostPosted: Fri Dec 19, 2008 12:36 pm
by Julien Langou
To get information on a LAPACK routines, the best is to look at the header of the source code.

Look at:
http://www.netlib.org/lapack/explore-html/dspevd.f.html
LINE 60 you read:
Code: Select all
060: *          If INFO = 0, the eigenvalues in ascending order.

which gives you the answer to your question.

Your question is a recurring question on the forum. We do not have a good answer for you.
Technically we can not solve your problem at our level. I assume you want to "follow"
eigenvalues as your parameter changes. LAPACK gives you all the eigenvalues at
each point in time. Now your job is to find "path"s among them.

Best wishes,
Julien.

Re: ordering of eigenvalues/eigenvectors

PostPosted: Wed Jan 07, 2009 12:08 pm
by tjcarroll
Thanks, Julien. It was indeed my thinking that needed some re-ordering! I've got my eigenvectors sorted the way I want.

-tom