1

Given a Matrix, I'm interested in the Eigenvalues and the corresponding Eigenvector.

Using Jama, I can get the Eigenvalues and the Eigenvectors, yet the correlation between the two is not defined: I want to map each Eigenvector to the corresponding Eigenvalue.

Can you please recommend me of a way to do so? I tried to implement it myself but it got nasty.

Thanks :)


I am trying to look for an authorized answer, yet for now, According to experiments and observation I performed, the eigenvectors and evigenValues seem to be corresponding.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Maoritzio
  • 1,142
  • 2
  • 13
  • 31
  • "I can get the Eigenvalues and the Eigenvectors" please show us how you get it. – Nikolay Kuznetsov Dec 20 '12 at 15:01
  • I haven't looked at Jama, but wouldn't it be odd if the order of eigenvalues and eigenvectors it returned didn't match? In other words, are you certain that there's a real problem to be solved here? – NPE Dec 20 '12 at 15:08
  • Thanks Adam for your remark. Nikolay and NPE, I used Jamma API as explained here: http://math.nist.gov/javanumerics/jama/doc/Jama/EigenvalueDecomposition.html And NPE, I agree that it is only reasonable that the order of the eigenvectors and eigenvalue would correspond each other yet it is not mentioned anywhere, So how can I be sure? :) – Maoritzio Dec 22 '12 at 10:34

3 Answers3

1

Usually they are presented in corresponding order. But you can always multiply an eigenvector by the matrix and seeing what multiplier it applies to the vector. That's also your eigenvalue directly.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • First of all thanks for the relevant answer! I also think that there might be a reasonable correlation between the two, yet there's no description of it to assure it. I though about the multification yet I came across a problem: What if the eigenValues have imaginary parts? :) So are they presented in corresponding order always? Thanks again! – Maoritzio Dec 22 '12 at 10:26
  • I can't imagine why an implementation would not present the result in some reasonable order like this. But I suppose it depends on the implementation. Complex eigenvalues are no different here. – Sean Owen Dec 22 '12 at 11:21
1

I asked the developer of the Weka by mail regrading the above issue and they confirm the assumption -

The eigenvectors are indeed provided in the same order as the eigenvalues.

Maoritzio
  • 1,142
  • 2
  • 13
  • 31
0

Use a hashmap to store them? I'm not sure this answer is relevant given the question is a bit vague..

Niklas
  • 409
  • 2
  • 14