I am using LAPACK's <strong>ssteqr</strong> function to calculate eigenvalues/eigenvectors. The documentation for ssteqr says that the eigenvalues are sorted <strong>"in ascending order"</strong>. Is it reasonable to assume that the list of eigenvectors is also sorted in ascending order?

### Answer1:

Yes, it is reasonable to assume that the eigenvectors are ordered so that the `i`

-th eigenvector corresponds to the `i`

-th eigenvalue.

Nevertheless, if I were you, I would check for each eigenvalue the result of the multiplication of the eigenvector by the matrix. This way you are sure that you interpret the output right, and you see explicitly the accuracy of the calculations.

### Answer2:

An old question, this, but I struggled with this recently, so am adding this for current and future readers.

The basic answer is that, yes, the eigenvectors are sorted such that the *i*th eigenvector corresponds to the *i*th eigenvalue. However, note that the eigenvectors thus obtained may not be the *actual* eigenvectors you want. This is so because of the following.

Since the ?steqr functions work only on tridiagonal matrices, one typically uses LAPACK's ?sytrd functions to first transform one's original symmetric matrix, call it *M*, to a tridiagonal form, call it *T*, such that *M = QTQ*<sup>T</sup> where *Q* is an orthogonal matrix (and *Q*<sup>T</sup> denotes its transpose). One then applies the ?steqr function on this tridiagonal matrix *T* to find its eigenvalues and eigenvectors. Now the eigenvalues thus obtained (of *T*) are exactly the same as the eigenvalues of *M*, so if one only wants the eigenvalues one can stop here. But if one is interested in the eigenvectors, like the OP, then one needs to bear in mind that the eigenvectors of *T* and *M* are different. To find the eigenvectors of the original matrix *M*, one needs to left-multiply the obtained eigenvectors of *T* by *Q*. This is very easily done by using the LAPACK functions orgtr or ormtr. See here for a clear explanation: https://software.intel.com/en-us/mkl-developer-reference-fortran-sytrd.