NAG Library Routine Document
F08YKF (DTGEVC)
1 Purpose
F08YKF (DTGEVC) computes some or all of the right and/or left generalized eigenvectors of a pair of real matrices which are in generalized real Schur form.
2 Specification
SUBROUTINE F08YKF ( |
SIDE, HOWMNY, SELECT, N, A, LDA, B, LDB, VL, LDVL, VR, LDVR, MM, M, WORK, INFO) |
INTEGER |
N, LDA, LDB, LDVL, LDVR, MM, M, INFO |
REAL (KIND=nag_wp) |
A(LDA,*), B(LDB,*), VL(LDVL,*), VR(LDVR,*), WORK(6*N) |
LOGICAL |
SELECT(*) |
CHARACTER(1) |
SIDE, HOWMNY |
|
The routine may be called by its
LAPACK
name dtgevc.
3 Description
F08YKF (DTGEVC) computes some or all of the right and/or left generalized eigenvectors of the matrix pair
which is assumed to be in generalized upper Schur form. If the matrix pair
is not in the generalized upper Schur form, then
F08XEF (DHGEQZ) should be called before invoking F08YKF (DTGEVC).
The right generalized eigenvector
and the left generalized eigenvector
of
corresponding to a generalized eigenvalue
are defined by
and
If a generalized eigenvalue is determined as
, which is due to zero diagonal elements at the same locations in both
and
, a unit vector is returned as the corresponding eigenvector.
Note that the generalized eigenvalues are computed using
F08XEF (DHGEQZ) but F08YKF (DTGEVC) does not explicitly require the generalized eigenvalues to compute eigenvectors. The ordering of the eigenvectors is based on the ordering of the eigenvalues as computed by F08YKF (DTGEVC).
If all eigenvectors are requested, the routine may either return the matrices
and/or
of right or left eigenvectors of
, or the products
and/or
, where
and
are two matrices supplied by you. Usually,
and
are chosen as the orthogonal matrices returned by
F08XEF (DHGEQZ). Equivalently,
and
are the left and right Schur vectors of the matrix pair supplied to
F08XEF (DHGEQZ). In that case,
and
are the left and right generalized eigenvectors, respectively, of the matrix pair supplied to
F08XEF (DHGEQZ).
must be block upper triangular; with by and by diagonal blocks. Corresponding to each by diagonal block is a complex conjugate pair of eigenvalues and eigenvectors; only one eigenvector of the pair is computed, namely the one corresponding to the eigenvalue with positive imaginary part. Each by block gives a real generalized eigenvalue and a corresponding eigenvector.
4 References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
Stewart G W and Sun J-G (1990) Matrix Perturbation Theory Academic Press, London
5 Parameters
- 1: – CHARACTER(1)Input
-
On entry: specifies the required sets of generalized eigenvectors.
- 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: specifies further details of the required generalized eigenvectors.
- All right and/or left eigenvectors are computed.
- All right and/or left eigenvectors are computed; they are backtransformed using the input matrices supplied in arrays VR and/or VL.
- Selected right and/or left eigenvectors, defined by the array SELECT, are computed.
Constraint:
, or .
- 3: – LOGICAL arrayInput
-
Note: the dimension of the array
SELECT
must be at least
if
, and at least
otherwise.
On entry: specifies the eigenvectors to be computed if
. To select the generalized eigenvector corresponding to the
th generalized eigenvalue, the
th element of
SELECT should be set to .TRUE.; if the eigenvalue corresponds to a complex conjugate pair, then real and imaginary parts of eigenvectors corresponding to the complex conjugate eigenvalue pair will be computed.
If
or
,
SELECT is not referenced.
Constraint:
if , or , for .
- 4: – INTEGERInput
-
On entry: , the order of the matrices and .
Constraint:
.
- 5: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
A
must be at least
.
On entry: the matrix pair
must be in the generalized Schur form. Usually, this is the matrix
returned by
F08XEF (DHGEQZ).
- 6: – INTEGERInput
-
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YKF (DTGEVC) is called.
Constraint:
.
- 7: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
B
must be at least
.
On entry: the matrix pair
must be in the generalized Schur form. If
has a
by
diagonal block then the corresponding
by
block of
must be diagonal with positive elements. Usually, this is the matrix
returned by
F08XEF (DHGEQZ).
- 8: – INTEGERInput
-
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YKF (DTGEVC) is called.
Constraint:
.
- 9: – 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 be initialized to an
by
matrix
. Usually, this is the orthogonal matrix
of left Schur vectors returned by
F08XEF (DHGEQZ).
On exit: if
or
,
VL contains:
- if , the matrix of left eigenvectors of ;
- if , the matrix ;
- if , the left eigenvectors of specified by SELECT, stored consecutively in the columns of the array VL, in the same order as their corresponding eigenvalues.
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part.
If
,
VL is not referenced.
- 10: – INTEGERInput
-
On entry: the first dimension of the array
VL as declared in the (sub)program from which F08YKF (DTGEVC) is called.
Constraints:
- if or , ;
- if , .
- 11: – 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 be initialized to an
by
matrix
. Usually, this is the orthogonal matrix
of right Schur vectors returned by
F08XEF (DHGEQZ).
On exit: if
or
,
VR contains:
- if , the matrix of right eigenvectors of ;
- if , the matrix ;
- if , the right eigenvectors of specified by SELECT, stored consecutively in the columns of the array VR, in the same order as their corresponding eigenvalues.
A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive columns, the first holding the real part, and the second the imaginary part.
If
,
VR is not referenced.
- 12: – INTEGERInput
-
On entry: the first dimension of the array
VR as declared in the (sub)program from which F08YKF (DTGEVC) is called.
Constraints:
- if or , ;
- if , .
- 13: – INTEGERInput
-
On entry: the number of columns in the arrays
VL and/or
VR.
Constraints:
- if or , ;
- if , MM must not be less than the number of requested eigenvectors.
- 14: – INTEGEROutput
-
On exit: the number of columns in the arrays
VL and/or
VR actually used to store the eigenvectors. If
or
,
M is set to
N. Each selected real eigenvector occupies one column and each selected complex eigenvector occupies two columns.
- 15: – REAL (KIND=nag_wp) arrayWorkspace
-
- 16: – 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.
-
If , the by block does not have complex eigenvalues.
7 Accuracy
It is beyond the scope of this manual to summarise the accuracy of the solution of the generalized eigenvalue problem. Interested readers should consult Section 4.11 of the LAPACK Users' Guide (see
Anderson et al. (1999)) and Chapter 6 of
Stewart and Sun (1990).
8 Parallelism and Performance
F08YKF (DTGEVC) is not threaded by NAG in any implementation.
F08YKF (DTGEVC) 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.
F08YKF (DTGEVC) is the sixth step in the solution of the real generalized eigenvalue problem and is called after
F08XEF (DHGEQZ).
The complex analogue of this routine is
F08YXF (ZTGEVC).
10 Example
This example computes the
and
parameters, which defines the generalized eigenvalues and the corresponding left and right eigenvectors, of the matrix pair
given by
To compute generalized eigenvalues, it is required to call five routines:
F08WHF (DGGBAL) to balance the matrix,
F08AEF (DGEQRF) to perform the
factorization of
,
F08AGF (DORMQR) to apply
to
,
F08WEF (DGGHRD) to reduce the matrix pair to the generalized Hessenberg form and
F08XEF (DHGEQZ) to compute the eigenvalues via the
algorithm.
The computation of generalized eigenvectors is done by calling F08YKF (DTGEVC) to compute the eigenvectors of the balanced matrix pair. The routine
F08WJF (DGGBAK) is called to backward transform the eigenvectors to the user-supplied matrix pair. If both left and right eigenvectors are required then
F08WJF (DGGBAK) must be called twice.
10.1 Program Text
Program Text (f08ykfe.f90)
10.2 Program Data
Program Data (f08ykfe.d)
10.3 Program Results
Program Results (f08ykfe.r)