yields the Schur decomposition for a numerical matrix m, given as a list {q,t} where q is a unitary matrix and t is a block upper‐triangular matrix.
SchurDecomposition[{m,a}]
gives the generalized Schur decomposition of m with respect to a.
SchurDecomposition
yields the Schur decomposition for a numerical matrix m, given as a list {q,t} where q is a unitary matrix and t is a block upper‐triangular matrix.
SchurDecomposition[{m,a}]
gives the generalized Schur decomposition of m with respect to a.
Details and Options
- The original matrix m is equal to q.t.ConjugateTranspose[q]. »
- The matrix m must be square.
- 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.
- SchurDecomposition[m,Pivoting->True] yields a list {q,t,d} where d is a permuted diagonal matrix such that m.d is equal to d.q.t.ConjugateTranspose[q]. »
- SchurDecomposition[{m,a}] yields a list of matrices {q,s,p,t} where q and p are orthonormal, s is block upper triangular, and
is upper triangular, such that m is given by q.s.ConjugateTranspose[p], and a is given by q.t.ConjugateTranspose[p] . » - For real-valued matrices m, setting the option RealBlockDiagonalForm->False allows complex values on the diagonal of the t matrix. These will be the eigenvalues of m.
- With the setting TargetStructure->"Structured", SchurDecomposition[m] returns the matrices {q,t} as structured matrices.
- With the setting TargetStructure->"Structured", SchurDecomposition[{m,a}] returns the matrices {q,s,p,t} as structured matrices.
Examples
open all close allBasic Examples (1)
Find the 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//MatrixFormScope (12)
Basic Uses (5)
Find the Schur decomposition of a machine-precision matrix:
SchurDecomposition[{{-1.2, 2.7, 3.8}, {4.2, 4.4, 5.3}, {3.5, 7.6, 6.8}}]MatrixForm /@ %Schur decomposition of a complex matrix:
MatrixForm /@ SchurDecomposition[{{π, .3}, {I, 1 + 1.5 I}}]Schur decomposition of an arbitrary-precision matrix:
MatrixForm /@ SchurDecomposition[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 Schur decomposition:
{q, t} = SchurDecomposition[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]}RealBlockDiagonalFormFalse makes
upper triangular at the cost of complex entries:
MatrixForm /@ SchurDecomposition[m, RealBlockDiagonalForm -> False]The Schur decomposition of large numerical matrices is computed efficiently:
m = RandomReal[{0, 5}, {100, 100}];SchurDecomposition[m] ;//TimingGeneralized Decomposition (3)
Generalized 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} = SchurDecomposition[{m, a}];Map[MatrixForm, {q, s, p, t}]m - q.s.ConjugateTranspose[p]//Chopa - q.t.ConjugateTranspose[p]//ChopGeneralized Schur decomposition for a pair of complex matrices:
m = RandomComplex[1 + I, {3, 3}];a = RandomComplex[1 + I, {3, 3}];{q, s, p, t} = SchurDecomposition[{m, a}];{m - q.s.ConjugateTranspose[p], a - q.t.ConjugateTranspose[p]}//ChopGeneralized 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} = SchurDecomposition[{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)
Schur decomposition of sparse matrices:
SparseArray[{{1, 1} -> 3.1, {1, 2} -> 2, {2, 3} -> 5, {3, 1} -> 3.9}, {3, 3}]MatrixForm /@ SchurDecomposition[%]SparseArray[Band[{1, 1}, {-1, -1}] -> {{{1., 2.}, {2., 1.}}}, {4, 4}]MatrixForm /@ SchurDecomposition[%]Schur decomposition of a structured matrix of type SymmetrizedArray:
SymmetrizedArray[{{1, 1} -> 2.2, {1, 2} -> 1.1, {3, 2} -> 5.7}, {3, 3}, Symmetric[All]]MatrixForm /@ Chop@SchurDecomposition[%]IdentityMatrix has a trivial Schur decomposition:
MatrixForm /@ SchurDecomposition[IdentityMatrix[4, WorkingPrecision -> MachinePrecision]]Schur decomposition of HilbertMatrix:
MatrixForm /@ SchurDecomposition[HilbertMatrix[3, WorkingPrecision -> MachinePrecision]]Options (6)
Pivoting (1)
m = {{0, 0, 10^6}, {0, 10^-6, 0}, {-1, 0, 0}};With Pivoting->True, an extra matrix that represents the scaling and permutation is returned:
{q, t, d} = SchurDecomposition[N[m], Pivoting -> True]Map[MatrixForm, %]Verify that m.d is equal to d.q.t.ConjugateTranspose[q]:
Chop[m.d - d.q.t.ConjugateTranspose[q]]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} = SchurDecomposition[N[m], RealBlockDiagonalForm -> False];MatrixForm[Chop@t]With RealBlockDiagonalForm->True, there are real 2×2 blocks along the diagonal:
{q, t} = SchurDecomposition[N[m]];MatrixForm[Chop@t]TargetStructure (4)
ma = RandomReal[1, {4, 4}]With TargetStructure->"Dense", the result of SchurDecomposition is a list of two dense matrices:
SchurDecomposition[ma, TargetStructure -> "Dense"]With TargetStructure->"Structured", the result of SchurDecomposition is a list containing an OrthogonalMatrix and a BlockUpperTriangularMatrix:
SchurDecomposition[ma, TargetStructure -> "Structured"]ma = RandomComplex[1 + I, {4, 4}]With TargetStructure->"Dense", the result of SchurDecomposition is a list of two dense matrices:
SchurDecomposition[ma, TargetStructure -> "Dense"]With TargetStructure->"Structured", the result of SchurDecomposition is a list containing a UnitaryMatrix and an UpperTriangularMatrix:
SchurDecomposition[ma, TargetStructure -> "Structured"]ma = RandomReal[1, {4, 4}];
mb = RandomReal[1, {4, 4}];With TargetStructure->"Dense", the result of SchurDecomposition is a list of four dense matrices:
SchurDecomposition[{ma, mb}, TargetStructure -> "Dense"]With TargetStructure->"Structured", the result of SchurDecomposition is a list containing two OrthogonalMatrix objects, a BlockUpperTriangularMatrix and an UpperTriangularMatrix:
SchurDecomposition[{ma, mb}, TargetStructure -> "Structured"]ma = RandomComplex[1 + I, {4, 4}];
mb = RandomComplex[1 + I, {4, 4}];With TargetStructure->"Dense", the result of SchurDecomposition is a list of four dense matrices:
SchurDecomposition[{ma, mb}, TargetStructure -> "Dense"]With TargetStructure->"Structured", the result of SchurDecomposition is a list containing two UnitaryMatrix objects and two UpperTriangularMatrix objects:
SchurDecomposition[{ma, mb}, TargetStructure -> "Structured"]Applications (3)
A matrix m is unitarily equivalent to a diagonal matrix if and only if NormalMatrixQ[m] is true. The 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 Schur decomposition gives equivalence to a triangular matrix:
{q, t} = SchurDecomposition[m];
MatrixForm /@ {q, t}The eigenvalues, since they are real, occur on the diagonal of t:
Diagonal[t]Eigenvalues[m]Schur decomposition can be viewed as a process of finding a nested sequence of eigenvectors for
matrices that extend to the bottom-right corner. Consider the following matrix
:
m = (| | | |
| --- | -- | -- |
| 10. | 1. | 3. |
| 10. | 7. | 3. |
| 8. | 4. | 2. |);The eigenvalues of this matrix are real, so the decomposition will be real and upper triangular:
λ = Eigenvalues[m]Construct an orthonormal basis for
starting with the first eigenvector of
:
e1 = First[Eigenvectors[m]];
e2 = Normalize[e1⨯{1, 0, 0}];
e3 = Normalize[e1⨯e2];
u = {e1, e2, e3};
UnitaryMatrixQ[u]Because
and
are orthonormal to the eigenvector
, transforming
to this basis puts zeros below the diagonal in the first column:
u.m.u//Chop//MatrixFormExtract the 2×2 bottom-right matrix; its eigenvalues are the remaining eigenvalues of
:
m2 = %[[2 ;; 3, 2 ;; 3]];
Eigenvalues[m2]Find an orthonormal basis for
that includes the first eigenvector of
, and embed it in
:
With[{v = First[Eigenvectors[m2, 1]]}, (u2 = {{1, 0, 0}, Prepend[v, 0], Prepend[Cross[v], 0]})//MatrixForm]q = Transpose[u2.u];
{q//MatrixForm, q.m.q//Chop//MatrixForm}Comparing with SchurDecomposition, the results are the same up to the signs of the columns of
:
MatrixForm /@ SchurDecomposition[m]A simple method for computing the Schur decomposition is the unshifted QR algorithm. Starting with
and
, at each stage compute the QR decomposition
of
. Then let
and
. In the limit,
converges to the desired
matrix and
converges to the desired
matrix (for well-behaved input matrices). Apply this method to the following matrix
:
m = (| | | |
| ------------------ | ------------------- | ------------------- |
| 0.7161744866716866 | 0.07422085158163272 | 0.8700709414631831 |
| 0.91910497743796 | 0.10229943091824745 | 0.40435757058687893 |
| 0.9535704817398836 | 0.24185992322714034 | 0.14200791297801518 |);Compute the decomposition using 100 iterations of the QR algorithm:
t = m;q = IdentityMatrix[3];
Do[
{𝕢, r} = QRDecomposition[t];
t = r.Transpose[𝕢];
q = q.𝕢,
{100}];By construction, the resulting
matrix is orthogonal:
OrthogonalMatrixQ[q]Although it might not look it, the
is upper triangular; entries below the diagonal are numerical noise:
{UpperTriangularMatrixQ[t], t//MatrixForm}Compute the decomposition using SchurDecomposition:
{qs, ts} = SchurDecomposition[m];Up to overall sign, the two
matrices seem to agree:
{qs//MatrixForm, q//MatrixForm}The entries differ in numerical noise:
Norm[qs + q, "Frobenius"]The matrix
looks more obviously upper triangular than
:
ts//MatrixFormBut again, the differences between
and
amount to numerical noise:
Norm[t - ts, "Frobenius"]Properties & Relations (11)
SchurDecomposition[m] gives matrices
and
such that
:
m = RandomReal[1, {3, 3}];
{q, t} = SchurDecomposition[m];
Chop[m - q.t.ConjugateTranspose[q]]In {q,t}=SchurDecomposition[m], q is always a unitary matrix:
q = First[SchurDecomposition[RandomReal[1, {3, 3}]]];
UnitaryMatrixQ[q]If m is real-valued, q is also orthogonal:
OrthogonalMatrixQ[q]In {q,t}=SchurDecomposition[m], t is upper triangular with respect to the first subdiagonal:
t = Last[SchurDecomposition[(| | | |
| -- | --- | ---- |
| 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[SchurDecomposition[m]];
UpperTriangularMatrixQ[t]The diagonal entries of t are the eigenvalues of m, though not necessarily in any particular order:
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[SchurDecomposition[m]]//Chop]For a real-valued matrix
, complex eigenvalues produce 2×2 blocks of the form
in the
matrix:
m = {{1.5, -2.5}, {3.5, 4.5}};
MatrixForm[{{a, b}, {c, d}} = Last[SchurDecomposition[m]]]The corresponding complex eigenvalues can be recovered from the entries of the block as
:
Eigenvalues[m]% == {a + Sqrt[b c], a - Sqrt[b c]}For a Hermitian matrix, the
matrix is always diagonal:
m = RandomVariate[GaussianUnitaryMatrixDistribution[5]];
{HermitianMatrixQ[m], DiagonalMatrixQ[Last[SchurDecomposition[m]]]}m and a are random 3×3 matrices:
m = RandomReal[1, {3, 3}];
a = RandomReal[1, {3, 3}];Find the generalized 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} = SchurDecomposition[{m, a}, RealBlockDiagonalForm -> False];
Sort[(Diagonal[s]/Diagonal[t])] - Sort[Eigenvalues[{m, a}]]//ChopFor a real symmetric matrix
, the 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} = SchurDecomposition[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]]//MatrixFormSchurDecomposition[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)//ChopPossible Issues (1)
SchurDecomposition only works with approximate numerical matrices:
m = {{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}};SchurDecomposition[m]For exact matrices, numericize the entries first:
SchurDecomposition[N[m]]Alternatively, use JordanDecomposition:
JordanDecomposition[m]Related Guides
History
Introduced in 1991 (2.0) | Updated in 2003 (5.0) ▪ 2008 (7.0) ▪ 2024 (14.0)
Text
Wolfram Research (1991), SchurDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/SchurDecomposition.html (updated 2024).
CMS
Wolfram Language. 1991. "SchurDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/SchurDecomposition.html.
APA
Wolfram Language. (1991). SchurDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SchurDecomposition.html
BibTeX
@misc{reference.wolfram_2026_schurdecomposition, author="Wolfram Research", title="{SchurDecomposition}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/SchurDecomposition.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_schurdecomposition, organization={Wolfram Research}, title={SchurDecomposition}, year={2024}, url={https://reference.wolfram.com/language/ref/SchurDecomposition.html}, note=[Accessed: 12-June-2026]}