Real number λ and vector z are called an eigen pair of matrix A, if Az = λz. For a real matrix A there could be both the problem of finding the eigenvalues and the problem of finding the eigenvalues and eigenvectors. There could also be the problem of finding the eigen pairs which meet given conditions (say, only finding the biggest by absolute value eigenvalues).
If matrix A of size NxN is symmetric, it has N eigenvalues (not necessarily distinctive) and N corresponding eigenvectors which form an orthonormal basis (generally, eigenvectors are not orthogonal, and their number could be lower than N).
This algorithm finds all the eigenvalues (and, if needed, the eigenvectors) of a symmetric tridiagonal matrix. It is also used for finding eigen pairs of an arbitrary symmetric matrix, as each symmetric matrix could be reduced to tridiagonal form by the orthogonal transformation of similarity which doesn't change the matrix eigenvalues.
The SMatrixTDEVD subroutine finds the eigenvalues (and, if needed, the eigenvectors) of a tridiagonal matrix which is given by its main diagonal D and secondary diagonal E.
The ZNeeded parameter controls whether the eigenvectors are required or not. It is possible to get the eigenvectors of a tridiagonal matrix or pass a transformation matrix which reduces the symmetric matrix to tridiagonal form to the algorithm and get the eigenvalues of an original symmetric matrix.
The algorithm is iterative, so, theoretically, it may not converge. In this case, it returns False.
This algorithm is transferred from the LAPACK library.
This article is intended for personal use only.
C++ source. MPFR/GMP is used.
GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.
Python version (CPython and IronPython are supported).
ALGLIB® - numerical analysis library, 1999-2013.