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