# naginterfaces.library.lapackeig.ztrevc¶

naginterfaces.library.lapackeig.ztrevc(job, howmny, t, select=None, vl=None, vr=None)[source]

ztrevc computes selected left and/or right eigenvectors of a complex upper triangular matrix.

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

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

Parameters
jobstr, length 1

Indicates whether left and/or right eigenvectors are to be computed.

Only right eigenvectors are computed.

Only left eigenvectors are computed.

Both left and right eigenvectors are computed.

howmnystr, length 1

Indicates how many eigenvectors are to be computed.

All eigenvectors (as specified by ) are computed.

All eigenvectors (as specified by ) are computed and then pre-multiplied by the matrix (which is overwritten).

Selected eigenvectors (as specified by and ) are computed.

tcomplex, array-like, shape

The upper triangular matrix , as returned by zhseqr().

selectNone or bool, array-like, shape , optional

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

Specifies which eigenvectors are to be computed if . To obtain the eigenvector corresponding to the eigenvalue , must be set .

If or , is not referenced.

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

If and or , must contain an matrix (usually the matrix of Schur vectors returned by zhseqr()).

If or , need not be set.

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

If and or , must contain an matrix (usually the matrix of Schur vectors returned by zhseqr()).

If or , need not be set.

Returns
tcomplex, ndarray, shape

Is used as internal workspace prior to being restored and hence is unchanged.

vlNone or complex, ndarray, shape

If or , contains the computed left eigenvectors (as specified by and ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.

If , is not referenced.

vrNone or complex, ndarray, shape

If or , contains the computed right eigenvectors (as specified by and ). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.

If , is not referenced.

mint

, the number of selected eigenvectors. If or , is set to .

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 )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

Notes

ztrevc computes left and/or right eigenvectors of a complex upper triangular matrix . Such a matrix arises from the Schur factorization of a complex general matrix, as computed by zhseqr(), for example.

The right eigenvector , and the left eigenvector , corresponding to an eigenvalue , are defined by:

The function can compute the eigenvectors corresponding to selected eigenvalues, or it can compute all the eigenvectors. In the latter case the eigenvectors may optionally be pre-multiplied by an input matrix . Normally is a unitary matrix from the Schur factorization of a matrix as ; if is a (left or right) eigenvector of , then is an eigenvector of .

The eigenvectors are computed by forward or backward substitution. They are scaled so that .

References

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore