NAG FL Interface
f08yxf (ztgevc)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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

2 Specification

Fortran Interface
Subroutine f08yxf ( side, howmny, select, n, a, lda, b, ldb, vl, ldvl, vr, ldvr, mm, m, work, rwork, info)
Integer, Intent (In) :: n, lda, ldb, ldvl, ldvr, mm
Integer, Intent (Out) :: m, info
Real (Kind=nag_wp), Intent (Out) :: rwork(2*n)
Complex (Kind=nag_wp), Intent (In) :: a(lda,*), b(ldb,*)
Complex (Kind=nag_wp), Intent (Inout) :: vl(ldvl,*), vr(ldvr,*)
Complex (Kind=nag_wp), Intent (Out) :: work(2*n)
Logical, Intent (In) :: select(*)
Character (1), Intent (In) :: side, howmny
C Header Interface
#include <nag.h>
void  f08yxf_ (const char *side, const char *howmny, const logical sel[], const Integer *n, const Complex a[], const Integer *lda, const Complex b[], const Integer *ldb, Complex vl[], const Integer *ldvl, Complex vr[], const Integer *ldvr, const Integer *mm, Integer *m, Complex work[], double rwork[], Integer *info, const Charlen length_side, const Charlen length_howmny)
The routine may be called by the names f08yxf, nagf_lapackeig_ztgevc or its LAPACK name ztgevc.

3 Description

f08yxf 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 should be called before invoking f08yxf.
The right generalized eigenvector x and the left generalized eigenvector y of (A,B) corresponding to a generalized eigenvalue λ are defined by
(A-λB)x=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 but f08yxf 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.
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. Equivalently, Q and Z are the left and right Schur vectors of the matrix pair supplied to f08xsf. In that case, QY and ZX are the left and right generalized eigenvectors, respectively, of the matrix pair supplied to f08xsf.

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 Arguments

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 array Input
Note: the dimension of the array select must be at least max(1,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', select(j)=.TRUE. or .FALSE., for j=1,2,,n.
4: n Integer Input
On entry: n, the order of the matrices A and B.
Constraint: n0.
5: a(lda,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array a must be at least max(1,n).
On entry: the matrix A must be in upper triangular form. Usually, this is the matrix A returned by f08xsf.
6: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f08yxf is called.
Constraint: ldamax(1,n).
7: b(ldb,*) Complex (Kind=nag_wp) array Input
Note: the second dimension of the array b must be at least max(1,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.
8: ldb Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f08yxf is called.
Constraint: ldbmax(1,n).
9: vl(ldvl,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array vl must be at least max(1,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×n matrix Q. Usually, this is the unitary matrix Q of left Schur vectors returned by f08xsf.
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 Integer Input
On entry: the first dimension of the array vl as declared in the (sub)program from which f08yxf is called.
Constraints:
  • if side='L' or 'B', ldvl max(1,n) ;
  • if side='R', ldvl1.
11: vr(ldvr,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array vr must be at least max(1,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×n matrix Z. Usually, this is the unitary matrix Z of right Schur vectors returned by f08xef.
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 Integer Input
On entry: the first dimension of the array vr as declared in the (sub)program from which f08yxf is called.
Constraints:
  • if side='R' or 'B', ldvr max(1,n) ;
  • if side='L', ldvr1.
13: mm Integer Input
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 Integer Output
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: work(2×n) Complex (Kind=nag_wp) array Workspace
16: rwork(2×n) Real (Kind=nag_wp) array Workspace
17: info Integer Output
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

Background information to multithreading can be found in the Multithreading documentation.
f08yxf 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 is the sixth step in the solution of the complex generalized eigenvalue problem and is usually called after f08xsf.
The real analogue of this routine is f08ykf.

10 Example

This example computes the α and β arguments, 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 to balance the matrix, f08asf to perform the QR factorization of B, f08auf to apply Q to A, f08wtf to reduce the matrix pair to the generalized Hessenberg form and f08xsf to compute the eigenvalues via the QZ algorithm.
The computation of generalized eigenvectors is done by calling f08yxf to compute the eigenvectors of the balanced matrix pair. The routine f08wwf is called to backward transform the eigenvectors to the user-supplied matrix pair. If both left and right eigenvectors are required then f08wwf 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)