QZ (version 0.1-7)

qz.zggev: Generalized Eigenvalues Decomposition for Complex Paired Matrices

Description

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

Usage

qz.zggev(A, B, vl = TRUE, vr = TRUE, LWORK = NULL)

Arguments

A

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

B

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

vl

if compute left 'complex' eigen vectors. (U)

vr

if compute right 'complex' eigen vectors. (V)

LWORK

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

Value

Return a list contains next:

'ALPHA'

original returns from 'zggev.f'.

'BETA'

original returns from 'zggev.f'.

'VL'

original returns from 'zggev.f'.

'VR'

original returns from 'zggev.f'.

'WORK'

optimal LWORK (for zggev.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:

'U'

the left eigen vectors.

'V'

the right eigen vectors.

Note that 'VL' and 'VR' are scaled so the largest component has abs(real part) + abs(imag. part) = 1.

Details

See 'zggev.f' for all details.

ZGGEV computes for a pair of N-by-N complex non-symmetric matrices (A,B), the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors.

A generalized eigenvalue for a pair of matrices (A,B) is a scalar lambda or a ratio alpha/beta = lambda, such that A - lambda*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.

The right generalized eigenvector v(j) corresponding to the generalized eigenvalue lambda(j) of (A,B) satisfies

A * v(j) = lambda(j) * B * v(j).

The left generalized eigenvector u(j) corresponding to the generalized eigenvalues lambda(j) of (A,B) satisfies

u(j)**H * A = lambda(j) * u(j)**H * B

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

References

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

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

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

See Also

qz.zgges

Examples

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

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

# Verify 1
(lambda <- ret$ALPHA / ret$BETA)    # Unstable
diff.R <- matrix(ret$BETA, 4, 4, byrow = TRUE) * A %*% ret$V -
          matrix(ret$ALPHA, 4, 4, byrow = TRUE) * B %*% ret$V
diff.L <- matrix(ret$BETA, 4, 4) * H(ret$U) %*% A -
          matrix(ret$ALPHA, 4, 4) * H(ret$U) %*% B
round(diff.R)
round(diff.L)

# Verify 2
round(ret$U %*% solve(ret$U))
round(ret$V %*% solve(ret$V))
# }
# NOT RUN {
<!-- % } -->
# }

Run the code above in your browser using DataLab