Note: before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.
F08PXF (ZHSEIN) computes selected left and/or right eigenvectors of a complex upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.
N, LDH, LDVL, LDVR, MM, M, IFAILL(*), IFAILR(*), INFO
REAL (KIND=nag_wp)
RWORK(N)
COMPLEX (KIND=nag_wp)
H(LDH,*), W(*), VL(LDVL,*), VR(LDVR,*), WORK(N*N)
LOGICAL
SELECT(*)
CHARACTER(1)
JOB, EIGSRC, INITV
The routine may be called by its
LAPACK
name zhsein.
3 Description
F08PXF (ZHSEIN) computes left and/or right eigenvectors of a complex upper Hessenberg matrix H, corresponding to selected eigenvalues.
The right eigenvector x, and the left eigenvector y, corresponding to an eigenvalue λ, are defined by:
Hx=λx and yHH=λyH or HHy=λ-y.
The eigenvectors are computed by inverse iteration. They are scaled so that
maxRexi+Imxi=1.
If H has been formed by reduction of a complex general matrix A to upper Hessenberg form, then the eigenvectors of H may be transformed to eigenvectors of A by a call to F08NUF (ZUNMHR).
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
1: JOB – CHARACTER(1)Input
On entry: indicates whether left and/or right eigenvectors are to be computed.
JOB='R'
Only right eigenvectors are computed.
JOB='L'
Only left eigenvectors are computed.
JOB='B'
Both left and right eigenvectors are computed.
Constraint:
JOB='R', 'L' or 'B'.
2: EIGSRC – CHARACTER(1)Input
On entry: indicates whether the eigenvalues of H (stored in W) were found using F08PSF (ZHSEQR).
EIGSRC='Q'
The eigenvalues of H were found using F08PSF (ZHSEQR); thus if H has any zero subdiagonal elements (and so is block triangular), then the jth eigenvalue can be assumed to be an eigenvalue of the block containing the jth row/column. This property allows the routine to perform inverse iteration on just one diagonal block.
EIGSRC='N'
No such assumption is made and the routine performs inverse iteration using the whole matrix.
Constraint:
EIGSRC='Q' or 'N'.
3: INITV – CHARACTER(1)Input
On entry: indicates whether you are supplying initial estimates for the selected eigenvectors.
Note: the dimension of the array SELECT
must be at least
max1,N.
On entry: specifies which eigenvectors are to be computed. To select the eigenvector corresponding to the eigenvalue Wj, SELECTj must be set to .TRUE..
Note: the second dimension of the array VL
must be at least
max1,MM if JOB='L' or 'B' and at least 1 if JOB='R'.
On entry: if INITV='U' and JOB='L' or 'B', VL must contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector (see below).
On exit: if JOB='L' or 'B', VL contains the computed left eigenvectors (as specified by SELECT). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
Note: the second dimension of the array VR
must be at least
max1,MM if JOB='R' or 'B' and at least 1 if JOB='L'.
On entry: if INITV='U' and JOB='R' or 'B', VR must contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector (see below).
On exit: if JOB='R' or 'B', VR contains the computed right eigenvectors (as specified by SELECT). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
On entry: the first dimension of the array VR as declared in the (sub)program from which F08PXF (ZHSEIN) is called.
Constraints:
if JOB='R' or 'B', LDVR≥max1,N;
if JOB='L', LDVR≥1.
13: MM – INTEGERInput
On entry: the number of columns in the arrays VL and/or VR . The actual number of columns required, m, is obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector (see SELECT); 0≤m≤n.
Note: the dimension of the array IFAILL
must be at least
max1,MM if JOB='L' or 'B' and at least 1 if JOB='R'.
On exit: if JOB='L' or 'B', then IFAILLi=0 if the selected left eigenvector converged and IFAILLi=j>0 if the eigenvector stored in the ith row or column of VL (corresponding to the jth eigenvalue) failed to converge.
Note: the dimension of the array IFAILR
must be at least
max1,MM if JOB='R' or 'B' and at least 1 if JOB='L'.
On exit: if JOB='R' or 'B', then IFAILRi=0 if the selected right eigenvector converged and IFAILRi=j>0 if the eigenvector stored in the ith column of VR (corresponding to the jth eigenvalue) failed to converge.
On exit: INFO=0 unless the routine detects an error (see Section 6).
6 Error Indicators and Warnings
INFO<0
If INFO=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
INFO>0
If INFO=i, then i eigenvectors (as indicated by the parameters IFAILL and/or IFAILR above) failed to converge. The corresponding columns of VL and/or VR contain no useful information.
7 Accuracy
Each computed right eigenvector xi is the exact eigenvector of a nearby matrix A+Ei, such that Ei=OεA. Hence the residual is small:
Axi-λixi=OεA.
However, eigenvectors corresponding to close or coincident eigenvalues may not accurately span the relevant subspaces.
Similar remarks apply to computed left eigenvectors.