NAG Library Routine Document
F08QKF (DTREVC)
1 Purpose
F08QKF (DTREVC) computes selected left and/or right eigenvectors of a real upper quasi-triangular matrix.
2 Specification
SUBROUTINE F08QKF ( |
JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, MM, M, WORK, INFO) |
INTEGER |
N, LDT, LDVL, LDVR, MM, M, INFO |
REAL (KIND=nag_wp) |
T(LDT,*), VL(LDVL,*), VR(LDVR,*), WORK(3*N) |
LOGICAL |
SELECT(*) |
CHARACTER(1) |
JOB, HOWMNY |
|
The routine may be called by its
LAPACK
name dtrevc.
3 Description
F08QKF (DTREVC) computes left and/or right eigenvectors of a real upper quasi-triangular matrix
in canonical Schur form. Such a matrix arises from the Schur factorization of a real general matrix, as computed by
F08PEF (DHSEQR), for example.
The right eigenvector
, and the left eigenvector
, corresponding to an eigenvalue
, are defined by:
Note that even though
is real,
,
and
may be complex. If
is an eigenvector corresponding to a complex eigenvalue
, then the complex conjugate vector
is the eigenvector corresponding to the complex conjugate eigenvalue
.
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 . Normally is an orthogonal matrix from the Schur factorization of a matrix as ; if is a (left or right) eigenvector of , then is an eigenvector of .
The eigenvectors are computed by forward or backward substitution. They are scaled so that, for a real eigenvector ,
,
and for a complex eigenvector,
.
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
- 1: – CHARACTER(1)Input
-
On entry: indicates whether left and/or right eigenvectors are to be computed.
- Only right eigenvectors are computed.
- Only left eigenvectors are computed.
- Both left and right eigenvectors are computed.
Constraint:
, or .
- 2: – CHARACTER(1)Input
-
On entry: indicates how many eigenvectors are to be computed.
- All eigenvectors (as specified by JOB) are computed.
- All eigenvectors (as specified by JOB) are computed and then pre-multiplied by the matrix (which is overwritten).
- Selected eigenvectors (as specified by JOB and SELECT) are computed.
Constraint:
, or .
- 3: – LOGICAL arrayInput/Output
-
Note: the dimension of the array
SELECT
must be at least
if
, and at least
otherwise.
On entry: specifies which eigenvectors are to be computed if . To obtain the real eigenvector corresponding to the real eigenvalue , must be set .TRUE.. To select the complex eigenvector corresponding to a complex conjugate pair of eigenvalues and , and/or must be set .TRUE.; the eigenvector corresponding to the first eigenvalue in the pair is computed.
On exit: if a complex eigenvector was selected as specified above, then
is set to .TRUE. and
to .FALSE..
If
or
,
SELECT is not referenced.
- 4: – INTEGERInput
-
On entry: , the order of the matrix .
Constraint:
.
- 5: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
T
must be at least
.
On entry: the
by
upper quasi-triangular matrix
in canonical Schur form, as returned by
F08PEF (DHSEQR).
- 6: – INTEGERInput
-
On entry: the first dimension of the array
T as declared in the (sub)program from which F08QKF (DTREVC) is called.
Constraint:
.
- 7: – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
VL
must be at least
if
or
and at least
if
.
On entry: if
and
or
,
VL must contain an
by
matrix
(usually the matrix of Schur vectors returned by
F08PEF (DHSEQR)).
If
or
,
VL need not be set.
On exit: if
or
,
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. Corresponding to each real eigenvalue is a real eigenvector, occupying one column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two columns; the first column holds the real part and the second column holds the imaginary part.
If
,
VL is not referenced.
- 8: – INTEGERInput
-
On entry: the first dimension of the array
VL as declared in the (sub)program from which F08QKF (DTREVC) is called.
Constraints:
- if or , ;
- if , .
- 9: – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
VR
must be at least
if
or
and at least
if
.
On entry: if
and
or
,
VR must contain an
by
matrix
(usually the matrix of Schur vectors returned by
F08PEF (DHSEQR)).
If
or
,
VR need not be set.
On exit: if
or
,
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. Corresponding to each real eigenvalue is a real eigenvector, occupying one column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two columns; the first column holds the real part and the second column holds the imaginary part.
If
,
VR is not referenced.
- 10: – INTEGERInput
-
On entry: the first dimension of the array
VR as declared in the (sub)program from which F08QKF (DTREVC) is called.
Constraints:
- if or , ;
- if , .
- 11: – INTEGERInput
-
On entry: the number of columns in the arrays
VL and/or
VR. The precise number of columns required,
, is
if
or
; if
,
is obtained by counting
for each selected real eigenvector and
for each selected complex eigenvector (see
SELECT), in which case
.
Constraints:
- if or , ;
- otherwise .
- 12: – INTEGEROutput
-
On exit:
, the number of columns of
VL and/or
VR actually used to store the computed eigenvectors. If
or
,
M is set to
.
- 13: – REAL (KIND=nag_wp) arrayWorkspace
-
- 14: – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
On entry, and .
Constraint:
if ,
else , where is obtained by counting for each selected real eigenvector and for each selected complex eigenvector.
7 Accuracy
If
is an exact right eigenvector, and
is the corresponding computed eigenvector, then the angle
between them is bounded as follows:
where
is the reciprocal condition number of
.
The condition number
may be computed by calling
F08QLF (DTRSNA).
8 Parallelism and Performance
F08QKF (DTREVC) is not threaded by NAG in any implementation.
F08QKF (DTREVC) 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.
For a description of canonical Schur form, see the document for
F08PEF (DHSEQR).
The complex analogue of this routine is
F08QXF (ZTREVC).
10 Example
See
Section 10 in F08NHF (DGEBAL).