F08YXF (ZTGEVC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08YXF (ZTGEVC)

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

1  Purpose

F08YXF (ZTGEVC) computes some or all of the right and/or left generalized eigenvectors of a pair of complex upper triangular matrices A,B.

2  Specification

SUBROUTINE F08YXF ( SIDE, HOWMNY, SELECT, N, A, LDA, B, LDB, VL, LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO)
INTEGER  N, LDA, LDB, LDVL, LDVR, MM, M, INFO
REAL (KIND=nag_wp)  RWORK(2*N)
COMPLEX (KIND=nag_wp)  A(LDA,*), B(LDB,*), VL(LDVL,*), VR(LDVR,*), WORK(2*N)
LOGICAL  SELECT(*)
CHARACTER(1)  SIDE, HOWMNY
The routine may be called by its LAPACK name ztgevc.

3  Description

F08YXF (ZTGEVC) computes some or all of the right and/or left generalized eigenvectors of the matrix pair A,B which is assumed to be in upper triangular form. If the matrix pair A,B is not upper triangular then the routine F08XSF (ZHGEQZ) should be called before invoking F08YXF (ZTGEVC).
The right generalized eigenvector x and the left generalized eigenvector y of A,B corresponding to a generalized eigenvalue λ are defined by
A-λBx=0  
and
yH A-λ B=0.  
If a generalized eigenvalue is determined as 0/0, which is due to zero diagonal elements at the same locations in both A and B, a unit vector is returned as the corresponding eigenvector.
Note that the generalized eigenvalues are computed using F08XSF (ZHGEQZ) but F08YXF (ZTGEVC) 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 F08YXF (ZTGEVC).
If all eigenvectors are requested, the routine may either return the matrices X and/or Y of right or left eigenvectors of A,B, or the products ZX and/or QY, where Z and Q are two matrices supplied by you. Usually, Q and Z are chosen as the unitary matrices returned by F08XSF (ZHGEQZ). Equivalently, Q and Z are the left and right Schur vectors of the matrix pair supplied to F08XSF (ZHGEQZ). In that case, QY and ZX are the left and right generalized eigenvectors, respectively, of the matrix pair supplied to F08XSF (ZHGEQZ).

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:     SIDE – CHARACTER(1)Input
On entry: specifies the required sets of generalized eigenvectors.
SIDE='R'
Only right eigenvectors are computed.
SIDE='L'
Only left eigenvectors are computed.
SIDE='B'
Both left and right eigenvectors are computed.
Constraint: SIDE='B', 'L' or 'R'.
2:     HOWMNY – CHARACTER(1)Input
On entry: specifies further details of the required generalized eigenvectors.
HOWMNY='A'
All right and/or left eigenvectors are computed.
HOWMNY='B'
All right and/or left eigenvectors are computed; they are backtransformed using the input matrices supplied in arrays VR and/or VL.
HOWMNY='S'
Selected right and/or left eigenvectors, defined by the array SELECT, are computed.
Constraint: HOWMNY='A', 'B' or 'S'.
3:     SELECT* – LOGICAL arrayInput
Note: the dimension of the array SELECT must be at least max1,N if HOWMNY='S', and at least 1 otherwise.
On entry: specifies the eigenvectors to be computed if HOWMNY='S'. To select the generalized eigenvector corresponding to the jth generalized eigenvalue, the jth element of SELECT should be set to .TRUE..
Constraint: if HOWMNY='S', SELECTj=.TRUE. or .FALSE., for j=1,2,,n.
4:     N – INTEGERInput
On entry: n, the order of the matrices A and B.
Constraint: N0.
5:     ALDA* – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least max1,N.
On entry: the matrix A must be in upper triangular form. Usually, this is the matrix A returned by F08XSF (ZHGEQZ).
6:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F08YXF (ZTGEVC) is called.
Constraint: LDAmax1,N.
7:     BLDB* – COMPLEX (KIND=nag_wp) arrayInput
Note: the second dimension of the array B must be at least max1,N.
On entry: the matrix B must be in upper triangular form with non-negative real diagonal elements. Usually, this is the matrix B returned by F08XSF (ZHGEQZ).
8:     LDB – INTEGERInput
On entry: the first dimension of the array B as declared in the (sub)program from which F08YXF (ZTGEVC) is called.
Constraint: LDBmax1,N.
9:     VLLDVL* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array VL must be at least max1,MM if SIDE='L' or 'B' and at least 1 if SIDE='R'.
On entry: if HOWMNY='B' and SIDE='L' or 'B', VL must be initialized to an n by n matrix Q. Usually, this is the unitary matrix Q of left Schur vectors returned by F08XSF (ZHGEQZ).
On exit: if SIDE='L' or 'B', VL contains:
  • if HOWMNY='A', the matrix Y of left eigenvectors of A,B;
  • if HOWMNY='B', the matrix QY;
  • if HOWMNY='S', the left eigenvectors of A,B specified by SELECT, stored consecutively in the columns of the array VL, in the same order as their corresponding eigenvalues.
10:   LDVL – INTEGERInput
On entry: the first dimension of the array VL as declared in the (sub)program from which F08YXF (ZTGEVC) is called.
Constraints:
  • if SIDE='L' or 'B', LDVL max1,N ;
  • if SIDE='R', LDVL1.
11:   VRLDVR* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array VR must be at least max1,MM if SIDE='R' or 'B' and at least 1 if SIDE='L'.
On entry: if HOWMNY='B' and SIDE='R' or 'B', VR must be initialized to an n by n matrix Z. Usually, this is the unitary matrix Z of right Schur vectors returned by F08XEF (DHGEQZ).
On exit: if SIDE='R' or 'B', VR contains:
  • if HOWMNY='A', the matrix X of right eigenvectors of A,B;
  • if HOWMNY='B', the matrix ZX;
  • if HOWMNY='S', the right eigenvectors of A,B specified by SELECT, stored consecutively in the columns of the array VR, in the same order as their corresponding eigenvalues.
12:   LDVR – INTEGERInput
On entry: the first dimension of the array VR as declared in the (sub)program from which F08YXF (ZTGEVC) is called.
Constraints:
  • if SIDE='R' or 'B', LDVR max1,N ;
  • if SIDE='L', LDVR1.
13:   MM – INTEGERInput
On entry: the number of columns in the arrays VL and/or VR.
Constraints:
  • if HOWMNY='A' or 'B', MMN;
  • if HOWMNY='S', MM must not be less than the number of requested eigenvectors.
14:   M – INTEGEROutput
On exit: the number of columns in the arrays VL and/or VR actually used to store the eigenvectors. If HOWMNY='A' or 'B', M is set to N. Each selected eigenvector occupies one column.
15:   WORK2×N – COMPLEX (KIND=nag_wp) arrayWorkspace
16:   RWORK2×N – REAL (KIND=nag_wp) arrayWorkspace
17:   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

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

F08YXF (ZTGEVC) is not threaded by NAG in any implementation.
F08YXF (ZTGEVC) 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

F08YXF (ZTGEVC) is the sixth step in the solution of the complex generalized eigenvalue problem and is usually called after F08XSF (ZHGEQZ).
The real analogue of this routine is F08YKF (DTGEVC).

10  Example

This example computes the α and β parameters, which defines the generalized eigenvalues and the corresponding left and right eigenvectors, of the matrix pair A,B given by
A = 1.0+3.0i 1.0+4.0i 1.0+5.0i 1.0+6.0i 2.0+2.0i 4.0+3.0i 8.0+4.0i 16.0+5.0i 3.0+1.0i 9.0+2.0i 27.0+3.0i 81.0+4.0i 4.0+0.0i 16.0+1.0i 64.0+2.0i 256.0+3.0i  
and
B = 1.0+0.0i 2.0+1.0i 3.0+2.0i 4.0+3.0i 1.0+1.0i 4.0+2.0i 9.0+3.0i 16.0+4.0i 1.0+2.0i 8.0+3.0i 27.0+4.0i 64.0+5.0i 1.0+3.0i 16.0+4.0i 81.0+5.0i 256.0+6.0i .  
To compute generalized eigenvalues, it is required to call five routines: F08WVF (ZGGBAL) to balance the matrix, F08ASF (ZGEQRF) to perform the QR factorization of B, F08AUF (ZUNMQR) to apply Q to A, F08WSF (ZGGHRD) to reduce the matrix pair to the generalized Hessenberg form and F08XSF (ZHGEQZ) to compute the eigenvalues via the QZ algorithm.
The computation of generalized eigenvectors is done by calling F08YXF (ZTGEVC) to compute the eigenvectors of the balanced matrix pair. The routine F08WWF (ZGGBAK) is called to backward transform the eigenvectors to the user-supplied matrix pair. If both left and right eigenvectors are required then F08WWF (ZGGBAK) must be called twice.

10.1  Program Text

Program Text (f08yxfe.f90)

10.2  Program Data

Program Data (f08yxfe.d)

10.3  Program Results

Program Results (f08yxfe.r)


F08YXF (ZTGEVC) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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