Compute the Jordan canonical form of any square matrix. Decompose A = PJP⁻¹ where J is a block diagonal matrix of Jordan blocks, with step-by-step explanations of eigenvalues, generalized eigenvectors, and block structure.
Enter a matrix and click Decompose
or press Enter
The Jordan normal form (also called Jordan canonical form) is one of the most important results in linear algebra. For any square matrix A with entries in an algebraically closed field (such as the complex numbers), there exists an invertible matrix P such that A = PJP⁻¹, where J is a block diagonal matrix composed of Jordan blocks. This decomposition reveals the fundamental structure of a linear transformation and generalizes the concept of diagonalization to all square matrices.
Named after the French mathematician Camille Jordan, the Jordan normal form provides a canonical representation for every square matrix up to similarity. Two matrices are similar (represent the same linear transformation in different bases) if and only if they share the same Jordan form. This makes the Jordan form a complete invariant of the similarity class of a matrix.
The Jordan matrix J is a block diagonal matrix where each diagonal block is a Jordan block. A Jordan block Jk(λ) of size k associated with eigenvalue λ is a k×k upper triangular matrix with λ on the main diagonal and 1s on the superdiagonal:
For example, a 3×3 Jordan block for eigenvalue λ looks like:
A 1×1 Jordan block is simply the scalar [λ], which corresponds to an ordinary eigenvector. Larger Jordan blocks arise when the matrix is defective—that is, when it does not have a complete set of linearly independent eigenvectors. The 1s on the superdiagonal encode the relationships between generalized eigenvectors in a Jordan chain.
The full Jordan matrix J is the direct sum of all Jordan blocks. For instance, an n×n matrix might have a Jordan form consisting of a 2×2 block for eigenvalue 3 and a 1×1 block for eigenvalue −1, written as J = J2(3) ⊕ J1(−1).
Not every matrix can be diagonalized. A matrix is diagonalizable if and only if it has a complete set of linearly independent eigenvectors. When a matrix fails to be diagonalizable, we call it defective, and the standard eigendecomposition A = PDP⁻¹ (with D diagonal) does not exist. This is precisely when the Jordan normal form becomes essential.
Defective matrices arise naturally in many contexts. For example, the matrix [[2, 1], [0, 2]] has eigenvalue 2 with algebraic multiplicity 2, but only one linearly independent eigenvector. Its Jordan form is a single 2×2 Jordan block J2(2), which cannot be simplified further. Without the Jordan form, there is no clean canonical representation for such matrices.
Even when a matrix is diagonalizable, computing the Jordan form can be valuable as a theoretical tool for proving properties about matrix functions, convergence of matrix sequences, and behavior of dynamical systems.
Understanding Jordan form requires distinguishing between two types of multiplicity for each eigenvalue λ:
The key relationship is 1 ≤ gλ ≤ aλ. A matrix is diagonalizable if and only if gλ = aλ for every eigenvalue λ. When gλ < aλ, the matrix is defective at λ, and the Jordan form for that eigenvalue will contain blocks larger than 1×1.
More specifically, the geometric multiplicity gλ equals the number of Jordan blocks associated with λ, while the algebraic multiplicity aλ equals the sum of the sizes of those blocks. So an eigenvalue with aλ = 4 and gλ = 2 must have exactly two Jordan blocks whose sizes sum to 4 (e.g., one 3×3 block and one 1×1 block, or two 2×2 blocks).
The columns of the invertible matrix P in A = PJP⁻¹ are generalized eigenvectors of A. While ordinary eigenvectors satisfy (A − λI)v = 0, a generalized eigenvector of rank k satisfies (A − λI)kv = 0 but (A − λI)k−1v ≠ 0.
Generalized eigenvectors are organized into Jordan chains. A Jordan chain of length k for eigenvalue λ is a sequence of vectors v1, v2, ..., vk where:
Each Jordan chain corresponds to exactly one Jordan block, and the length of the chain equals the size of the block. The vectors in a chain, when used as columns of P (in reverse order: vk, ..., v2, v1), produce the corresponding Jordan block in J.
Computing the Jordan normal form of a matrix A involves several steps:
The Jordan normal form is a direct generalization of eigendecomposition (diagonalization). When a matrix A is diagonalizable, its Jordan form is simply the diagonal matrix of eigenvalues, and every Jordan block is 1×1. The matrix P becomes the matrix of eigenvectors, and A = PJP⁻¹ reduces to A = PDP⁻¹.
Viewed from this perspective, the Jordan form extends diagonalization to all square matrices by allowing controlled "near-diagonal" structure. The 1s on the superdiagonal of Jordan blocks are the minimal deviation from diagonality needed to represent the matrix canonically. This is why the Jordan form is sometimes described as the "closest to diagonal" form achievable for a given matrix.
In functional analysis and operator theory, the Jordan form corresponds to decomposing the underlying vector space into a direct sum of invariant subspaces (generalized eigenspaces), each of which is further decomposed into cyclic subspaces (Jordan chains).
While the Jordan normal form is theoretically powerful, computing it numerically is notoriously difficult. The core issue is that the Jordan structure is discontinuous: an arbitrarily small perturbation of a defective matrix can make it diagonalizable. For example, the matrix [[0, 1], [0, 0]] has a 2×2 Jordan block, but [[0, 1], [ε, 0]] is diagonalizable for any ε ≠ 0, no matter how small.
This sensitivity means that floating-point arithmetic, which introduces small rounding errors at every step, can obscure the true Jordan structure. Standard numerical algorithms therefore use tolerances to determine whether eigenvalues should be considered equal and whether null spaces have the expected dimensions.
In practice, numerical linear algebra favors the Schur decomposition (A = QTQ*) as a numerically stable alternative. The Schur form is always upper triangular with eigenvalues on the diagonal and can be computed reliably using the QR algorithm. For theoretical and symbolic computation, however, the Jordan form remains indispensable.
The computational cost of finding the Jordan form is dominated by computing eigenvalues (typically O(n³) using iterative methods) and then determining the generalized eigenspace structure, which involves additional null space computations.
The Jordan normal form as described above requires the base field to be algebraically closed, which means working over the complex numbers. Over the reals, a matrix with complex eigenvalues cannot be put into Jordan form using only real arithmetic, because the eigenvalues and generalized eigenvectors may be complex.
The real counterpart is the real Jordan form (also called the real canonical form). In this form, real eigenvalues produce standard Jordan blocks just as in the complex case. However, a pair of complex conjugate eigenvalues α ± βi produces 2×2 blocks of the form [[α, β], [−β, α]] on the diagonal instead of scalar eigenvalues, with 2×2 identity matrices on the superdiagonal of larger blocks instead of scalar 1s.
This real Jordan form preserves all structural information while keeping all entries real. It is particularly useful in applications involving real-valued differential equations and dynamical systems, where complex arithmetic is undesirable. The oscillatory behavior encoded by complex eigenvalues appears explicitly as rotation blocks in the real Jordan form.
Factor any square matrix into lower and upper triangular matrices with partial pivoting.
Open calculator →Decompose into orthogonal Q and upper triangular R. Ideal for least squares problems.
Open calculator →The most general decomposition. Factor any matrix into UΣVᵀ.
Open calculator →Efficient factorization for symmetric positive definite matrices.
Open calculator →Find eigenvalues and eigenvectors of square matrices.
Open calculator →