yields the ordered Schur decomposition for a numerical matrix m, given as a list {q,t} where q is an orthonormal matrix and t is a block upper triangular matrix.
OrderedSchurDecomposition[m,ord]
uses ord to order the main diagonal elements in the upper triangular matrix t.
OrderedSchurDecomposition[{m,a}]
gives the generalized Schur decomposition of m with respect to a, given as a list {q,s,p,t}.
OrderedSchurDecomposition[{m,a},ord]
uses ord to order the main diagonal elements in the upper triangular matrices s and t.
OrderedSchurDecomposition
yields the ordered Schur decomposition for a numerical matrix m, given as a list {q,t} where q is an orthonormal matrix and t is a block upper triangular matrix.
OrderedSchurDecomposition[m,ord]
uses ord to order the main diagonal elements in the upper triangular matrix t.
OrderedSchurDecomposition[{m,a}]
gives the generalized Schur decomposition of m with respect to a, given as a list {q,s,p,t}.
OrderedSchurDecomposition[{m,a},ord]
uses ord to order the main diagonal elements in the upper triangular matrices s and t.
Details and Options
- OrderedSchurDecomposition is similar to SchurDecomposition, except that blocks in the decomposition are ordered by properties of the eigenvalues of the input.
- OrderedSchurDecomposition[m] gives a list of matrices {q,t} such that the m is equal to q.t.ConjugateTranspose[q].
- For real-valued matrices m, the matrix q will by default be real orthogonal. If all of m's eigenvalues are real, q will always be real orthogonal, and t will be strictly upper triangular.
- The
and
blocks on the diagonal of the t matrix correspond to eigenvalues of m. A
block contains a (real or complex) eigenvalue of m. A
real block represents a complex conjugate pair of eigenvalues of a real-valued matrix. These blocks have the form
, with
, and correspond to the eigenvalues
. » - OrderedSchurDecomposition[{m,a}] yields a list of matrices {q,s,p,t} where q and p are orthonormal, s is block upper triangular and t is upper triangular, such that m is given by q.s.ConjugateTranspose[p] and a is given by q.t.ConjugateTranspose[p] . »
- The input matrices must be square.
- The optional second argument specifies the criterion applied to the corresponding eigenvalue when ordering the blocks of the decomposition. Supported values include:
-
"DecreasingAbs" sort by decreasing absolute value (complex modulus) "IncreasingAbs" sort by increasing real part (complex modulus) "DecreasingRe" sort by decreasing real part "IncreasingRe" sort by increasing real part "DecreasingAbsRe" sort by decreasing absolute value of the real part "IncreasingAbsRe" sort by increasing absolute value of the real part "DecreasingAbsIm" sort by decreasing absolute value of the imaginary part "IncreasingAbsIm" sort by increasing absolute value of the imaginary part - OrderedSchurDecomposition takes the following options:
-
RealBlockDiagonalForm True whether 2×2 blocks of real values should be used on matrix diagonals in place of complex values TargetStructure Automatic the structure of the returned matrix - For real-valued input, setting the option RealBlockDiagonalFormFalse allows complex values in the output. For the ordinary decomposition {q,t} of m, q will become strictly upper triangular, and its diagonal elements will be the eigenvalues of m. In the generalized decomposition {q,s,p,t} of {m,a}, s will become upper triangular, and the ratios of the diagonal of s to the diagonal t will be the generalized eigenvalues.
- Possible values for the option TargetStructure include:
-
Automatic, "Structured" return each matrix as an appropriate structured matrix object "Dense" return all matrices as lists of lists "Sparse" return all matrices as SparseArray objects - The type of structured matrices returned by the ordinary Schur decomposition depends on the effective value of the option RealBlockDiagonalForm. If it is set to False or the input has complex entries, then the output {q,t} will use a UnitaryMatrix object for q and an UpperTriangularMatrix object for t . Otherwise, it will use an OrthogonalMatrix object for q and a BlockUpperTriangularMatrix object for t. »
- The type of structured matrices returned by the generalized Schur decomposition also depends on the effective value of the option RealBlockDiagonalForm. If it is set to False or the input has complex entries in either matrix, then the output {q,s,p,t} will use UnitaryMatrix objects for p and q, and an UpperTriangularMatrix for s. Otherwise, it will use OrthogonalMatrix objects for p and q and a BlockUpperTriangularMatrix object for s. It will always use an UpperTriangularMatrix object for t. »
Examples
open all close allBasic Examples (2)
Find the ordered Schur decomposition of a real matrix:
{q, t} = OrderedSchurDecomposition[(| | | |
| ---- | --- | --- |
| 2.7 | 4.8 | 8.1 |
| -0.6 | 0 | 0 |
| 0.1 | 0 | 0.3 |)]MatrixForm /@ {q, t}Confirm the decomposition up to numerical rounding:
q.t.ConjugateTranspose[q]//Chop//MatrixFormFind the ordered Schur decomposition of a real matrix, sorting in increasing order:
{q, t} = OrderedSchurDecomposition[(| | | |
| ---- | --- | --- |
| 2.7 | 4.8 | 8.1 |
| -0.6 | 0 | 0 |
| 0.1 | 0 | 0.3 |), "IncreasingAbs"];
MatrixForm /@ {q, t}q.t.ConjugateTranspose[q]//Chop//MatrixFormScope (13)
Basic Uses (5)
Find the ordered Schur decomposition of a machine-precision rotation matrix:
rot = RotationMatrix[1.5, {1, 0, 1}];
rot//MatrixFormThe decomposition has a
block in the block upper triangular matrix:
MatrixForm /@ OrderedSchurDecomposition[rot]//ChopThe block moves as a whole when the ordering is changed:
MatrixForm /@ OrderedSchurDecomposition[rot, "IncreasingAbs"]//ChopOrdered Schur decomposition of a complex matrix:
SeedRandom[RandomGeneratorState[{"ExtendedCA", {80, 4, 0}},
{{RawArray["UnsignedInteger64", {7019211116784639972, 8912164409758622783, 27696699,
16328869086228150593, 17879983718918064822, 9891073875740697117, 12746819576093620302,
1985433522124 ... 77856353662826056, 3788742224252717809, 15892891664649395691,
6434460085881022762, 3691283725648446002, 10867854088590838627, 4748846766798226817,
6838621313327808616}], 4, 0}}, RawArray["UnsignedInteger64", {11524302596671236795, 0}]]];
m = RandomComplex[1 + I, {3, 3}];
MatrixForm /@ OrderedSchurDecomposition[m]Compare the triangular matrix in all possible orderings:
Grid[Partition[Table[Labeled[MatrixForm@Last@OrderedSchurDecomposition[m, ord], ord], {ord, {"DecreasingAbs", "IncreasingAbs", "DecreasingRe", "IncreasingRe", "DecreasingAbsRe", "IncreasingAbsRe", "DecreasingAbsIm", "IncreasingAbsIm"}}], 2], BaseStyle -> {PrintPrecision -> 3}, Spacings -> {Automatic, 2}]Ordered Schur decomposition of an arbitrary-precision matrix:
MatrixForm /@ OrderedSchurDecomposition[RandomReal[4, {3, 3}, WorkingPrecision -> 15]]Consider a real-valued matrix
with complex eigenvalues:
m = {{1.81066, 0.31066, 1.5}, {-0.53033, 2.03033, 0.43934}, {-0.96967, -0.53033, 2.56066}};
Eigenvalues[m]Compute its ordered Schur decomposition:
{q, t} = OrderedSchurDecomposition[m]All entries in the decomposition are real:
MatrixForm /@ {q, t}The
matrix is block upper triangular, with entries along the first subdiagonal, but not upper triangular:
{UpperTriangularMatrixQ[t, -1], UpperTriangularMatrixQ[t]}The upper 2×2 block gives the first two eigenvalues:
{t[[1, 1]] + Sqrt[t[[1, 2]]t[[2, 1]]], t[[1, 1]] - Sqrt[t[[1, 2]]t[[2, 1]]]}RealBlockDiagonalFormFalse makes
upper triangular at the cost of complex entries:
MatrixForm /@ OrderedSchurDecomposition[m, RealBlockDiagonalForm -> False]Ordering of the entries of
is based on the eigenvalues, which is clear when complex entries are allowed:
MatrixForm /@ OrderedSchurDecomposition[m, "IncreasingAbs", RealBlockDiagonalForm -> False]//ChopHowever, the same order is used even when the real block form is returned:
MatrixForm /@ OrderedSchurDecomposition[m, "IncreasingAbs"]The Schur decomposition of large numerical matrices is computed efficiently:
m = RandomReal[{0, 5}, {100, 100}];OrderedSchurDecomposition[m] ;//TimingGeneralized Decomposition (4)
Generalized ordered Schur decomposition for a pair of matrices m and a:
m = {{.5, 1}, {1.5, 2}};
a = {{2.5, 3}, {3.5, 4}};
{q, s, p, t} = OrderedSchurDecomposition[{m, a}];
MatrixForm /@ {q, s, p, t}m - q.s.ConjugateTranspose[p]//Chopa - q.t.ConjugateTranspose[p]//ChopGeneralized ordered Schur decomposition for a pair of complex matrices:
m = RandomComplex[1 + I, {3, 3}];
a = RandomComplex[1 + I, {3, 3}];
{q, s, p, t} = OrderedSchurDecomposition[{m, a}]{m - q.s.ConjugateTranspose[p], a - q.t.ConjugateTranspose[p]}//ChopThe ratios of the diagonal entries in
and
equal the generalized eigenvalues:
(Diagonal[s]/Diagonal[t]) == Eigenvalues[{m, a}]Compute the generalized Schur decomposition of two complex matrices with the default ordering:
m = RandomComplex[1 + I, {3, 3}];
a = RandomComplex[1 + I, {3, 3}];
{q, s, p, t} = OrderedSchurDecomposition[{m, a}];The entries of
and
ordered to produce decreasing modulus of the generalized eigenvalues, matching Eigenvalues:
{Abs[(Diagonal[s]/Diagonal[t])], Eigenvalues[{m, a}] == (Diagonal[s]/Diagonal[t])}Order the blocks in the decomposition to produce increasing modulus of the generalized eigenvalues:
{qi, si, pi, ti} = OrderedSchurDecomposition[{m, a}, "IncreasingAbs"];{Abs[(Diagonal[si]/Diagonal[ti])], Sort[Eigenvalues[{m, a}]] == Sort[(Diagonal[si]/Diagonal[ti])]}Change the ordering to use the imaginary part of the generalized eigenvalues instead:
{qir, sir, pir, tir} = OrderedSchurDecomposition[{m, a}, "IncreasingAbsIm"];{Abs@Im[(Diagonal[sir]/Diagonal[tir])], Sort[Eigenvalues[{m, a}]] == Sort[(Diagonal[sir]/Diagonal[tir])]}Generalized ordered Schur decomposition for a pair of arbitrary-precision matrices:
m = RandomReal[1, {3, 3}, WorkingPrecision -> 10];
a = RandomReal[1, {3, 3}, WorkingPrecision -> 10];
{q, s, p, t} = OrderedSchurDecomposition[{m, a}]There is no need to use Chop to verify the decomposition:
{m == q.s.ConjugateTranspose[p], a == q.t.ConjugateTranspose[p]}Special Matrices (4)
Ordered Schur decomposition of sparse matrices:
SparseArray[{{1, 1} -> 3.1, {1, 2} -> 2, {2, 3} -> 5, {3, 1} -> 3.9}, {3, 3}]OrderedSchurDecomposition[%]SparseArray[Band[{1, 1}, {-1, -1}] -> {{{1., 2.}, {2., 1.}}}, {4, 4}]OrderedSchurDecomposition[%]Ordered Schur decomposition of a structured matrix of type SymmetrizedArray:
s = SymmetrizedArray[{{1, 1} -> 2.2, {1, 2} -> 1.1, {3, 2} -> 5.7}, {3, 3}, Symmetric[All]]MatrixForm /@ Chop@OrderedSchurDecomposition[s]Generate a structured Vandermonde matrix:
v = VandermondeMatrix[{1, 2, 3}]The generalized Schur decomposition of the two structured matrices:
OrderedSchurDecomposition[{s, v}]IdentityMatrix has a trivial ordered Schur decomposition:
MatrixForm /@ OrderedSchurDecomposition[IdentityMatrix[4, WorkingPrecision -> MachinePrecision]]Ordered Schur decomposition of HilbertMatrix:
MatrixForm /@ OrderedSchurDecomposition[HilbertMatrix[3, WorkingPrecision -> MachinePrecision]]//ChopNow order the eigenvalues by increasing magnitude:
MatrixForm /@ OrderedSchurDecomposition[HilbertMatrix[3, WorkingPrecision -> MachinePrecision], "IncreasingAbs"]//ChopOptions (4)
RealBlockDiagonalForm (1)
m is a matrix with two real and two complex eigenvalues:
m = {{0, 1, 0, 0}, {0, 0, -1, 0}, {0, 0, 0, 1}, {-1, 0, 0, 0}};
Eigenvalues[m]With RealBlockDiagonalForm->False, the result is complex upper triangular:
{q, t} = OrderedSchurDecomposition[N[m], RealBlockDiagonalForm -> False, TargetStructure -> "Structured"]MatrixForm[Chop@t]With RealBlockDiagonalForm->True, there are real 2×2 blocks along the diagonal:
{q, t} = OrderedSchurDecomposition[N[m], TargetStructure -> "Structured"]MatrixForm[Chop@t]TargetStructure (3)
By default, structured matrices are returned:
m = RandomReal[1, {4, 4}];
OrderedSchurDecomposition[m]This is equivalent to setting TargetStructure->"Structured":
% === OrderedSchurDecomposition[m, TargetStructure -> "Structured"]Use TargetStructure->"Dense" to get the results as normal lists:
OrderedSchurDecomposition[RandomReal[1, {4, 4}], TargetStructure -> "Dense"]Use TargetStructure->"Sparse" to get the results as SparseArray objects:
OrderedSchurDecomposition[RandomReal[1, {4, 4}], TargetStructure -> "Sparse"]Note, however, that only the triangular matrix is likely to be even partly sparse:
Comap[%, "Density"]Applications (1)
A matrix m is unitarily equivalent to a diagonal matrix if and only if NormalMatrixQ[m] is true. The ordered Schur decomposition gives the next best reduction—unitary equivalences to a triangular matrix—for a general matrix. Consider a non-normal matrix:
m = {{2.7, 4.8, 8.1}, {-.6, 0, 0}, {.1, 0, .3}};
NormalMatrixQ[m]The ordered Schur decomposition gives equivalence to a triangular matrix:
{q, t} = OrderedSchurDecomposition[m];
MatrixForm /@ {q, t}The eigenvalues, since they are real, occur on the diagonal of t:
Diagonal[t]Eigenvalues[m]Properties & Relations (14)
OrderedSchurDecomposition[m] gives matrices
and
such that
:
m = RandomReal[1, {3, 3}];
{q, t} = OrderedSchurDecomposition[m];
Chop[m - q.t.ConjugateTranspose[q]]In {q,t}=OrderedSchurDecomposition[m], q is always a unitary matrix:
q = First[OrderedSchurDecomposition[RandomReal[1, {3, 3}]]];
UnitaryMatrixQ[q]If m is real valued, q is also orthogonal:
OrthogonalMatrixQ[q]OrderedSchurDecomposition and SchurDecomposition will have the same entries on the diagonal of the triangular matrix:
m = (| | | |
| -- | -- | -- |
| 1. | 2. | 3. |
| 6. | 5. | 4. |
| 7. | 8. | .9 |);{q, r} = SchurDecomposition[m];{oq, or} = OrderedSchurDecomposition[m];
Sort[Diagonal[r]] === Sort[Diagonal[or]]However, the matrices will rarely be identical:
MatrixForm /@ {r, or}In {q,t}=OrderedSchurDecomposition[m], t is upper triangular with respect to the first subdiagonal:
t = Last[OrderedSchurDecomposition[(| | | |
| -- | --- | ---- |
| 0 | 2 | -1 |
| -2 | 0 | -1.5 |
| 1 | 1.5 | 0 |)]];
UpperTriangularMatrixQ[t, -1]t need not be strictly upper triangular:
UpperTriangularMatrixQ[t]If the matrix m has complex entries, the t matrix is always strictly upper triangular:
m = RandomComplex[1 + I, {3, 3}];
t = Last[OrderedSchurDecomposition[m]];
UpperTriangularMatrixQ[t]The diagonal entries of t are the eigenvalues of m, possibly with a different ordering:
Sort[Eigenvalues[m]] == Sort[Diagonal[t]]For a real-valued matrix m, the real eigenvalues appear on t's diagonal, the complex ones as 2×2 blocks:
m = N[{{0, 1, 0, 0}, {0, 0, -2, 0}, {0, 0, 0, 3}, {-4, 0, 0, 0}}];
Eigenvalues[m]//ChopMatrixForm[Last[OrderedSchurDecomposition[m]]//Chop]For a real-valued matrix m, the real eigenvalues appear on t's diagonal, the complex ones as 2×2 blocks:
m = (| | | |
| --- | ---- | - |
| 1.5 | -2.5 | 1 |
| 3.5 | 4.5 | 1 |
| 0 | 0 | 5 |);λ = Eigenvalues[m]//Chop(t = Last[OrderedSchurDecomposition[m]])//MatrixFormThe complex eigenvalues can be recovered from the 2×2 blocks
as
:
(| | |
| - | - |
| a | b |
| c | d |) = t[[2 ;; 3, 2 ;; 3]];
{a + Sqrt[b c], a - Sqrt[b c]} == Rest[λ]For a Hermitian matrix, the
matrix is always diagonal:
m = RandomVariate[GaussianUnitaryMatrixDistribution[5]];
{HermitianMatrixQ[m], DiagonalMatrixQ[Last[OrderedSchurDecomposition[m]]]}m and a are random 3×3 matrices:
m = RandomReal[1, {3, 3}];
a = RandomReal[1, {3, 3}];Find the generalized ordered Schur decomposition of m with respect to a:
{q, s, p, t} = SchurDecomposition[{m, a}];Verify that m is given by q.s.ConjugateTranspose[p]:
Chop[m - q.s.ConjugateTranspose[p]]Verify that a is given by q.t.ConjugateTranspose[p]:
Chop[a - q.t.ConjugateTranspose[p]]In {q,s,p,t}=SchurDecomposition[{m,a},RealBlockDiagonalFormFalse], the ratio of the diagonals of s and t equals the generalized eigenvalues of m with respect to a:
m = RandomReal[1, {3, 3}];
a = RandomReal[1, {3, 3}];
{q, s, p, t} = OrderedSchurDecomposition[{m, a}, RealBlockDiagonalForm -> False];
Sort[(Diagonal[s]/Diagonal[t])] - Sort[Eigenvalues[{m, a}]]//ChopFor a real symmetric matrix
, the ordered Schur decomposition is composed of eigenvalues and eigenvectors:
m = (| | | | |
| ------------------ | ------------------ | ------------------ | ------------------ |
| 1.1652576428605448 | 0.9846995702544104 | 0.5806547295410434 | 1.3945572775364556 |
| 0.9846995702544104 | 1.840558970840514 | 1.0265125179110766 | 1.7955284674981589 |
| 0.5806547295410434 | 1.0265125179110766 | 1.6452204456727344 | 0.5238323802096518 |
| 1.3945572775364556 | 1.7955284674981589 | 0.5238323802096518 | 1.9445709705201013 |);{q, t} = OrderedSchurDecomposition[m];
is a diagonal matrix with the eigenvalues of
along the diagonal:
Chop[t]//MatrixFormEigenvalues[m] The columns of
are the eigenvectors of
:
q//MatrixFormTranspose[Eigenvectors[m]]//MatrixFormOrderedSchurDecomposition[n,RealBlockDiagonalFormFalse] for a numerical normal matrix
:
n = {{1., 3., -1.}, {-1., 1., 3.}, {3., -1., 1.}};
NormalMatrixQ[n]{q, t} = SchurDecomposition[n, RealBlockDiagonalForm -> False]//ChopUp to phase, this coincides with the Jordan decomposition:
{s, j} = JordanDecomposition[n]//ChopThe t and j matrices are equal:
t == jTo verify that q has eigenvectors as columns, set the first entry of each column to 1. to eliminate phase differences between q and s:
((#1/First[q])& /@ q) - ((#1/First[s])& /@ s)//ChopFor real m, OrderedSchurDecomposition[m] returns OrthogonalMatrix and BlockUpperTriangularMatrix objects:
m = RandomReal[1, {4, 4}];
OrderedSchurDecomposition[m]When RealBlockDiagonalForm False is set, UnitaryMatrix and UpperTriangularMatrix objects are returned instead:
OrderedSchurDecomposition[m, RealBlockDiagonalForm -> False]Those objects are also used by default when the input is complex:
OrderedSchurDecomposition[RandomComplex[1 + I, {4, 4}]]For real m and a, OrderedSchurDecomposition[{m,a}] returns OrthogonalMatrix, BlockUpperTriangularMatrix and UpperTriangularMatrix objects:
m = RandomReal[1, {4, 4}];
a = RandomReal[1, {4, 4}];
OrderedSchurDecomposition[{m, a}]When RealBlockDiagonalForm False is set, UnitaryMatrix and UpperTriangularMatrix objects are returned instead:
OrderedSchurDecomposition[{m, a}, RealBlockDiagonalForm -> False]Those objects are also used by default when the input is complex:
c = RandomComplex[1 + I, {4, 4}];
OrderedSchurDecomposition[{m, c}]Related Guides
History
Text
Wolfram Research (2026), OrderedSchurDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/OrderedSchurDecomposition.html.
CMS
Wolfram Language. 2026. "OrderedSchurDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OrderedSchurDecomposition.html.
APA
Wolfram Language. (2026). OrderedSchurDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OrderedSchurDecomposition.html
BibTeX
@misc{reference.wolfram_2026_orderedschurdecomposition, author="Wolfram Research", title="{OrderedSchurDecomposition}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/OrderedSchurDecomposition.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_orderedschurdecomposition, organization={Wolfram Research}, title={OrderedSchurDecomposition}, year={2026}, url={https://reference.wolfram.com/language/ref/OrderedSchurDecomposition.html}, note=[Accessed: 12-June-2026]}