XLPack 6.1
Excel Worksheet Function Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ WZggev()

Function WZggev ( JobVl As  String,
JobVr As  String,
N As  Long,
A As  Variant,
B As  Variant 
)

Generalized eigenvalue problem of complex matrices (complex number representation in Excel format)

Purpose
WZggev computes for a pair of N x N complex nonsymmetric 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 λ or a ratio α/β = λ, such that A - λ*B is singular. It is usually represented as the pair (α, β), as there is a reasonable interpretation for β = 0, and even for both being zero.

The right generalized eigenvector v(j) corresponding to the generalized eigenvalue λ(j) of (A, B) satisfies
A * v(j) = λ(j) * B * v(j)
The left generalized eigenvector u(j) corresponding to the generalized eigenvalue λ(j) of (A, B) satisfies
u(j)^H * A = λ(j) * u(j)^H * B
where u(j)^H is the conjugate-transpose of u(j).

To represent complex numbers in Excel cells, complex number format in Excel (e.g. 2.5+1i) is used. Worksheet function Complex can be used to input complex numbers into cells.
Returns
N+1 x 2 (JobVl = "N", JobVr = "N")
Column 1Column 2
Rows 1 to NAlpha(j) (j = 1 to N)Beta(j) (j = 1 to N). (Alphar(j)/Beta(j) (j = 1 to N) are the generalized eigenvalues.
Row N+1Return code0
N+1 x N+2 (JobVl = "V", JobVr = "N")
Column 1Column 2Columns 3 to N+2
Rows 1 to NAlpha(j) (j = 1 to N)Beta(j) (j = 1 to N). (Alpha(j)/Beta(j) (j = 1 to N) are the generalized eigenvalues.Left eigenvectors are stored one after another in the same order as their eigenvalues (Each eigenvector is scaled so the largest component has abs(real part) + abs(imaginary part) = 1)
Row N+1Return code00
N+1 x N+2 (JobVl = "N", JobVr = "V")
Column 1Column 2Columns 3 to N+2
Rows 1 to NAlpha(j) (j = 1 to N)Beta(j) (j = 1 to N). (Alphar(j)/Beta(j) (j = 1 to N) are the generalized eigenvalues.Right eigenvectors are stored one after another in the same order as their eigenvalues (Each eigenvector is scaled so the largest component has abs(real part) + abs(imaginary part) = 1)
Row N+1Return code00
N+1 x 2N+2 (JobVl = "V", JobVr = "N")
Column 1Column 2Columns 3 to N+2Columns N+3 to 2N+2
Rows 1 to NAlpha(j) (j = 1 to N)Beta(j) (j = 1 to N). (Alpha(j)/Beta(j) (j = 1 to N) are the generalized eigenvalues.Left eigenvectors are stored one after another in the same order as their eigenvalues (Each eigenvector is scaled so the largest component has abs(real part) + abs(imaginary part) = 1)Right eigenvectors are stored one after another in the same order as their eigenvalues (Each eigenvector is scaled so the largest component has abs(real part) + abs(imaginary part) = 1)
Row N+1Return code000

Return code.
= 0: Successful exit.
= i (0 < i <= N: Failed to converge for first to i-th eigenvalues, and no eigenvectors have been computed.
= N+1, N+2: Failed to converge due to other errors.
Parameters
[in]JobVl= "N": Left eigenvectors of A are not computed.
= "V": Left eigenvectors of A are computed.
[in]JobVr= "N": Right eigenvectors of A are not computed.
= "V": Right eigenvectors of A are computed.
[in]NOrder of the matrices A and B. (N >= 1)
[in]A(N x N) N x N complex matrix A.
[in]B(N x N) N x N complex matrix B.
Reference
LAPACK
Example
Compute for a pair of matrices (A, B) the generalized eigenvalues and the left and right generalized eigenvectors, where
( 0.2-0.11i -0.93-0.32i 0.81+0.37i )
A = ( -0.8-0.92i -0.29+0.86i 0.64+0.51i )
( 0.71+0.59i -0.15+0.19i 0.2+0.94i )
( 0.57-0.91i -0.28-0.45i 0.25+0.91i )
B = ( 0.83-0.46i 0.63-0.19i -0.69+0.09i )
( 0.24-1.33i -0.56-0.67i 0.9+1.25i )

WZggev