F08JCF (DSTEVD) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix.
If the eigenvectors are requested, then it uses a divide-and-conquer algorithm to compute eigenvalues and eigenvectors. However, if only eigenvalues are required, then it uses the Pal–Walker–Kahan variant of the or algorithm.
SUBROUTINE F08JCF ( |
JOB, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO) |
INTEGER |
N, LDZ, LWORK, IWORK(max(1,LIWORK)), LIWORK, INFO |
REAL (KIND=nag_wp) |
D(*), E(*), Z(LDZ,*), WORK(max(1,LWORK)) |
CHARACTER(1) |
JOB |
|
F08JCF (DSTEVD) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix
.
In other words, it can compute the spectral factorization of
as
where
is a diagonal matrix whose diagonal elements are the eigenvalues
, and
is the orthogonal matrix whose columns are the eigenvectors
. Thus
The computed eigenvalues and eigenvectors are exact for a nearby matrix
, where
and
is the
machine precision.
If
is an exact eigenvalue and
is the corresponding computed value, then
where
is a modestly increasing function of
.
If
is the corresponding exact eigenvector, and
is the corresponding computed eigenvector, then the angle
between them is bounded as follows:
Thus the accuracy of a computed eigenvector depends on the gap between its eigenvalue and all the other eigenvalues.
There is no complex analogue of this routine.
This example computes all the eigenvalues and eigenvectors of the symmetric tridiagonal matrix
, where