**LA_GGESX** computes
for a pair of real or complex matrices the
(generalized) real or complex Schur form, the generalized
eigenvalues in the form of scalar pairs
, and, optionally, the left and/or right Schur
vectors.

If and are real then the real-Schur form is computed,
otherwise the complex-Schur form is computed. The real-Schur form is a
pair of real matrices such that 1)
has block upper triangular form, with and
blocks along the main diagonal,
2) has upper triangular form with nonnegative
elements
on the main diagonal, and 3) and
, where and are orthogonal
matrices. The blocks of are ``standardized''
by making the corresponding elements of have the form

The complex-Schur form is a pair of matrices such that 1) has upper triangular form, 2) has upper triangular form with nonnegative elements on the main diagonal, and 3) and , where and are unitary matrices.

In both cases the columns of and are called, respectively, the left and right Schur vectors.

A generalized eigenvalue of the pair is, roughly speaking, a scalar of the form such that the matrix is singular. It is usually represented as the pair , as there is a reasonable interpretation of the case (even if )