F08QXF (ZTREVC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08QXF (ZTREVC)

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.

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1  Purpose

F08QXF (ZTREVC) computes selected left and/or right eigenvectors of a complex upper triangular matrix.

2  Specification

SUBROUTINE F08QXF ( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO)
INTEGER  N, LDT, LDVL, LDVR, MM, M, INFO
REAL (KIND=nag_wp)  RWORK(N)
COMPLEX (KIND=nag_wp)  T(LDT,*), VL(LDVL,*), VR(LDVR,*), WORK(2*N)
LOGICAL  SELECT(*)
CHARACTER(1)  JOB, HOWMNY
The routine may be called by its LAPACK name ztrevc.

3  Description

F08QXF (ZTREVC) computes left and/or right eigenvectors of a complex upper triangular matrix T. Such a matrix arises from the Schur factorization of a complex general matrix, as computed by F08PSF (ZHSEQR), for example.
The right eigenvector x, and the left eigenvector y, corresponding to an eigenvalue λ, are defined by:
Tx = λx   and   yHT = λyH or ​ THy = λ-y .  
The routine can compute the eigenvectors corresponding to selected eigenvalues, or it can compute all the eigenvectors. In the latter case the eigenvectors may optionally be pre-multiplied by an input matrix Q. Normally Q is a unitary matrix from the Schur factorization of a matrix A as A=QTQH; if x is a (left or right) eigenvector of T, then Qx is an eigenvector of A.
The eigenvectors are computed by forward or backward substitution. They are scaled so that max Rexi + Imxi =1.

4  References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

5  Arguments

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:     HOWMNY – CHARACTER(1)Input
On entry: indicates how many eigenvectors are to be computed.
HOWMNY='A'
All eigenvectors (as specified by JOB) are computed.
HOWMNY='B'
All eigenvectors (as specified by JOB) are computed and then pre-multiplied by the matrix Q (which is overwritten).
HOWMNY='S'
Selected eigenvectors (as specified by JOB and SELECT) are computed.
Constraint: HOWMNY='A', 'B' or 'S'.
3:     SELECT* – LOGICAL arrayInput
Note: the dimension of the array SELECT must be at least N if HOWMNY='S', and at least 1 otherwise.
On entry: specifies which eigenvectors are to be computed if HOWMNY='S'. To obtain the eigenvector corresponding to the eigenvalue λj, SELECTj must be set .TRUE..
If HOWMNY='A' or 'B', SELECT is not referenced.
4:     N – INTEGERInput
On entry: n, the order of the matrix T.
Constraint: N0.
5:     TLDT* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array T must be at least N.
On entry: the n by n upper triangular matrix T, as returned by F08PSF (ZHSEQR).
On exit: is used as internal workspace prior to being restored and hence is unchanged.
6:     LDT – INTEGERInput
On entry: the first dimension of the array T as declared in the (sub)program from which F08QXF (ZTREVC) is called.
Constraint: LDT max1,N .
7:     VLLDVL* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array VL must be at least MM if JOB='L' or 'B' and at least 1 if JOB='R'.
On entry: if HOWMNY='B' and JOB='L' or 'B', VL must contain an n by n matrix Q (usually the matrix of Schur vectors returned by F08PSF (ZHSEQR)).
If HOWMNY='A' or 'S', VL need not be set.
On exit: if JOB='L' or 'B', VL contains the computed left eigenvectors (as specified by HOWMNY and SELECT). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
If JOB='R', VL is not referenced.
8:     LDVL – INTEGERInput
On entry: the first dimension of the array VL as declared in the (sub)program from which F08QXF (ZTREVC) is called.
Constraints:
  • if JOB='L' or 'B', LDVLN;
  • if JOB='R', LDVL1.
9:     VRLDVR* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array VR must be at least MM if JOB='R' or 'B' and at least 1 if JOB='L'.
On entry: if HOWMNY='B' and JOB='R' or 'B', VR must contain an n by n matrix Q (usually the matrix of Schur vectors returned by F08PSF (ZHSEQR)).
If HOWMNY='A' or 'S', VR need not be set.
On exit: if JOB='R' or 'B', VR contains the computed right eigenvectors (as specified by HOWMNY and SELECT). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
If JOB='L', VR is not referenced.
10:   LDVR – INTEGERInput
On entry: the first dimension of the array VR as declared in the (sub)program from which F08QXF (ZTREVC) is called.
Constraints:
  • if JOB='R' or 'B', LDVRN;
  • if JOB='L', LDVR1.
11:   MM – INTEGERInput
On entry: the number of columns in the arrays VL and/or VR. The precise number of columns required, m, is n if HOWMNY='A' or 'B'; if HOWMNY='S', m is the number of selected eigenvectors (see SELECT), in which case 0mn.
Constraints:
  • if HOWMNY='A' or 'B', MMN;
  • otherwise MMm.
12:   M – INTEGEROutput
On exit: m, the number of selected eigenvectors. If HOWMNY='A' or 'B', M is set to n.
13:   WORK2×N – COMPLEX (KIND=nag_wp) arrayWorkspace
14:   RWORKN – REAL (KIND=nag_wp) arrayWorkspace
15:   INFO – INTEGEROutput
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.

7  Accuracy

If xi is an exact right eigenvector, and x~i is the corresponding computed eigenvector, then the angle θx~i,xi between them is bounded as follows:
θ x~i,xi c n ε T2 sepi  
where sepi is the reciprocal condition number of xi.
The condition number sepi may be computed by calling F08QYF (ZTRSNA).

8  Parallelism and Performance

F08QXF (ZTREVC) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

The real analogue of this routine is F08QKF (DTREVC).

10  Example

See Section 10 in F08NVF (ZGEBAL).

F08QXF (ZTREVC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2016