QZ (version 0.1-7)

qz.dgees: QZ Decomposition for a Real Matrix

Description

This function call 'dgees' in Fortran to decompose a 'real' matrix A.

Usage

qz.dgees(A, vs = TRUE, LWORK = NULL)

Arguments

A

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

vs

if compute 'real' Schur vectors. (Q)

LWORK

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

Value

Return a list contains next:

'T'

A's generalized Schur form.

'WR'

original returns from 'dgees.f'.

'WI'

original returns from 'dgees.f'.

'VS'

original returns from 'dgees.f'.

'WORK'

optimal LWORK (for dgees.f only)

'INFO'

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

Extra returns in the list:

'W'

WR + WI * i.

'Q'

the Schur vectors.

Details

See 'dgees.f' for all details.

DGEES computes for an N-by-N real non-symmetric matrix A, the eigenvalues, the real Schur form T, and, optionally, the matrix of Schur vectors Q. This gives the Schur factorization A = Q*T*(Q**T).

Optionally, it also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left. The leading columns of Q then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues.

A matrix is in real Schur form if it is upper quasi-triangular with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the form

[ a b ] [ c a ]

where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).

References

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

http://www.netlib.org/lapack/double/dgees.f

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

See Also

qz.dgeev

Examples

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

### http://www.nag.com/lapack-ex/node89.html
A <- exA2$A
ret <- qz.dgees(A)

# Verify 1
A.new <- ret$Q %*% ret$T %*% solve(ret$Q)
round(A - A.new)

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

Run the code above in your browser using DataCamp Workspace