Guides8 min
Matrix Diagonalization and Powers Aⁿ, Step by Step
Nobody computes A¹⁰⁰ by multiplying a hundred times. Diagonalizing a matrix turns powers of A into powers of its diagonal entries, so you can write a closed form for Aⁿ at once. This guide follows a 2×2 example from diagonalization to the formula for Aⁿ.
What is diagonalization?
A square matrix A is diagonalizable when it can be written as A = PDP⁻¹, where D is a diagonal matrix and P is invertible. Rearranged, this is the same as P⁻¹AP = D.
The diagonal entries of D are the eigenvalues of A, and the columns of P are the corresponding eigenvectors. So the condition for diagonalization is having n linearly independent eigenvectors. Distinct eigenvalues guarantee this; a repeated eigenvalue must supply as many independent eigenvectors as its multiplicity.
Example: diagonalizing a 2×2 matrix
Step 1: eigenvalues and eigenvectors
The characteristic equation λ² − 7λ + 10 = (λ − 2)(λ − 5) = 0 gives the eigenvalues λ = 2 and 5. Their eigenvectors are shown below; the full working is in the eigenvalue guide.
Step 2: build P and D
Put the eigenvectors in the columns of P, and put the eigenvalues on the diagonal of D in the same order. Mismatched order gives a wrong answer.
Step 3: find P⁻¹
Since det(P) = 1·1 − 1·(−2) = 3, the 2×2 inverse formula gives P⁻¹ directly.
Check
Multiply PDP⁻¹ and confirm that A comes back.
Using it for powers: Aⁿ = PDⁿP⁻¹
In Aⁿ = (PDP⁻¹)(PDP⁻¹)…(PDP⁻¹), every inner P⁻¹P collapses to I, leaving Aⁿ = PDⁿP⁻¹. Raising a diagonal matrix to a power just raises each diagonal entry to that power.
Multiplying PDⁿP⁻¹ symbolically gives the closed form for Aⁿ.
With n = 1 this gives (2 + 10)/3 = 4, (−2 + 5)/3 = 1, (−4 + 10)/3 = 2 and (4 + 5)/3 = 3, which is A. Let's try n = 5.
Multiplying A by itself five times gives the same result. Enter A and n = 5 in the matrix power calculator to see the intermediate results A², A³ and A⁴ as well.
When diagonalization fails
The characteristic equation is (λ − 1)² = 0, so the eigenvalue 1 is repeated (algebraic multiplicity 2). But J − I = [[0, 1], [0, 0]] has rank 1, so there is only one direction of eigenvectors (geometric multiplicity 1). With fewer than two independent eigenvectors, J cannot be diagonalized.
For a matrix like this, multiply directly and look for a pattern: J² = [[1, 2], [0, 1]], J³ = [[1, 3], [0, 1]], … so Jⁿ = [[1, n], [0, 1]].
Fibonacci numbers and matrix powers
Powers of F = [[1, 1], [1, 0]] produce the Fibonacci numbers: Fⁿ = [[Fₙ₊₁, Fₙ], [Fₙ, Fₙ₋₁]].
You can read off F₁₀ = 55 and F₁₁ = 89. The eigenvalues of F are the irrational numbers (1 ± √5)/2, and diagonalizing gives Binet's formula Fₙ = (φⁿ − ψⁿ)/√5. The irrational arithmetic is tedious by hand, so for a specific n the power calculator gives the exact integers much faster.
Common mistakes
- Putting the columns of P and the diagonal of D in different orders. Each eigenvalue must sit in the same position as its eigenvector.
- Using Pᵀ instead of P⁻¹. They are equal only when P is an orthogonal matrix.
- Writing Aⁿ = PⁿDⁿ(P⁻¹)ⁿ. P is not raised to a power.
- Declaring a matrix non-diagonalizable as soon as an eigenvalue repeats. It is diagonalizable if the repeated eigenvalue has enough eigenvectors; the identity matrix, for example, has the eigenvalue 1 repeated n times and is already diagonal.
FAQ
Can I diagonalize when the eigenvalues are irrational?
Yes, but P and D then contain square roots, which makes hand calculation tedious. For 2×2 matrices the eigenvalue calculator shows the exact form (a ± √b)/c.
What is diagonalization used for?
Besides matrix powers: systems of recurrences, long-run states of Markov chains, solutions of linear differential equations, and classifying quadratic forms. All of them need Aⁿ or e^A to be easy to compute.
Is P unique?
No. Any nonzero multiple of an eigenvector is still an eigenvector, so there are many valid choices of P. Every one of them gives the same PDP⁻¹ = A.
Related guides