# naginterfaces.library.lapackeig.zggev3¶

naginterfaces.library.lapackeig.zggev3(jobvl, jobvr, a, b)[source]

zggev3 computes for a pair of complex nonsymmetric matrices the generalized eigenvalues and, optionally, the left and/or right generalized eigenvectors using the algorithm.

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

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f08/f08wqf.html

Parameters
jobvlstr, length 1

If , do not compute the left generalized eigenvectors.

If , compute the left generalized eigenvectors.

jobvrstr, length 1

If , do not compute the right generalized eigenvectors.

If , compute the right generalized eigenvectors.

acomplex, array-like, shape

The matrix in the pair .

bcomplex, array-like, shape

The matrix in the pair .

Returns
acomplex, ndarray, shape

has been overwritten.

bcomplex, ndarray, shape

has been overwritten.

alphacomplex, ndarray, shape

See the description of .

betacomplex, ndarray, shape

, for , will be the generalized eigenvalues.

Note: the quotients may easily overflow or underflow, and may even be zero.

Thus, you should avoid naively computing the ratio .

However, will always be less than and usually comparable with in magnitude, and will always be less than and usually comparable with .

vlcomplex, ndarray, shape

If , the left generalized eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues. Each eigenvector will be scaled so the largest component will have .

If , is not referenced.

vrcomplex, ndarray, shape

If , the right generalized eigenvectors are stored one after another in the columns of , in the same order as the corresponding eigenvalues. Each eigenvector will be scaled so the largest component will have .

If , is not referenced.

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: .

(errno )

(errno )

A failure occurred in ztgevc() while computing generalized eigenvectors.

Warns
NagAlgorithmicWarning
(errno )

The iteration failed. No eigenvectors have been calculated but and should be correct from element .

Notes

A generalized eigenvalue for a pair of matrices is a scalar or a ratio , such that is singular. It is usually represented as the pair , as there is a reasonable interpretation for , and even for both being zero.

The right generalized eigenvector corresponding to the generalized eigenvalue of satisfies

The left generalized eigenvector corresponding to the generalized eigenvalue of satisfies

where is the conjugate-transpose of .

All the eigenvalues and, if required, all the eigenvectors of the complex generalized eigenproblem , where and are complex, square matrices, are determined using the algorithm. The complex algorithm consists of three stages:

1. is reduced to upper Hessenberg form (with real, non-negative subdiagonal elements) and at the same time is reduced to upper triangular form.

2. is further reduced to triangular form while the triangular form of is maintained and the diagonal elements of are made real and non-negative. This is the generalized Schur form of the pair .

This function does not actually produce the eigenvalues , but instead returns and such that

The division by becomes your responsibility, since may be zero, indicating an infinite eigenvalue.

3. If the eigenvectors are required they are obtained from the triangular matrices and then transformed back into the original coordinate system.

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, https://www.netlib.org/lapack/lug

Golub, G H and Van Loan, C F, 2012, Matrix Computations, (4th Edition), Johns Hopkins University Press, Baltimore

Wilkinson, J H, 1979, Kronecker’s canonical form and the algorithm, Linear Algebra Appl. (28), 285–303