lapgeigv#
Purpose#
Computes generalized eigenvalues, left eigenvectors, and right eigenvectors for a pair of real or complex general matrices.
Format#
- { va1, va2, lve, rve } = lapgeigv(A, B)#
- Parameters:
A (NxN matrix) – real or complex general matrix.
B (NxN matrix) – real or complex general matrix.
- Returns:
va1 (Nx1 vector) – numerator of eigenvalues.
va2 (Nx1 vector) – denominator of eigenvalues.
lve (NxN left eigenvectors)
rve (NxN right eigenvectors)
Remarks#
va1 and va2 are the vectors of the numerators and denominators respectively of the eigenvalues of the solution of the generalized symmetric eigenproblem of the form \(Aw = \lambda Bw\) where A and B are real or complex general matrices and \(w = va1./va2\). The generalized eigenvalues are not computed directly because some elements of va2 may be zero, i.e., the eigenvalues may be infinite.
The left and right eigenvectors diagonalize \(U'^{-1}AU^{-1}\) where \(B = U'U\), that is,
and
This procedure calls the LAPACK routines DGGEV and ZGGEV.
Example#
A = { 1 2, 3 4 };
B = { 2 0, 0 1 };
// Compute generalized eigenvalues and eigenvectors
{ va1, va2, lve, rve } = lapgeigv(A, B);
// Eigenvalues are va1 ./ va2
print "Generalized eigenvalues:";
print (va1 ./ va2);
print "Right eigenvectors:";
print rve;
See also
Functions lapgeig(), lapgeigh()