QZ (version 0.1-7)

qz.zgges: QZ Decomposition for Complex Paired Matrices

Description

This function call 'zgges' in Fortran to decompose 'complex' matrices (A,B).

Usage

qz.zgges(A, B, vsl = TRUE, vsr = TRUE, LWORK = NULL)

Arguments

A

a 'complex' matrix, dim = c(N, N).

B

a 'complex' matrix, dim = c(N, N).

vsl

if compute left 'complex' Schur vectors. (Q)

vsr

if compute right 'complex' Schur vectors. (Z)

LWORK

optional, dimension of array WORK for workspace. (>= 2N)

Value

Return a list contains next:

'S'

A's generalized Schur form.

'T'

B's generalized Schur form.

'ALPHA'

ALPHA[j]/BETA[j] are generalized eigenvalues.

'BETA'

ALPHA[j]/BETA[j] are generalized eigenvalues.

'VSL'

original returns from 'zgges.f'.

'VSR'

original returns from 'zgges.f'.

'WORK'

optimal LWORK (for zgges.f only)

'INFO'

= 0: successful. < 0: if INFO = -i, the i-th argument had an illegal value. =1,...,N: QZ iteration failed. =N+1: other than QZ iteration failed in ZHGEQZ. =N+2: reordering problem. =N+3: reordering failed.

Extra returns in the list:

'Q'

the left Schur vectors.

'Z'

the right Schur vectors.

Details

See 'zgges.f' for all details.

ZGGES computes for a pair of N-by-N complex non-symmetric matrices (A,B), the generalized eigenvalues, the generalized complex Schur form (S, T), and optionally left and/or right Schur vectors (VSL and VSR). This gives the generalized Schur factorization

(A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )

where (VSR)**H is the conjugate-transpose of VSR.

Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper triangular matrix S and the upper triangular matrix T. The leading columns of VSL and VSR then form an unitary basis for the corresponding left and right eigenspaces (deflating subspaces).

(If only the generalized eigenvalues are needed, use the driver ZGGEV instead, which is faster.)

A generalized eigenvalue for a pair of matrices (A,B) is a scalar w or a ratio alpha/beta = w, such that A - w*B is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0, and even for both being zero.

A pair of matrices (S,T) is in generalized complex Schur form if S and T are upper triangular and, in addition, the diagonal elements of T are non-negative real numbers.

References

Anderson, E., et al. (1999) LAPACK User's Guide, 3rd edition, SIAM, Philadelphia.

http://www.netlib.org/lapack/complex16/zgges.f

http://en.wikipedia.org/wiki/Schur_decomposition

See Also

qz.zggev

Examples

Run this code
# NOT RUN {
<!-- % \dontrun{ -->
# }
# NOT RUN {
library(QZ, quiet = TRUE)

### http://www.nag.com/lapack-ex/node124.html
A <- exAB1$A
B <- exAB1$B
ret <- qz.zgges(A, B)

# Verify 1
A.new <- ret$Q %*% ret$S %*% H(ret$Z)
B.new <- ret$Q %*% ret$T %*% H(ret$Z)
round(A - A.new)
round(B - B.new)

# verify 2
round(ret$Q %*% H(ret$Q))
round(ret$Z %*% H(ret$Z))
# }
# NOT RUN {
<!-- % } -->
# }

Run the code above in your browser using DataCamp Workspace