ordschur

Reorders the eigenvalues in a Schur factorization.

Category: Mathematics > Linear Algebra

Syntax

[US, TS] = ordschur(U, T, select)

Reorders the Schur form T and updates U so that the eigenvalues marked in select come first.

Description

The Schur form is not unique in the order of its diagonal entries. ordschur applies orthogonal swaps between neighbouring diagonal entries, keeping the factorization valid, to bring chosen eigenvalues to the leading positions. The leading columns of US then span an invariant subspace associated with those eigenvalues.

Input arguments

U, T
Schur factors from schur, with A = U*T*U'.
select
Logical (or 0/1) vector with one entry per eigenvalue; nonzero entries mark the ones to move to the top.

Output arguments

US, TS
Reordered factors with U*T*U' = US*TS*US'.

Example

Bringing the eigenvalue 6 to the top

T = [1 2 3; 0 4 5; 0 0 6];
[US, TS] = ordschur(eye(3), T, [0 0 1]);
diag(TS)'
disp(norm(US*TS*US' - T) < 1e-12)
Output
ans = 1×3

    6.0000    1.0000    4.0000
   1

See also

schur ordeig ordqz eig