EVEHF
Computes the largest or smallest eigenvalues and the corresponding eigenvectors of a complex Hermitian matrix.
Required Arguments
NEVEC — Number of eigenvectors to be computed. (Input)
A — Complex Hermitian matrix of order N. (Input)
Only the upper triangle is used.
SMALL — Logical variable. (Input)
If .TRUE., the smallest NEVEC eigenvectors are computed. If .FALSE., the largest NEVEC eigenvectors are computed.
EVAL — Real vector of length N containing the eigenvalues of A in decreasing order of magnitude. (Output)
EVEC — Complex matrix of dimension N by NEVEC. (Output)
The J-th eigenvector corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.
Optional Arguments
N — Order of the matrix A. (Input)
Default: N = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)
Default: LDA = SIZE (A,1).
LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement in the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).
FORTRAN 90 Interface
Generic: CALL EVEHF (NEVEC, A, SMALL, EVAL, EVEC [,])
Specific: The specific interface names are S_EVEHF and D_EVEHF.
FORTRAN 77 Interface
Single: CALL EVEHF (N, NEVEC, A, LDA, SMALL, EVAL, EVEC, LDEVEC)
Double: The double precision name is DEVEHF.
Description
Routine EVEHF computes the largest or smallest eigenvalues and the corresponding eigenvectors of a complex Hermitian matrix. Unitary transformations are used to reduce the matrix to an equivalent real symmetric tridiagonal matrix. The rational QR algorithm with Newton corrections is used to compute the extreme eigenvalues of the tridiagonal matrix. Inverse iteration is used to compute the eigenvectors of the tridiagonal matrix. Eigenvectors of the original matrix are found by back transforming the eigenvectors of the tridiagonal matrix.
The reduction routine is based on the EISPACK routine HTRIDI. The QR routine used is based on the EISPACK routine RATQR. The inverse iteration routine is based on the EISPACK routine TINVIT. The back transformation routine is based on the EISPACK routine HTRIBK. See Smith et al. (1976) for the EISPACK routines.
1. Workspace may be explicitly provided, if desired, by use of E3EHF/DE3EHF. The reference is:
CALL E3EHF (N, NEVEC, A, LDA, SMALL, EVAL, EVEC, LDEVEC, ACOPY, RW1, RW2, CWK, IWK)
The additional arguments are as follows:
ACOPY — Complex work array of length N2. A and ACOPY may be the same, in which case A will be destroyed.
RW1 — Work array of length N * NEVEC. Used to store the real eigenvectors of a symmetric tridiagonal matrix.
RW2 — Work array of length 8N.
CWK — Complex work array of length 2N.
IWK — Work array of length N.
2. Informational errors
Type
Code
Description
3
1
The iteration for an eigenvalue failed to converge. The best estimate will be returned.
3
2
The iteration for an eigenvector failed to converge. The eigenvector will be set to 0.
3
3
The matrix is not Hermitian. It has a diagonal entry with a small imaginary part.
4
2
The matrix is not Hermitian. It has a diagonal entry with an imaginary part.
3. The success of this routine can be checked using EPIHF.
Example
In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 115). The smallest eigenvalue and its corresponding eigenvector is computed and printed. The performance index is also computed and printed. This serves as a check on the computations. For more details, see IMSL routine EPIHF.

USE IMSL_LIBRARIES

IMPLICIT NONE
! Declare variables
INTEGER LDA, LDEVEC, N, NEVEC
PARAMETER (N=3, NEVEC=1, LDA=N, LDEVEC=N)
!
INTEGER NOUT
REAL EVAL(N), PI
COMPLEX A(LDA,N), EVEC(LDEVEC,NEVEC)
LOGICAL SMALL
! Set values of A
!
! A = ( 2 -i 0 )
! ( i 2 0 )
! ( 0 0 3 )
!
DATA A/(2.0,0.0), (0.0,1.0), (0.0,0.0), (0.0,-1.0), (2.0,0.0), &
(0.0,0.0), (0.0,0.0), (0.0,0.0), (3.0,0.0)/
!
! Find smallest eigenvalue and its
! eigenvectors
SMALL = .TRUE.
CALL EVEHF (NEVEC, A, SMALL, EVAL, EVEC)
! Compute performance index
PI = EPIHF(NEVEC,A,EVAL,EVEC)
! Print results
CALL UMACH (2, NOUT)
CALL WRRRN ('EVAL', EVAL, 1, NEVEC, 1)
CALL WRCRN ('EVEC', EVEC)
WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI
END
Output
EVAL
1.000
EVEC
1 ( 0.0000, 0.7071)
2 ( 0.7071, 0.0000)
3 ( 0.0000, 0.0000)

Performance index = 0.031