The Schur decomposition is used to compute eigenvalues of a square matrix, and has applications in the solution of algebraic Riccati equations in control (see
are
anddare
).schur
always returns where is a unitary matrix and is upper triangular. The eigenvalues of are the diagonal elements of If the matrix is real, then the real Schur decomposition is computed, in which the matrix is orthogonal and is block upper triangular with blocks of size at most along the diagonal. The diagonal elements of (or the eigenvalues of the blocks, when appropriate) are the eigenvalues of andThe eigenvalues are optionally ordered along the diagonal according to the value of
opt
.opt = "a"
indicates that all eigenvalues with negative real parts should be moved to the leading block of (used inare
),opt = "d"
indicates that all eigenvalues with magnitude less than one should be moved to the leading block of (used indare
), andopt = "u"
, the default, indicates that no ordering of eigenvalues should occur. The leading columns of always span the subspace corresponding to the leading eigenvalues of