Ordering of eigenvectors when calculating eigenvectors using LAPACK's ssteqr

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?


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.


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 ith eigenvector corresponds to the ith 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.


  • Nearest next even hour
  • FILE* in C++ not reading entire file
  • How to solve this “does not live long enough”?
  • matplotlib autoscale axes to include annotations
  • Auto-Stop a YouTube Live Event if encoder crashes
  • How to make doubles work properly? c#
  • MySQL: Optimizing Searches with LIKE or FULLTEXT
  • Multiplying two lists in prolog
  • Why are there no operator overloads in SceneKit?
  • Julia : BLAS.gemm!() parameters
  • How to create a waiting page in Django
  • Why is the 100*0.07 equal to 6.9999…? [duplicate]
  • Change Image() object dimensions (width and height)
  • Matlab code optimization and removing loops [closed]
  • Range Multiplication VB.NET (What is wrong with this code?)
  • python function to set accuracy of float
  • how to use asyncio with boost.python?
  • ValueError: Found arrays with inconsistent numbers of samples
  • 3D Math: Calculate Bank (Roll) angle from Look and Up orthogonal vectors
  • Pointer vs Reference difference when passing Eigen objects as arguments
  • Not able to display correct data in table -AngularJS
  • pandas computation in each group
  • In C what exactly happens if i use () to initialize a double dimension array instead of the {}?
  • Symfony 2 error page response
  • Which open source license has no forking [closed]
  • How to explicitly/implicitly implemented interface members in C++/CLI?
  • quiver not drawing arrows just lots of blue, matlab
  • Android Activity.onWindowFocusChanged doesn't get called from within TabHost
  • Content-Length header not returned from Pylons response
  • Ajax Loaded meta Tags
  • Xamarin Forms - UWP Fonts
  • Modifying destination and filename of gulp-svg-sprite
  • Deserializing XML into class C#
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • How do I use the BLAS library provided by MATLAB?
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • php design question - will a Helper help here?
  • Arrays break string types in Julia
  • python draw pie shapes with colour filled
  • How to Embed XSL into XML