NAG Library Routine Document

f08qkf (dtrevc)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

f08qkf (dtrevc) computes selected left and/or right eigenvectors of a real upper quasi-triangular matrix.

2
Specification

Fortran Interface
Subroutine f08qkf ( job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, mm, m, work, info)
Integer, Intent (In):: n, ldt, ldvl, ldvr, mm
Integer, Intent (Out):: m, info
Real (Kind=nag_wp), Intent (In):: t(ldt,*)
Real (Kind=nag_wp), Intent (Inout):: vl(ldvl,*), vr(ldvr,*)
Real (Kind=nag_wp), Intent (Out):: work(3*n)
Logical, Intent (Inout):: select(*)
Character (1), Intent (In):: job, howmny
C Header Interface
#include nagmk26.h
void  f08qkf_ (const char *job, const char *howmny, logical sel[], const Integer *n, const double t[], const Integer *ldt, double vl[], const Integer *ldvl, double vr[], const Integer *ldvr, const Integer *mm, Integer *m, double work[], Integer *info, const Charlen length_job, const Charlen length_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 T 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 x, and the left eigenvector y, corresponding to an eigenvalue λ, are defined by:
Tx = λx   and   yHT = λyH or ​ TTy = λ-y .  
Note that even though T is real, λ, x and y may be complex. If x is an eigenvector corresponding to a complex eigenvalue λ, then the complex conjugate vector x- 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 Q. Normally Q is an orthogonal matrix from the Schur factorization of a matrix A as A=QTQT; 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, for a real eigenvector x, maxxi=1, and for a complex eigenvector, max Re xi + Im xi =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/Output
Note: the dimension of the array select must be at least max1,n if howmny='S', and at least 1 otherwise.
On entry: specifies which eigenvectors are to be computed if howmny='S'. To obtain the real eigenvector corresponding to the real eigenvalue λj, selectj must be set .TRUE.. To select the complex eigenvector corresponding to a complex conjugate pair of eigenvalues λj and λj+1, selectj and/or selectj+1 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, selectj is set to .TRUE. and selectj+1 to .FALSE..
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* – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array t must be at least max1,n.
On entry: the n by n upper quasi-triangular matrix T in canonical Schur form, as returned by f08pef (dhseqr).
6:     ldt – IntegerInput
On entry: the first dimension of the array t as declared in the (sub)program from which f08qkf (dtrevc) is called.
Constraint: ldt max1,n .
7:     vlldvl* – Real (Kind=nag_wp) arrayInput/Output
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 howmny='B' and job='L' or 'B', vl must contain an n by n matrix Q (usually the matrix of Schur vectors returned by f08pef (dhseqr)).
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. 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 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 f08qkf (dtrevc) is called.
Constraints:
  • if job='L' or 'B', ldvln;
  • if job='R', ldvl1.
9:     vrldvr* – Real (Kind=nag_wp) arrayInput/Output
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 howmny='B' and job='R' or 'B', vr must contain an n by n matrix Q (usually the matrix of Schur vectors returned by f08pef (dhseqr)).
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. 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 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 f08qkf (dtrevc) 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 obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector (see select), in which case 0mn.
Constraints:
  • if howmny='A' or 'B', mmn;
  • otherwise mmm.
12:   m – IntegerOutput
On exit: m, the number of columns of vl and/or vr actually used to store the computed eigenvectors. If howmny='A' or 'B', m is set to n.
13:   work3×n – Real (Kind=nag_wp) arrayWorkspace
14:   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.
info=-11
On entry, mm=value and n=value.
Constraint: if howmny'S', mmn
else mmm, where m is obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector.

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 f08qlf (dtrsna).

8
Parallelism and Performance

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.

9
Further Comments

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).
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017