RATQR(3)

SYNOPSIS
SUBROUTINE RATQR (N, EPS1, D, E, E2, M, W, IND, BD, TYPE, IDEF, + IERR)

NAME
ratqr - Compute the largest or smallest eigenvalues of a symmetric tridiagonal matrix using the rational QR method with Newton correction.

LIBRARY
SLATEC (EISPACK)

CATEGORY
D4A5, D4C2A

TYPE
SINGLE PRECISION (RATQR-S)

KEYWORDS
EIGENVALUES, EIGENVECTORS, EISPACK

AUTHOR
Smith, B. T., et al.

DESCRIPTION
This subroutine is a translation of the ALGOL procedure RATQR, NUM. MATH. 11, 264-272(1968) by REINSCH and BAUER. HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 257-265(1971). This subroutine finds the algebraically smallest or largest eigenvalues of a SYMMETRIC TRIDIAGONAL matrix by the rational QR method with Newton corrections. On Input N is the order of the matrix. N is an INTEGER variable. EPS1 is a theoretical absolute error tolerance for the computed eigenvalues. If the input EPS1 is non-positive, or indeed smaller than its default value, it is reset at each iteration to the respective default value, namely, the product of the relative machine precision and the magnitude of the current eigenvalue iterate. The theoretical absolute error in the K-th eigenvalue is usually not greater than K times EPS1. EPS1 is a REAL variable. D contains the diagonal elements of the symmetric tridiagonal matrix. D is a one-dimensional REAL array, dimensioned D(N). E contains the subdiagonal elements of the symmetric tridiagonal matrix in its last N-1 positions. E(1) is arbitrary. E is a one-dimensional REAL array, dimensioned E(N). E2 contains the squares of the corresponding elements of E in its last N-1 positions. E2(1) is arbitrary. E2 is a one- dimensional REAL array, dimensioned E2(N). M is the number of eigenvalues to be found. M is an INTEGER variable. IDEF should be set to 1 if the input matrix is known to be positive definite, to -1 if the input matrix is known to be negative definite, and to 0 otherwise. IDEF is an INTEGER variable. TYPE should be set to .TRUE. if the smallest eigenvalues are to be found, and to .FALSE. if the largest eigenvalues are to be found. TYPE is a LOGICAL variable. On Output EPS1 is unaltered unless it has been reset to its (last) default value. D and E are unaltered (unless W overwrites D). Elements of E2, corresponding to elements of E regarded as negligible, have been replaced by zero causing the matrix to split into a direct sum of submatrices. E2(1) is set to 0.0e0 if the smallest eigenvalues have been found, and to 2.0e0 if the largest eigenvalues have been found. E2 is otherwise unaltered (unless overwritten by BD). W contains the M algebraically smallest eigenvalues in ascending order, or the M largest eigenvalues in descending order. If an error exit is made because of an incorrect specification of IDEF, no eigenvalues are found. If the Newton iterates for a particular eigenvalue are not monotone, the best estimate obtained is returned and IERR is set. W is a one-dimensional REAL array, dimensioned W(N). W need not be distinct from D. IND contains in its first M positions the submatrix indices associated with the corresponding eigenvalues in W -- 1 for eigenvalues belonging to the first submatrix from the top, 2 for those belonging to the second submatrix, etc. IND is an one-dimensional INTEGER array, dimensioned IND(N). BD contains refined bounds for the theoretical errors of the corresponding eigenvalues in W. These bounds are usually within the tolerance specified by EPS1. BD is a one- dimensional REAL array, dimensioned BD(N). BD need not be distinct from E2. IERR is an INTEGER flag set to Zero for normal return, 6*N+1 if IDEF is set to 1 and TYPE to .TRUE. when the matrix is NOT positive definite, or if IDEF is set to -1 and TYPE to .FALSE. when the matrix is NOT negative definite, no eigenvalues are computed, or M is greater than N, 5*N+K if successive iterates to the K-th eigenvalue are NOT monotone increasing, where K refers to the last such occurrence. Note that subroutine TRIDIB is generally faster and more accurate than RATQR if the eigenvalues are clustered. Questions and comments should be directed to B. S. Garbow, APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY ------------------------------------------------------------------

REFERENCES
B. T. Smith, J. M. Boyle, J. J. Dongarra, B. S. Garbow, Y. Ikebe, V. C. Klema and C. B. Moler, Matrix Eigen- system Routines - EISPACK Guide, Springer-Verlag, 1976.

ROUTINES CALLED
R1MACH

REVISION HISTORY (YYMMDD)
760101 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890831 Modified array declarations. (WRB)
890831 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
920501 Reformatted the REFERENCES section. (WRB)