qz.zgeev {QZ} | R Documentation |
Generalized Eigenvalues Decomposition for a Complex Matrix
Description
This function call 'zgeev' in Fortran to decompose a 'complex' matrix A.
Usage
qz.zgeev(A, vl = TRUE, vr = TRUE, LWORK = NULL)
Arguments
A |
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) |
Details
See 'zgeev.f' for all details.
ZGEEV computes for an N-by-N complex 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)**H * A = lambda(j) * u(j)**H
where u(j)**H denotes the conjugate transpose of u(j).
The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.
Value
Return a list contains next:
'W' |
original returns from 'zgeev.f'. |
'VL' |
original returns from 'zgeev.f'. |
'VR' |
original returns from 'zgeev.f'. |
'WORK' |
optimal LWORK (for zgeev.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:
'U' |
the left eigen vectors. |
'V' |
the right eigen vectors. |
Author(s)
Wei-Chen Chen wccsnow@gmail.com
References
Anderson, E., et al. (1999) LAPACK User's Guide, 3rd edition, SIAM, Philadelphia.
https://www.netlib.org/lapack/complex16/zgeev.f
https://en.wikipedia.org/wiki/Schur_decomposition
See Also
Examples
library(QZ, quiet = TRUE)
### https://www.nag.com/lapack-ex/node92.html
A <- exA1$A
ret <- qz.zgeev(A)
# Verify 1
diff.R <- A %*% ret$V - matrix(ret$W, 4, 4, byrow = TRUE) * ret$V
diff.L <- H(ret$U) %*% A - matrix(ret$W, 4, 4) * H(ret$U)
round(diff.R)
round(diff.L)
# Verify 2
round(ret$U %*% H(ret$U))
round(ret$V %*% H(ret$V))