# naginterfaces.library.lapackeig.ztgevc¶

naginterfaces.library.lapackeig.ztgevc(side, howmny, a, b, select=None, vl=None, vr=None)[source]

ztgevc computes some or all of the right and/or left generalized eigenvectors of a pair of complex upper triangular matrices .

For full information please refer to the NAG Library document for f08yx

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/f08/f08yxf.html

Parameters
sidestr, length 1

Specifies the required sets of generalized eigenvectors.

Only right eigenvectors are computed.

Only left eigenvectors are computed.

Both left and right eigenvectors are computed.

howmnystr, length 1

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 and/or .

Selected right and/or left eigenvectors, defined by the array , are computed.

acomplex, array-like, shape

The matrix must be in upper triangular form. Usually, this is the matrix returned by zhgeqz().

bcomplex, array-like, shape

The matrix must be in upper triangular form with non-negative real diagonal elements. Usually, this is the matrix returned by zhgeqz().

selectNone or bool, array-like, shape , optional

Note: the required length for this argument is determined as follows: if : ; otherwise: .

Specifies the eigenvectors to be computed if . To select the generalized eigenvector corresponding to the th generalized eigenvalue, the th element of should be set to .

vlNone or complex, array-like, shape , optional

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .

If and or , must be initialized to an matrix . Usually, this is the unitary matrix of left Schur vectors returned by zhgeqz().

vrNone or complex, array-like, shape , optional

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; if : ; otherwise: .

If and or , must be initialized to an matrix . Usually, this is the unitary matrix of right Schur vectors returned by dhgeqz().

Returns
vlNone or complex, ndarray, shape

If or , contains:

if , the matrix of left eigenvectors of ;

if , the matrix ;

if , the left eigenvectors of specified by , stored consecutively in the columns of the array , in the same order as their corresponding eigenvalues.

vrNone or complex, ndarray, shape

If or , contains:

if , the matrix of right eigenvectors of ;

if , the matrix ;

if , the right eigenvectors of specified by , stored consecutively in the columns of the array , in the same order as their corresponding eigenvalues.

mint

The number of columns in the arrays and/or actually used to store the eigenvectors. If or , is set to . Each selected eigenvector occupies one column.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: or , for .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

(errno )

On entry, error in parameter .

Notes

ztgevc computes some or all of the right and/or left generalized eigenvectors of the matrix pair which is assumed to be in upper triangular form. If the matrix pair is not upper triangular then the function zhgeqz() should be called before invoking ztgevc.

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 zhgeqz() but 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 ztgevc.

If all eigenvectors are requested, the function 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 unitary matrices returned by zhgeqz(). Equivalently, and are the left and right Schur vectors of the matrix pair supplied to zhgeqz(). In that case, and are the left and right generalized eigenvectors, respectively, of the matrix pair supplied to zhgeqz().

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