Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm having an issue with the Eigensystem command. I need to diagonalize a bunch of 3 by 3 complex valued matrices, but more importantly, I need to keep the exact ordering of their eigenvalues once brought to their diagonal form.

For example, if

A = { {1.999, 0.000428712*I, 0} , {-0.000428712*I, 2.00072, 0} , {0, 0, -4.00057} }

then Eigensystem[A] returns the three eigenvalues (with their corresponding eigenvectors) listed in order of decreasing magnitude (absolute value).

What is even more annoying is if my loop runs into an already diagonal 3 by 3 matrix such as B = {{2,0,0},{0,-3,0},{0,0,2}}, it will reorder the eigenvalues as {-3,2,2}.

Is there a command that gives me the eigenvalue without re-sorting them?

share|improve this question
    
What is it about your application that requires the order to be maintained? –  rcollyer Jun 4 '12 at 18:43
3  
No, there is no command that returns the eigenvalues in a different order. Can you explain in exactly what order you need to have them? Any order is equally valid, just as any reordering of one diagonal matrix is an equally valid diagonalization. How do you define your preferred order? You're saying "How do I keep the right ordering of eigenvalues?", but you did not explain clearly what you consider to be the "right" order. –  Szabolcs Jun 4 '12 at 18:45
    
This is similar, maybe what you're looking for? –  CHM Jun 4 '12 at 18:55
1  
Let me clarify. All my 3*3 matrices are given WRT an identical, ordered basis set. In my case the ordering matters because it relates to a certain physical system with three energy curves. For example, if B={{2,0,0},{0,-3,0},{0,0,2}} which is already diagonal, then the first eigenvalue 2 will correspond to (x1,y1), the second to (x1,y2) and the third to (x1,y3), where y1, y2 and y3 are three points on three different energy curves (in this case two of my eigenvalues are degenerate). If Eigensystem reorders my eigenvalues it becomes very complicated for me to tell these values apart. –  drg Jun 4 '12 at 19:03
3  
Just a guess, but maybe SchurDecomposition[matrix][[2]] will indicate the eigenvalues in the ordering you want. If so, then it should not be too difficult from there to get the corresponding eigenvectors, as delivered by Eigensystem, into the desired order. –  Daniel Lichtblau Jun 4 '12 at 19:18

1 Answer 1

Just a guess, but maybe SchurDecomposition[matrix][[2]] will indicate the eigenvalues in the ordering you want. If so, then it should not be too difficult from there to get the corresponding eigenvectors, as delivered by Eigensystem, into the desired order.

share|improve this answer

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.