QZ (version 0.1-7)

qz.dgeev: Generalized Eigenvalues Decomposition for a Real Matrix

Description

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

Usage

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

Arguments

A

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

vl

if compute left 'real' eigen vector. (U)

vr

if compute right 'real' eigen vector. (V)

LWORK

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

Value

Return a list contains next:

'WR'

original returns from 'dgeev.f'.

'WI'

original returns from 'dgeev.f'.

'VL'

original returns from 'dgeev.f'.

'VR'

original returns from 'dgeev.f'.

'WORK'

optimal LWORK (for dgeev.f only)

'INFO'

= 0: successful. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: QZ iteration failed.

Extra returns in the list:

'W'

WR + WI * i.

'U'

the left eigen vectors.

'V'

the right eigen vectors.

If WI[j] is zero, then the j-th eigenvalue is real; if positive, then the j-th and (j+1)-st eigenvalues are a complex conjugate pair, with WI[j+1] negative.

If the j-th eigenvalue is real, then U[, j] = VL[, j], the j-th column of VL. If the j-th and (j+1)-th eigenvalues form a complex conjugate pair, then U[, j] = VL[, j] + i * VL[, j+1] and U[, j+1] = VL[, j] - i * VL[, j+1].

Similarly, for the right eigenvectors of V and VR.

Details

See 'dgeev.f' for all details.

DGEEV computes for an N-by-N real non-symmetric matrix A, the eigenvalues and, optionally, the left and/or right eigenvectors.

The right eigenvector v(j) of A satisfies

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

where lambda(j) is its eigenvalue. The left eigenvector u(j) of A satisfies

u(j)**T * A = lambda(j) * u(j)**T

where u(j)**T denotes the transpose of u(j).

The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

References

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

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

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

See Also

qz.dgees

Examples

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

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

# Verify 1
diff.R <- A %*% ret$V - matrix(ret$W, 4, 4, byrow = TRUE) * ret$V
diff.L <- t(ret$U) %*% A - matrix(ret$W, 4, 4) * t(ret$U)
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