**LA_GEES** computes for a real/complex square matrix , the
eigenvalues, the real-Schur/complex-Schur form , and, optionally, the
matrix of Schur vectors , where is orthogonal/unitary.
This gives the Schur factorization

Optionally, it also orders the eigenvalues on the diagonal of the Schur form so that selected eigenvalues are at the top left. The leading columns of then form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues.

A real matrix is in real-Schur form if it is block upper triangular with and blocks along the main diagonal. blocks are standardized in the form

where . The eigenvalues of such a block are .

A complex matrix is in complex-Schur form if it is upper triangular.