# naginterfaces.library.lapackeig.zhgeqz¶

naginterfaces.library.lapackeig.zhgeqz(job, compq, compz, ilo, ihi, a, b, q, z)[source]

zhgeqz implements the method for finding generalized eigenvalues of the complex matrix pair of order , which is in the generalized upper Hessenberg form.

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

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

Parameters
jobstr, length 1

Specifies the operations to be performed on .

The matrix pair on exit might not be in the generalized Schur form.

The matrix pair on exit will be in the generalized Schur form.

compqstr, length 1

Specifies the operations to be performed on :

The array is unchanged.

The left transformation is accumulated on the array .

The array is initialized to the identity matrix before the left transformation is accumulated in .

compzstr, length 1

Specifies the operations to be performed on .

The array is unchanged.

The right transformation is accumulated on the array .

The array is initialized to the identity matrix before the right transformation is accumulated in .

iloint

The indices and , respectively which define the upper triangular parts of . The submatrices and are then upper triangular. These arguments are provided by zggbal() if the matrix pair was previously balanced; otherwise, and .

ihiint

The indices and , respectively which define the upper triangular parts of . The submatrices and are then upper triangular. These arguments are provided by zggbal() if the matrix pair was previously balanced; otherwise, and .

acomplex, array-like, shape

The upper Hessenberg matrix . The elements below the first subdiagonal must be set to zero.

bcomplex, array-like, shape

The upper triangular matrix . The elements below the diagonal must be zero.

qcomplex, array-like, shape

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 , the matrix . The matrix is usually the matrix returned by zgghd3().

If , is not referenced.

zcomplex, array-like, shape

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 , the matrix . The matrix is usually the matrix returned by zgghd3().

If , is not referenced.

Returns
acomplex, ndarray, shape

If , the matrix pair will be simultaneously reduced to generalized Schur form.

If , the and diagonal blocks of the matrix pair will give generalized eigenvalues but the remaining elements will be irrelevant.

bcomplex, ndarray, shape

If , the matrix pair will be simultaneously reduced to generalized Schur form.

If , the and diagonal blocks of the matrix pair will give generalized eigenvalues but the remaining elements will be irrelevant.

alphacomplex, ndarray, shape

, for .

betacomplex, ndarray, shape

, for .

qcomplex, ndarray, shape

If , contains the matrix product .

If , contains the transformation matrix .

zcomplex, ndarray, shape

If , contains the matrix product .

If , contains the transformation matrix .

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 .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: and .

(errno )

The iteration did not converge and the matrix pair is not in the generalized Schur form. The computed and should be correct for .

(errno )

The computation of shifts failed and the matrix pair is not in the generalized Schur form. The computed and should be correct for .

(errno )

An unexpected Library error has occurred.

Notes

zhgeqz implements a single-shift version of the method for finding the generalized eigenvalues of the complex matrix pair which is in the generalized upper Hessenberg form. If the matrix pair is not in the generalized upper Hessenberg form, then the function zgghd3() should be called before invoking zhgeqz.

This problem is mathematically equivalent to solving the matrix equation

Note that, to avoid underflow, overflow and other arithmetic problems, the generalized eigenvalues are never computed explicitly by this function but defined as ratios between two computed values, and :

The arguments , in general, are finite complex values and are finite real non-negative values.

If desired, the matrix pair may be reduced to generalized Schur form. That is, the transformed matrices and are upper triangular and the diagonal values of and provide and .

The argument specifies two options. If then the matrix pair is simultaneously reduced to Schur form by applying one unitary transformation (usually called ) on the left and another (usually called ) on the right. That is,

If , then at each iteration the same transformations are computed but they are only applied to those parts of and which are needed to compute and . This option could be used if generalized eigenvalues are required but not generalized eigenvectors.

If and or , and or , then the unitary transformations used to reduce the pair are accumulated into the input arrays and . If generalized eigenvectors are required then must be set to and if left (right) generalized eigenvectors are to be computed then () must be set to or rather than .

If , then eigenvectors are accumulated on the identity matrix and on exit the array contains the left eigenvector matrix . However, if then the transformations are accumulated in the user-supplied matrix in array on entry and thus on exit contains the matrix product . A similar convention is used for .

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