Diagonalisation transforms a complicated matrix into the simplest possible form, a diagonal matrix where all the action sits on the main diagonal. The payoff is enormous: matrix powers become trivial, differential equations decouple, and hidden structure becomes visible.
P⁻¹AP = DEigenvalues & eigenvectorsAlgebraic vs geometric multiplicityMatrix powersWhen it fails10 worked examples
Share this page
§ 01What Is Diagonalisation — and Why Does It Matter?
A diagonal matrix is the dream: you can raise it to any power, take its exponential, or invert it simply by operating on each diagonal entry independently. Diagonalisation asks whether a given matrix can be converted into this ideal form.
A square matrix A is called diagonalisable if there exists an invertible matrix P and a diagonal matrix D such that:
The Central Equation
P⁻¹AP = D equivalently A = PDP⁻¹
The columns of P are eigenvectors of A, and the corresponding diagonal entries of D are the eigenvalues. This is not an abstract trick: it is the algebraic expression of a fundamental geometric truth: if you choose the right coordinate system (the eigenbasis), the linear transformation A acts like simple scaling on each coordinate axis. That simplicity is what makes diagonalisation so powerful.
Why Should You Care?
The most immediate application is computing matrix powers. If A = PDP⁻¹, then:
Raising a diagonal matrix to the n-th power is effortless: each diagonal entry is just raised to the n-th power. This reduces what would otherwise be n−1 costly matrix multiplications to three operations regardless of n. The technique also underlies systems of differential equations, Markov chains, the Fibonacci formula, and the principal component analysis at the heart of machine learning.
StartA
→
Findλᵢ, vᵢ
→
BuildP, D
→
VerifyP⁻¹AP=D
→
UseAⁿ=PDⁿP⁻¹
§ 02Quick Recap — Eigenvalues and Eigenvectors
Diagonalisation is built entirely on eigenvalues and eigenvectors. Here is the minimum you need before proceeding: see the Eigenvalues & Eigenvectors page for full detail.
A scalar λ is an eigenvalue of A if there exists a non-zero vector v such that Av = λv. The vector v is called an eigenvector associated with λ. The equation Av = λv can be rewritten as (A − λI)v = 0, which has non-zero solutions if and only if:
Characteristic Equation
det(A − λI) = 0
The polynomial det(A − λI) is called the characteristic polynomial of A. Its roots are the eigenvalues. For each eigenvalue λᵢ, the eigenspace E(λᵢ) is the null space of (A − λᵢI), the set of all solutions to (A − λᵢI)v = 0, including the zero vector.
The Multiplicity Distinction — This Is Where Diagonalisability Lives
The algebraic multiplicity of an eigenvalue λ is its multiplicity as a root of the characteristic polynomial. The geometric multiplicity is the dimension of its eigenspace — the number of linearly independent eigenvectors with that eigenvalue. For diagonalisability, these must agree for every eigenvalue.
Concept
Definition
Notation
Key fact
Algebraic multiplicity
Multiplicity of λ as a root of det(A−λI)
AM(λ)
AM(λ) ≥ 1 for every eigenvalue
Geometric multiplicity
dim(null(A−λI)) = number of free variables
GM(λ)
1 ≤ GM(λ) ≤ AM(λ) always
Diagonalisable condition
GM(λ) = AM(λ) for every eigenvalue λ
—
Equivalently: n independent eigenvectors exist
§ 03The Diagonalisability Theorem
The existence theorem is clean and precise. It gives you both a necessary and sufficient condition, there is no grey area.
Theorem — Diagonalisation
An n×n matrix A is diagonalisable if and only if it has n linearly independent eigenvectors.
Equivalently: A is diagonalisable if and only if, for each eigenvalue λ, the geometric multiplicity equals the algebraic multiplicity.
When diagonalisable, P is the matrix whose columns are n linearly independent eigenvectors, and D is the diagonal matrix of the corresponding eigenvalues (in the same column order).
Two important special cases guarantee diagonalisability without any multiplicity checks:
Sufficient Condition 1 — Distinct Eigenvalues
If an n×n matrix has n distinct (all different) eigenvalues, then it is automatically diagonalisable. This is because eigenvectors from different eigenvalues are always linearly independent.
Sufficient Condition 2 — Symmetric Matrices
Every real symmetric matrix (A = Aᵀ) is diagonalisable, with an orthogonal matrix P (so P⁻¹ = Pᵀ). The eigenvectors from distinct eigenspaces are automatically orthogonal. This is the Spectral Theorem, and it is the foundation of principal component analysis.
§ 04The Five-Step Diagonalisation Procedure
Every diagonalisation problem follows the same five steps. Internalise this checklist and no problem will catch you off guard.
How to Diagonalise A
Find all eigenvalues
Compute det(A − λI) = 0. Solve the characteristic polynomial. List all roots with their algebraic multiplicities.
Test diagonalisability
For each repeated eigenvalue, find the geometric multiplicity (dim of null space of A − λI). If GM = AM for every eigenvalue, proceed. Otherwise: not diagonalisable.
Find eigenvectors for each eigenvalue
For each λᵢ, row-reduce (A − λᵢI) and find a basis for the null space. These basis vectors are the eigenvectors.
Assemble P and D
Place the eigenvectors as columns of P (in any order). Build D with the corresponding eigenvalues on the diagonal in the same column order.
Verify (optional but recommended)
Check that AP = PD (equivalently, that A times each column of P gives λᵢ times that column). This catches sign errors without fully computing P⁻¹.
§ 05Ten Worked Examples
We cover 2×2 and 3×3 cases, repeated eigenvalues, defective matrices, matrix powers, and symmetric matrices. Each example applies the five-step procedure explicitly.
GM(3) = 1 but AM(3) = 2. Since GM ≠ AM, the matrix is not diagonalisable. It is a defective matrix: only 2 linearly independent eigenvectors exist for a 3×3 matrix.
Not diagonalisable — defective matrix
Example 04Diagonalise A = [[1, 0, 0],[0, 3, −2],[0, 1, 0]] — 3×3 with distinct eigenvalues
GM(2) = 2 ≠ AM(2) = 3. Not diagonalisable. The matrix has a 2×2 Jordan block and a 1×1 Jordan block, it can only be brought to Jordan normal form, not to a fully diagonal form.
Not diagonalisable — GM < AM for λ = 2
§ 06Common Mistakes
Mistake 1 — Assuming distinct eigenvalues are necessary, not just sufficient
A matrix with a repeated eigenvalue can still be diagonalisable — provided the geometric multiplicity equals the algebraic multiplicity for that eigenvalue. The identity matrix has eigenvalue 1 with AM = n and GM = n: it is already diagonal and perfectly diagonalisable.
Mistake 2 — Wrong column order between P and D
The diagonal entries of D must correspond to the columns of P in the exact same order. If v₁ (eigenvector for λ₁) is column 1 of P, then λ₁ must be the (1,1) entry of D. Swapping columns of P without updating D makes P⁻¹AP ≠ D.
Mistake 3 — Confusing algebraic and geometric multiplicity
Algebraic multiplicity is found from the characteristic polynomial — count the repeated roots. Geometric multiplicity is found by row-reducing (A − λI) and computing the nullity. You must check both for every repeated eigenvalue.
Mistake 4 — Using AP = PD to check instead of P⁻¹AP = D
Actually, checking AP = PD is the right shortcut! It avoids computing P⁻¹ and catches errors: multiply A by each column of P and check it equals the eigenvalue times that column. This is faster and less error-prone than fully computing P⁻¹AP.
§ 07Practice Quiz — 10 Questions
Test your understanding of diagonalisation: theory, multiplicity, matrix powers, and computations.
Score: 0 / 10
Question 1 of 10 — Multiple Choice
An n×n matrix A is diagonalisable if and only if:
B. The correct necessary and sufficient condition is n linearly independent eigenvectors. Option A (distinct eigenvalues) is only sufficient, not necessary — a matrix with repeated eigenvalues can still be diagonalisable if GM = AM for each repeated eigenvalue. Option D (symmetric) is also only sufficient.
Question 2 of 10 — Multiple Choice
If A = PDP⁻¹, what is A⁵?
B — PD⁵P⁻¹. When you expand (PDP⁻¹)⁵, the middle P⁻¹P pairs cancel: (PDP⁻¹)(PDP⁻¹)(PDP⁻¹)(PDP⁻¹)(PDP⁻¹) = PD·(P⁻¹P)·D·(P⁻¹P)·D·(P⁻¹P)·D·(P⁻¹P)·DP⁻¹ = PD⁵P⁻¹. This is the whole point of diagonalisation for computing powers.
Question 3 of 10 — Fill in the Blank
The matrix A = [[3,0],[0,7]] has eigenvalues 3 and 7. How many linearly independent eigenvectors does it have?
Answer:
A diagonal matrix already is diagonalised. The standard basis vectors e₁ and e₂ are the eigenvectors.
A diagonal matrix always has n linearly independent eigenvectors — the standard basis vectors. Here e₁=[1,0]ᵀ is the eigenvector for λ=3, and e₂=[0,1]ᵀ for λ=7. Answer: 2.
Question 4 of 10 — Multiple Choice
A 3×3 matrix has characteristic polynomial −(λ−1)²(λ−5). Which situation guarantees it is diagonalisable?
B. AM(1)=2, so we need GM(1)=2 for the repeated eigenvalue. GM(5)=1=AM(5) is automatically satisfied. With GM=AM for every eigenvalue, we get 2+1=3 independent eigenvectors — exactly n=3. Option A fails because GM(1)=1 < AM(1)=2.
Question 5 of 10 — Multiple Choice
What is the relationship between geometric and algebraic multiplicity for any eigenvalue?
C — 1 ≤ GM ≤ AM. GM ≥ 1 because every eigenvalue has at least one eigenvector. GM ≤ AM is a theorem: the eigenspace dimension can never exceed the multiplicity of the root. The gap (AM − GM) measures how "defective" the eigenvalue is. Diagonalisation requires this gap to be zero for every eigenvalue.
Question 6 of 10 — Fill in the Blank
If D = diag(2, −1, 3), what is the (1,1) entry of D⁴?
Answer:
Raising a diagonal matrix to a power just raises each diagonal entry to that power.
D⁴ = diag(2⁴, (−1)⁴, 3⁴) = diag(16, 1, 81). The (1,1) entry is 16.
Question 7 of 10 — Multiple Choice
For a real symmetric matrix, which statement is always true?
B. The Spectral Theorem guarantees that every real symmetric matrix is diagonalisable by an orthogonal matrix P (so P⁻¹ = Pᵀ). All eigenvalues are real. But they need not be positive (A may be indefinite) and they can certainly repeat. Option D describes orthogonal matrices, not symmetric ones.
Question 8 of 10 — Fill in the Blank
Matrix A has eigenvalues 2, 2, 5 with corresponding eigenvectors [1,0,0]ᵀ, [0,1,0]ᵀ, [0,0,1]ᵀ. What is the (2,2) entry of D (where P is formed from these eigenvectors in order)?
Answer:
The diagonal entries of D are the eigenvalues in the same order as the columns of P. Column 2 of P is [0,1,0]ᵀ, which has eigenvalue…
Column 2 of P is the eigenvector [0,1,0]ᵀ with eigenvalue 2. So D = diag(2, 2, 5) and the (2,2) entry is 2.
Question 9 of 10 — Multiple Choice
A 2×2 matrix has a single eigenvalue λ=4 with only one linearly independent eigenvector. This matrix is:
C — defective. AM(4) = 2 (it's the only eigenvalue of a 2×2 matrix) but GM(4) = 1. Since GM < AM, we cannot assemble 2 independent eigenvectors, so P cannot be built. The matrix is defective and requires a Jordan block [[4,1],[0,4]] as its normal form.
Question 10 of 10 — Multiple Choice
Which of the following is the most efficient way to verify P⁻¹AP = D, without computing P⁻¹?
B. P⁻¹AP = D is equivalent to AP = PD (multiply both sides on the left by P). The j-th column of AP is A times the j-th column of P (i.e. Avⱼ), and the j-th column of PD is λⱼvⱼ. So checking Avⱼ = λⱼvⱼ for each column is both the definition of an eigenvector and the fastest way to verify the diagonalisation. Options A and C are necessary but not sufficient; option D only confirms P is invertible, not that the construction is correct.
Next StepsContinue the Linear Algebra Series
Diagonalisation sits at the heart of applied linear algebra. The natural follow-on topics are:
Orthogonality, the geometry of perpendicular vectors, Gram-Schmidt, and why symmetric matrices have orthogonal eigenvectors.
Eigenvalues & Eigenvectors, go deeper on the characteristic polynomial, complex eigenvalues, and the trace/determinant relationships.
Linear Transformations: diagonalisation in a basis-free language, and how change of basis connects to P⁻¹AP.