procedure uses the
QL algorithm with implicit shifts to determine the
eigenvectors of a real,
tridiagonal array. The routine TRIRED can be used to reduce a real, symmetric array to the tridiagonal form suitable for input to this procedure.
TRIQL is based on the routine
described in section 11.3 of
Numerical Recipes in C: The Art of Scientific Computing
(Second Edition), published by Cambridge University Press, and is used by permission.
D, E, A
On input, this argument should be an
-element vector containing the diagonal elements of the array being analyzed. On output,
contains the eigenvalues.
-element vector containing the off-diagonal elements of the array.
is arbitrary. On output, this parameter is destroyed.
A named variable that returns the
If the eigenvectors of a tridiagonal array are desired,
should be input as an identity array. If the eigenvectors of an array that has been reduced by TRIRED are desired,
is input as the array
output by TRIRED.
Set this keyword to force the computation to be done in double-precision arithmetic.
To compute eigenvalues and eigenvectors of a real, symmetric, tridiagonal array, begin with an array A representing a symmetric array.
A = [[ 3.0, 1.0, -4.0], $
[ 1.0, 3.0, -4.0], $
[-4.0, -4.0, 8.0]]
TRIRED, A, D, E
Compute the eigenvalues (returned in vector D) and the eigenvectors (returned in the rows of the array A):
TRIQL, D, E, A
2.00000 4.76837e-7 12.0000
The exact values are:
[2.0, 0.0, 12.0]
0.707107 -0.707107 0.00000
-0.577350 -0.577350 -0.577350
-0.408248 -0.408248 0.816497
The exact eigenvectors are:
[ 1.0/sqrt(2.0), -1.0/sqrt(2.0), 0.0/sqrt(2.0)],
[-1.0/sqrt(3.0), -1.0/sqrt(3.0), -1.0/sqrt(3.0)],
[-1.0/sqrt(6.0), -1.0/sqrt(6.0), 2.0/sqrt(6.0)