This example computes the
and
arguments, which defines the generalized eigenvalues and the corresponding left and right eigenvectors, of the matrix pair
given by
and
To compute generalized eigenvalues, it is required to call five routines:
zggbal to balance the matrix,
zgeqrf to perform the
factorization of
,
zunmqr to apply
to
,
zgghrd to reduce the matrix pair to the generalized Hessenberg form and
zhgeqz to compute the eigenvalues via the
algorithm.
The computation of generalized eigenvectors is done by calling
ztgevc to compute the eigenvectors of the balanced matrix pair. The routine
zggbak is called to backward transform the eigenvectors to the user-supplied matrix pair. If both left and right eigenvectors are required then
zggbak must be called twice.