yields the Jordan decomposition of a square matrix m. The result is a list {s,j} where s is a similarity matrix and j is the Jordan canonical form of m.
JordanDecomposition
yields the Jordan decomposition of a square matrix m. The result is a list {s,j} where s is a similarity matrix and j is the Jordan canonical form of m.
Details
- The original matrix m is equal to s.j.Inverse[s]. »
- The matrix m can be either numerical or symbolic.
- The j matrix is called the Jordan normal form or Jordan canonical form.
- The Jordan normal form of a matrix is block diagonal with eigenvalues appearing by multiplicity on the main diagonal. The first superdiagonal can contain ones where there are nontrivial Jordan blocks from multiple eigenvalues. All other elements are zero.
- Each eigenvalue determines a block, and eigenvalues with multiplicity always appear together in the same block. They may be split into subblocks. A new subblock is indicated by not having a one above the eigenvalue, that is, in the position of the superdiagonal.
- The length of a block is the algebraic multiplicity of the eigenvalue. The number of subblocks is the geometric multiplicity and is the same as the dimension of the subspace spanned by linearly independent eigenvectors for that eigenvalue. This subspace is called the eigenspace for its eigenvalue.
- Each subblock is associated to a distinct eigenvector v from the eigenspace; taken together, these span that space. Subsequent vectors associated to a subblock are called generalized eigenvectors. For a matrix m and eigenvalue λ, the jth such vector vj is related to the true eigenvector of the subblock by the equation (m-λ imat)j.vj=v. Here imat is the identity matrix of the same size as m, and the exponent denotes the matrix power.
- The Jordan normal form is unique up to ordering of blocks and ordering of subblocks within blocks. Reorderings correspond to changes in the similarity matrices.
- When all eigenvalues have multiplicity 1, the Jordan normal form is the same up to ordering as the diagonal matrix comprised of those eigenvalues. This holds more generally when there are no ones on the superdiagonal, even if some eigenvalues have nontrivial multiplicity. In such cases, the similarity transformation is simply the transpose of the corresponding matrix of eigenvectors.
- Square matrices m1 and m2 with the same dimensions are said to be similar if there is an invertible matrix s of the same dimension such that m2=s.m1.Inverse[s]. Similar matrices have the same Jordan normal form.
Examples
open all close allBasic Examples (1)
Scope (10)
Basic Uses (6)
Jordan decomposition of a machine-precision matrix:
JordanDecomposition[{{-1.2, 2.7, 3.8}, {4.2, 4.4, 5.3}, {3.5, 7.6, 6.8}}]MatrixForm /@ %Jordan decomposition of a complex matrix:
{s, j} = JordanDecomposition[{{π, .3}, {I, 1 + 1.5 I}}];{s//MatrixForm, j//MatrixForm}Jordan decomposition of an exact matrix with a deficient eigenspace:
m = {{-103, -191, -255}, {110, 190, 222}, {9, 9, 33}};
{s, j} = JordanDecomposition[m];MatrixForm /@ {s, j}The one in the third column of
indicates that the eigenspace corresponding to 48 is deficient:
Eigensystem[m]The third column of
is therefore a generalized eigenvector where
gives
rather than
:
(m - 48 IdentityMatrix[3]).s[[All, 3]]Check that the decomposition correctly recovers the input matrix:
s.j.Inverse[s] - mJordan decomposition of an arbitrary-precision matrix:
JordanDecomposition[RandomReal[4, {3, 3}, WorkingPrecision -> 20]]Jordan decomposition of a symbolic matrix:
JordanDecomposition[(| | |
| :---- | :---- |
| a1, 1 | a1, 2 |
| a2, 1 | a2, 2 |)]The Jordan decomposition of large numerical matrices is computed efficiently:
m = RandomReal[{0, 5}, {100, 100}];JordanDecomposition[m] ;//TimingSpecial Matrices (4)
Jordan decomposition of sparse matrices:
SparseArray[{{1, 1} -> 3.1, {1, 2} -> 2, {2, 3} -> 5, {3, 1} -> 3.9}, {3, 3}]MatrixForm /@ JordanDecomposition[%]SparseArray[Band[{1, 1}, {-1, -1}] -> {{{1, 2}, {2, 1}}}, {4, 4}]MatrixForm /@ JordanDecomposition[%]Jordan decompositions of structured matrices:
SymmetrizedArray[{{1, 1} -> 2.2, {1, 2} -> 1.1, {3, 2} -> 5.7}, {3, 3}, Symmetric[All]]MatrixForm /@ JordanDecomposition[%]IdentityMatrix is a Jordan canonical form:
id = IdentityMatrix[4];
{s, j} = JordanDecomposition[id];j == idThe associated similarity matrix is a square root of the identity:
s//MatrixForms.s == idJordan decomposition of a HilbertMatrix:
Map[MatrixForm, JordanDecomposition[HilbertMatrix[2]]]Applications (13)
Generalized Eigenvectors and Diagonalizability (4)
For the matrix
, interpret the columns of the
matrix of the Jordan decomposition in terms of true eigenvectors and generalized eigenvectors:
m = (| | | | |
| - | - | -- | -- |
| 2 | 4 | -6 | 0 |
| 4 | 6 | -3 | -4 |
| 0 | 0 | 4 | 0 |
| 0 | 4 | -6 | 2 |);Compute the Jordan decomposition:
{s, j} = JordanDecomposition[m];
MatrixForm /@ {s, j}Columns of
for which there is no
above the diagonal in the corresponding of
—columns 1, 3 and 4—are true eigenvectors for which
:
Table[(m - Subscript[j, [[i, i]]]IdentityMatrix[4]).Subscript[s, [[All, i]]] == {0, 0, 0, 0}, {i, {1, 3, 4}}]The remaining column is a generalized eigenvector for which
:
(m - Subscript[j, [[2, 2]]]IdentityMatrix[4]).Subscript[s, [[All, 2]]] == Subscript[s, [[All, 1]]]Show that the following matrix only has a single eigenvector, but it has a complete chain of generalized eigenvectors that form a basis for
:
m = (| | | | |
| ---- | --- | ---- | --- |
| -223 | 602 | -145 | 215 |
| -75 | 218 | -25 | 51 |
| 13 | -66 | 99 | 19 |
| -186 | 368 | -110 | 242 |);Eigensystem shows 84 is an eigenvalue of multiplicity 4 that has just one independent eigenvector:
Eigensystem[m]The first column of the
matrix of JordanDecomposition is the one eigenvector found:
{s, j} = JordanDecomposition[m];
MatrixForm /@ {s, j}The remaining columns are a chain for which
:
Table[(m - 84IdentityMatrix[4]).Subscript[s, [[All, i]]] == Subscript[s, [[All, i - 1]]], {i, 2, 4}]Since
has an empty NullSpace, its columns form a basis for
:
NullSpace[s]A square matrix has a complete set of eigenvectors, and thus is diagonalizable, iff its
matrix is diagonal:
DiagonalizableQ[m_ ? MatrixQ /; Apply[Equal, Dimensions[m]]] := Module[{s, j},
{s, j} = JordanDecomposition[m];
DiagonalMatrixQ[j]
];Test if a particular matrix is diagonalizable:
DiagonalizableQ[{{0, 1}, {0, 0}}]Confirm using DiagonalizableMatrixQ:
DiagonalizableMatrixQ[{{0, 1}, {0, 0}}]Estimate the probability that a 4×4 matrix of ones and zeros will be diagonalizable:
Block[{trials = 100, count = 0},
Do[If[DiagonalizableQ[RandomInteger[1, {4, 4}]], count++], {trials}];
N[count / trials]
]An
×
matrix
is nilpotent if
for some
:
q = {{0, 1}, {0, 0}};
MatrixPower[q, 2]Consider a non-diagonalizable matrix
:
m = {{2, 4, -6, 0}, {4, 6, -3, -4}, {0, 0, 4, 0}, {0, 4, -6, 2}};DiagonalizableMatrixQ[m]
can be written as a sum of a diagonalizable matrix and a nilpotent matrix using JordanDecomposition:
{s, j} = JordanDecomposition[m]Let
be the matrix formed from
and the diagonal part of
:
d = s.DiagonalMatrix[Diagonal[j]].Inverse[s]Let
be the matrix formed from
and the superdiagonal part of
:
q = s.DiagonalMatrix[Diagonal[j, 1], 1].Inverse[s]m == d + qDiagonalizableMatrixQ[d]With[{n = Length[q]}, MatrixPower[q, n] == ConstantArray[0, {n, n}]]Moreover, the matrices
and
commute:
d.q == q.dSimilar Matrices (5)
A matrix m1 and a random invertible matrix s give a similar matrix m2:
SeedRandom[1234];
m1 = {{9, -7, 3}, {12, -10, 3}, {16, -16, 1}};
s = RandomInteger[{-2, 2}, {3, 3}];
m2 = s.m1.Inverse[s];
MatrixForm /@ {m1, m2}The Jordan decomposition of m1:
{s1, j1} = JordanDecomposition[m1]The Jordan decomposition of m2:
{s2, j2} = JordanDecomposition[m2]Similar matrices share their Jordan form:
j1 == j2vecs = Eigenvectors[m1]Since the eigenvalues are all distinct, the eigenvectors agree with the transpose of the similarity transform up to ordering and multiplication by constants:
Transpose[s1]For a diagonalizable matrix, the Jordan decomposition directly gives a diagonalization as
. Apply this to diagonalize the matrix
:
m = {{9, -7, 3}, {12, -10, 3}, {16, -16, 1}};Compute the Jordan decomposition:
{s, j} = JordanDecomposition[m];
MatrixForm /@ {s, j}m == s.j.Inverse[s]Let
be the linear transformation whose standard matrix is given by the matrix
. Find a basis
for
with the property that the representation of
in that basis
is diagonal:
a = (| | | | |
| -- | -- | - | - |
| -6 | 4 | 0 | 9 |
| -3 | 0 | 1 | 6 |
| -1 | -2 | 1 | 0 |
| -4 | 4 | 0 | 7 |);Find the Jordan decomposition of
:
{s, j} = JordanDecomposition[a]Let
consist of the eigenvectors, i.e the columns of
. As
converts from
-coordinates to standard coordinates, its inverse converts in the reverse direction:
sInv = Inverse[s]Thus
is given by
, which is diagonal:
sInv . a .s//MatrixFormNote that this is simply the diagonal matrix whose entries are the eigenvalues:
% == DiagonalMatrix[Eigenvalues[a]]A real-valued symmetric matrix
is orthogonally diagonalizable as
, with
diagonal and real valued and
orthogonal. Verify that the following matrix is symmetric and then diagonalize it:
(h = {{1, 4, -2}, {4, 5, -3}, {-2, -3, 2}})//MatrixFormTranspose[h] == hCompute the Jordan decomposition:
{s, j} = JordanDecomposition[h];(d = j)//MatrixFormLet
equal
after normalizing its columns:
(o = Transpose[Normalize /@ Transpose[s]]//FullSimplify)//MatrixFormConfirm that
is indeed orthogonal:
OrthogonalMatrixQ[o]h == o.d.Transpose[o]//FullSimplifyA matrix is called normal if
. Normal matrices are the most general kind of matrix that can be diagonalized by a unitary transformation. All real symmetric matrices
are normal because both sides of the equality are simply
:
TensorExpand[ConjugateTranspose[h].h == h.ConjugateTranspose[h] == h.h, Assumptions -> h∈Matrices[{dim, dim}, Reals, Symmetric[{1, 2}]]]Show that the following matrix is normal, then diagonalize it:
(n = {{3, -1}, {1, 3}})//MatrixFormn.ConjugateTranspose[n] == ConjugateTranspose[n].nConfirm using NormalMatrixQ:
NormalMatrixQ[n]Compute the Jordan decomposition:
{s, j} = JordanDecomposition[n];Unlike a real symmetric matrix, the diagonal matrix is complex valued:
(d = j)//MatrixFormNormalizing the columns of
gives a unitary matrix:
(u = Transpose[Normalize /@ Transpose[s]]//FullSimplify)//MatrixFormUnitaryMatrixQ[u]n == u.d.ConjugateTranspose[u]Matrix Functions and Dynamical Systems (4)
Use the Jordan decomposition to compute
and
for the following matrix
:
m = (| | | | |
| - | - | -- | -- |
| 2 | 4 | -6 | 0 |
| 4 | 6 | -3 | -4 |
| 0 | 0 | 4 | 0 |
| 0 | 4 | -6 | 2 |);{s, j} = JordanDecomposition[m];
MatrixForm /@ {s, j}m == s.j.Inverse[s]Then
. Since
is upper triangular and nearly diagonal, the diagonal entries are raised to the power
, and the entry
becomes
:
MatrixPower[j, k]//MatrixForms.%.Inverse[s]//FullSimplify//MatrixFormConfirm with direct computation by MatrixPower:
MatrixPower[m, k] == %//FullSimplifyApplying the power series for the exponential, the diagonal entries obviously become
, and the off-diagonal term is merely a re-indexed exponential sum. Thus, it too becomes
:
Sum[(MatrixPower[j, k]/k!), {k, 0, ∞}]//MatrixForms.%.Inverse[s]//FullSimplify//MatrixFormConfirm using a direction computation by MatrixExp:
MatrixExp[m] == %Confirm the formula
for a Jordan matrix consisting of a single chain for the following matrix
and the functions
,
and
:
(j = {{π / 3, 1, 0}, {0, π / 3, 1}, {0, 0, π / 3}})//MatrixFormFirst compute the formula for
:
{{Sin[π / 3], Sin'[π / 3], Sin''[π / 3] / 2}, {0, Sin[π / 3], Sin'[π / 3]}, {0, 0, Sin[π / 3]}}//MatrixFormVerify the computation using MatrixFunction:
% == MatrixFunction[Sin, j]The computation for
is analogous:
{{Log[π / 3], Log'[π / 3], Log''[π / 3] / 2}, {0, Log[π / 3], Log'[π / 3]}, {0, 0, Log[π / 3]}}//MatrixFormMatrixFunction confirms the result:
% == MatrixFunction[Log, j]As
has a parameter, it is necessary to use D instead of Derivative and substitute in
:
{{Exp[t x], D[Exp[t x], x], (D[Exp[t x], {x, 2}]/2!)}, {0, Exp[t x], D[Exp[t x], x]}, {0, 0, Exp[t x]} } /. x -> π / 3//MatrixFormAgain, MatrixFunction confirms the result when
is entered using Function:
% == MatrixFunction[x |-> Exp[t x], j]Solve the system of ODEs
,
,
. First, construct the coefficient matrix
for the right-hand side:
(a = {{-5, -4, 6}, {3, 4, -3}, {-4, -2, 5}})//MatrixFormCompute the Jordan decomposition of
:
{s, j} = JordanDecomposition[a];
MatrixForm /@ {s, j}Using the formula of the previous example,
is given by:
(exptj = {{Exp[t], t Exp[t], 0}, {0, Exp[t], 0}, {0, 0, Exp[2t]}})//MatrixFormThe general solution is
, for three arbitrary starting values:
s.exptj.Inverse[s] . {C[1], C[2], C[3]}//FullSimplify//MatrixFormVerify the solution using DSolveValue:
Simplify[% == DSolveValue[{x'[t] == -5x[t] - 4y[t] + 6z[t], y'[t] == 3x[t] + 4y[t] - 3z[t], z'[t] == -4x[t] - 2y[t] + 5z[t]}, {x[t], y[t], z[t]}, t]]Produce the general solution of the dynamical system
when
is the following stochastic matrix:
a = (| | | |
| ------- | ------- | ------- |
| (9/10) | (1/100) | (9/100) |
| (1/100) | (9/10) | (1/100) |
| (9/100) | (9/100) | (9/10) |);Compute the Jordan decomposition of
:
{s, j} = JordanDecomposition[a]Since the
is diagonal,
consists of merely raising the diagonal entries to the power
:
jk = MatrixPower[j, k]x[k_] = s.jk.Inverse[s].Table[C[i], {i, 3}]//FullSimplifyVerify that
satisfies the dynamical equation:
x[k] == a.x[k - 1]//SimplifyProperties & Relations (11)
JordanDecomposition[m] gives a matrix factorization of m as s.j.Inverse[s]:
m = {{2, 0, 0, 0}, {0, 1, 0, 0}, {1, -1, 1, 0}, {1, -1, 1, 1}};Find the Jordan decomposition:
{s, j} = JordanDecomposition[m]Map[MatrixForm, %]m is equal to s.j.Inverse[s]:
m == s.j.Inverse[s]The eigenvalues of m are on the diagonal of j:
Eigenvalues[m]A matrix is diagonalizable iff the j matrix of its Jordan decomposition is diagonal:
m = (| | | |
| - | - | - |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
| 0 | 0 | 1 |);{DiagonalizableMatrixQ[m], DiagonalMatrixQ[Last[JordanDecomposition[m]]]}m = (| | | |
| - | - | - |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
| 0 | 1 | 1 |);{DiagonalizableMatrixQ[m], DiagonalMatrixQ[Last[JordanDecomposition[m]]]}EigenvalueDecomposition[m] exists if and only if m's Jordan matrix is diagonal:
nd = {{27, 48, 81}, {-6, 0, 0}, {1, 0, 3}}
EigenvalueDecomposition[nd]The Jordan matrix of nd has a 1 above the diagonal:
MatrixForm /@ JordanDecomposition[nd]When the decomposition exists, it agrees with JordanDecomposition:
d = {{2, 1, 0}, {3, 7, 1}, {5, -1, -4}};
EigenvalueDecomposition[d] == JordanDecomposition[d]As expected, the Jordan matrix is diagonal in this case:
Last[JordanDecomposition[d]]//MatrixFormFor a diagonalizable matrix, JordanDecomposition reduces function application to application to eigenvalues:
m = N[{{0, 1, 0, -1}, {-1, 0, 1, 0}, {0, -1, 0, 1}, {1, 0, -1, 0}}];
{s, j} = JordanDecomposition[m];Compute the matrix exponential using diagonalization, exponentiating only the diagonal entries:
Chop[s.DiagonalMatrix[Exp[Diagonal[j]]].Inverse[s]]Compute the matrix exponential using MatrixExp:
MatrixExp[m]Note that this is not simply the exponential of each entry:
Exp[m]For a non-diagonalizable matrix, the Jordan decomposition restricts function application to each generalized eigenvector chain:
m = {{3, 7, -22, -6}, {7, 4, -20, -7}, {0, 0, -3, 0}, {6, 7, -21, -9}};{s, j} = JordanDecomposition[m];The j matrix is not diagonal, so m is not diagonalizable:
j//MatrixFormThe function application only extends above the diagonal for columns for which j had a 1 above the diagonal:
MatrixExp[j]//MatrixFormMatrixExp[m] == s.MatrixExp[j].Inverse[s]For a real symmetric numerical matrix, the
matrix is orthogonal:
h = {{1.5, .5, -.5}, {.5, 3.2, -1.7}, {-.5, -1.7, 2.2}};
SymmetricMatrixQ[h]{s, j} = JordanDecomposition[h];
OrthogonalMatrixQ[s]The
matrix is diagonal and real valued:
DiagonalMatrixQ[j] && j∈RealsFor a real antisymmetric numerical matrix, the
matrix is unitary:
a = N[{{0, 4, -2}, {-4, 0, -3}, {2, 3, 0}}];
AntisymmetricMatrixQ[a]{s, j} = JordanDecomposition[a]UnitaryMatrixQ[s]The
matrix is diagonal with pure imaginary diagonal entries:
DiagonalMatrixQ[j] && And @@ Thread[ Re[Diagonal[j]] == 0]For a real unitary numerical matrix, the
matrix is unitary:
u = N[{{1 / Sqrt[2], I / Sqrt[2]}, {I / Sqrt[2], 1 / Sqrt[2]}}];
UnitaryMatrixQ[u]{s, j} = JordanDecomposition[u]//ChopUnitaryMatrixQ[s]DiagonalMatrixQ[j]The diagonal entries lie on the unit circle:
Norm /@ Diagonal[j]For a normal numerical matrix, the
matrix is unitary:
n = {{1., 3., -1.}, {-1., 1., 3.}, {3., -1., 1.}};
NormalMatrixQ[n]{s, j} = JordanDecomposition[n];
UnitaryMatrixQ[s]DiagonalMatrixQ[j]Jordan form of an integer matrix:
m = {{3, 7, -22, -6}, {7, 4, -20, -7}, {0, 0, -3, 0}, {6, 7, -21, -9}};
JordanReduce[m]In this case, the result agrees with the second matrix given by JordanDecomposition:
JordanDecomposition[m][[2]]However, the blocks may be ordered differently:
m = {{1, 1, 2, 1}, {6, 7, 1, 3}, {1, 6, 1, 8}, {5, 8, 4, 10}};
j1 = JordanReduce[m];j2 = Last@JordanDecomposition[m];
j1 == j2Sort the diagonal elements to show the two reductions are equivalent:
Sort[Diagonal[j1]] == Sort[Diagonal[j2]]SchurDecomposition[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 (2)
m is a 4×4 matrix with some entries differing by a small amount:
m = {{1, 0, 0, 0}, {0, 1, 0, 0}, {1, -1, 1 - 10^-16, 0}, {1, -1, 1, 1 + 10^-16}};Find the Jordan decomposition using exact arithmetic:
{s, j} = JordanDecomposition[m];This shows that m is diagonalizable:
Diagonal[j, 1]Find the Jordan decomposition with machine‐number arithmetic:
{sn, jn} = JordanDecomposition[N[m]]Computation with machine-number arithmetic indicates that the matrix is not diagonalizable:
Diagonal[jn, 1]To machine precision, m is indistinguishable from a nearby non-diagonalizable matrix:
N[m] - {{1, 0, 0, 0}, {0, 1, 0, 0}, {1, -1, 1, 0}, {1, -1, 1, 1}}The matrix m has some machine-precision entries:
m = {{2., 4, -6, 0}, {4, 6, -3, -4}, {0, 0, 4, 0}, {0, 4, -6, 2}};Due to numerical rounding, the deficient eigenspace at 2. is split into two separate eigenspaces:
{sn, jn} = JordanDecomposition[m];
jn//MatrixFormPerform the computation using exact arithmetic to determine if the matrix is diagonalizable:
{s, j} = JordanDecomposition[Rationalize[m]];
j//MatrixFormSee Also
EigenvalueDecomposition Eigensystem JordanMatrix SingularValueDecomposition QRDecomposition SchurDecomposition MatrixExp MatrixFunction Minors
Function Repository: WeyrDecomposition
Tech Notes
Related Guides
History
Introduced in 1996 (3.0) | Updated in 2010 (8.0)
Text
Wolfram Research (1996), JordanDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/JordanDecomposition.html (updated 2010).
CMS
Wolfram Language. 1996. "JordanDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/JordanDecomposition.html.
APA
Wolfram Language. (1996). JordanDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/JordanDecomposition.html
BibTeX
@misc{reference.wolfram_2026_jordandecomposition, author="Wolfram Research", title="{JordanDecomposition}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/JordanDecomposition.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_jordandecomposition, organization={Wolfram Research}, title={JordanDecomposition}, year={2010}, url={https://reference.wolfram.com/language/ref/JordanDecomposition.html}, note=[Accessed: 12-June-2026]}