# Same eigenvalues, different eigenvectors but orthogonal

I am using a two different computational libraries to calculate the eigenvectors and eigenvalues of a symmetric matrix. The results show that the eigenvalues calculated with both libraries are exactly the same, however, the eigenvectors differ. Nevertheless, both seem to be correct since their eigenvectors are orthogonal and the factorization is also correct. How can that be possible? I asked the developers and although they seemed confused, they said that "probably" has to do with the directions of the vectors.

If it is possible, is there a kind of margin error between those two different range of eigenvectors so I could compare them and make sure they are in range (they are right)?

• The eigenvalues must be the same, not the eigenvectors. For instance, $I_2$ has $(1,0)$ and $(0,1)$ as natural basis of eigenvectors. But $(1,1)$ and $(1,-1)$ is also a basis of eigenvectors for $I_2$. – Julien May 16 '13 at 13:40
• Have you ruled out that the dimension of the eigenspace is more than 1? – abnry May 16 '13 at 13:40
• @vadim123 A dimension one space too has many possible bases. – Julien May 16 '13 at 13:42
• If the developers themselves don't know, it is unlikely that anybody else will know how they designed their algorithm. – Julien May 16 '13 at 13:47
• @Manolete Probably because they're using slightly different algorithms to compute them... Without looking at the algorithms closely, it's impossible to say where exactly the difference lies, though. It's also rather irrelevant, the important thing to take away from this is that the eigenvectors are not uniquely determined by the matrix. – fgp May 16 '13 at 13:56

If $v$ is an eigenvector for $\lambda$, then so is $\alpha v$ for every $\alpha$ in your field $F$. It is not alarming to have different eigenvectors for a single eigenvalue.
It is also not alarming to have linearly independent eigenvectors with the same eigenvalue. In fact, since your matrix is symmetric, it is diagonalizable, and so an eigenvalue of multiplicity $n$ must have $n$ linearly independent eigenvectors for that eigenvalue.