dd_qz_dgeev: Generalized Eigenvalues Decomposition for a Real Matrix

qz.dgeevR Documentation

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)

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.

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.

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/double/dgeev.f

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

See Also

qz.dgees

Examples


library(QZ, quiet = TRUE)

### https://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))


QZ documentation built on Sept. 8, 2023, 5:43 p.m.