Diagonalize Matrix Calculator
Free diagonalize matrix calculator with steps. Find eigenvalues, eigenvectors, and the matrices P and D in A = PDP⁻¹, and see immediately whether a matrix is diagonalizable.
Enter a square matrix to get its characteristic polynomial, eigenvalues with both multiplicities, a basis of eigenvectors, and the factorisation A = PDP⁻¹ — including a clear verdict when the matrix cannot be diagonalized.
How to diagonalize a matrix
- 1
Find the characteristic polynomial
Compute det(A − λI) as a polynomial in λ.
- 2
Solve for the eigenvalues
The roots of that polynomial are the eigenvalues. Note how many times each root repeats.
- 3
Find the eigenvectors
For each eigenvalue λ, solve (A − λI)v = 0. The null space of that matrix is the eigenspace.
- 4
Assemble P and D
Put the eigenvectors into P as columns and the matching eigenvalues onto D's diagonal in the same order, then check that PDP⁻¹ returns A.
Why diagonalization matters
Matrix powers become cheap. Aᵏ = PDᵏP⁻¹, and raising a diagonal matrix to a power just raises each diagonal entry. Computing A¹⁰⁰ goes from a hundred matrix multiplications to one.
Differential equations decouple. The system x′ = Ax turns into n independent equations y′ = λy once you change to eigenvector coordinates, and each of those has the obvious solution.
Long-run behaviour becomes visible. The largest eigenvalue dominates as powers grow, which is how Markov chains find their steady state and how PageRank-style algorithms converge.
Worked examples
By matrix size
Frequently asked questions
What does it mean to diagonalize a matrix? ▾
Diagonalizing means writing A = PDP⁻¹, where D is a diagonal matrix of eigenvalues and P holds the matching eigenvectors as its columns. It amounts to choosing a basis in which the transformation is just a stretch along each axis.
When is a matrix diagonalizable? ▾
An n x n matrix is diagonalizable exactly when it has n linearly independent eigenvectors. That is guaranteed when all n eigenvalues are distinct, and it also holds for every real symmetric matrix. It fails when some eigenvalue has fewer eigenvectors than its multiplicity.
What is the difference between algebraic and geometric multiplicity? ▾
Algebraic multiplicity is how many times an eigenvalue is a root of the characteristic polynomial. Geometric multiplicity is the dimension of its eigenspace — how many independent eigenvectors it has. The matrix is diagonalizable when the two match for every eigenvalue.
What is a defective matrix? ▾
A matrix where some eigenvalue's geometric multiplicity is smaller than its algebraic multiplicity. It has too few eigenvectors to form a basis, so it cannot be diagonalized. The nearest available form is Jordan normal form.
Why can a rotation matrix not be diagonalized? ▾
A rotation in the plane sends no non-zero vector to a multiple of itself, so it has no real eigenvectors. Its characteristic polynomial has complex roots, and it can only be diagonalized over the complex numbers.
What is diagonalization used for? ▾
Computing large matrix powers (Aᵏ = PDᵏP⁻¹, and D raised to a power is trivial), solving systems of differential equations, analysing Markov chains, and principal component analysis all rely on it.
About this Calculator
Free diagonalize matrix calculator with steps. Find eigenvalues, eigenvectors, and the matrices P and D in A = PDP⁻¹, and see immediately whether a matrix is diagonalizable.