Linear Algebra • Eigenvalues & Eigenvectors

Matrix Powers via Diagonalization — Computing Powers of Matrices Using Diagonalization

Learn the shortcut that turns tedious matrix multiplication into simple exponentiation of diagonal entries.

Linear Algebra emblem with a matrix grid, a variable, and three-dimensional axes.
Inside this lesson 10 sections 5 questions 8 figures

SECTION 1

Historical Context & Motivation

Imagine you need to multiply a matrix by itself 100 times. Doing that by hand would take forever! Mathematicians faced exactly this problem when studying systems that change over time, like populations growing or signals bouncing through networks. They needed a faster way to compute matrix powers — and they found one by breaking matrices apart into simpler pieces.

The key idea is called diagonalization. It transforms a complicated matrix into a diagonal matrix (one where the only non-zero entries sit on the main diagonal). Raising a diagonal matrix to a power is easy — you just raise each diagonal entry to that power. This technique grew out of centuries of mathematical discovery.

1750s • Euler and Early Matrix Ideas

Leonhard Euler studied systems of linear equations, laying the groundwork for what we now call matrices and eigenvalues.

1826 • Cauchy Defines Eigenvalues

Augustin-Louis Cauchy formally introduced the concept of eigenvalues (he called them "characteristic roots") for symmetric matrices, a crucial ingredient for diagonalization.

1855 • Cayley Creates Matrix Algebra

Arthur Cayley published the first systematic treatment of matrix algebra, including matrix multiplication and the idea of raising a matrix to a power.

1904 • Hilbert and Spectral Theory

David Hilbert developed spectral theory, showing how matrices can be decomposed using eigenvalues. This gave diagonalization a solid theoretical foundation.

1950s+ • Computers and Modern Applications

With the rise of computers, diagonalization became a practical tool used in physics, engineering, computer graphics, and data science to efficiently compute matrix powers.

So the big question this lesson answers is: How can we compute Aⁿ quickly without multiplying A by itself n times? The answer relies on eigenvalues, eigenvectors, and the magic of diagonal matrices.

SECTION 2

Core Principles & Definitions

Before we can diagonalize a matrix, we need to understand a few key building blocks. Think of these as the tools in your toolbox — you will use every one of them when computing matrix powers.

1

Eigenvalue (λ)

An eigenvalue is a special number λ (lambda) such that when you multiply the matrix A by a certain vector, the result is just that vector scaled by λ. In symbols: Av = λv.
2

Eigenvector (v)

An eigenvector is the non-zero vector v that gets scaled (stretched or flipped) when multiplied by A. It only changes in magnitude, not direction (though it may reverse).
3

Diagonal Matrix (D)

A diagonal matrix has non-zero entries only along the main diagonal (top-left to bottom-right). All other entries are zero. Raising D to a power n means raising each diagonal entry to n.
4

Invertible Matrix (P⁻¹)

An invertible matrix P has a partner P⁻¹ such that P × P⁻¹ = I (the identity matrix). The eigenvector matrix P must be invertible for diagonalization to work.
5

Diagonalization Formula

If A = PDP⁻¹, then Aⁿ = PDⁿP⁻¹. This is the big payoff — computing Dⁿ is trivial because D is diagonal!
✦

KEY TAKEAWAY

Think of diagonalization like changing languages. Suppose you need to solve a hard word problem written in French. You could translate it to English (where it's easy for you), solve it, and then translate the answer back to French. Diagonalization does the same thing: P⁻¹ translates the matrix into a simple "diagonal language," you do the easy math (raise diagonal entries to a power), and then P translates the answer back to the original language.

SECTION 3

Visual Explanation

The diagram below shows the entire diagonalization pipeline. Follow the arrows from left to right to see how the matrix A is broken into three parts (P, D, P⁻¹), how raising D to a power is easy, and how the pieces reassemble into Aⁿ.

Diagonalization Pipeline: A = PDP⁻¹ → Aⁿ = PDⁿP⁻¹AOriginal MatrixfactorPEigenvectorsDEigenvaluesP⁻¹Inverseraise to power nDⁿλ₁ⁿ, λ₂ⁿ on diagonalAⁿ = PDⁿP⁻¹Reassemble the pieces!multiplyWhy Dⁿ Is EasyD = [λ₁ 0 ] [ 0 λ₂]D² = [λ₁² 0 ] [ 0 λ₂²]D³ = [λ₁³ 0 ] [ 0 λ₂³]Dⁿ = [λ₁ⁿ 0 ] [ 0 λ₂ⁿ]Just raise each entry!
The pipeline shows how A is factored into P × D × P⁻¹. The diagonal matrix D is easy to raise to any power n, and then the result is reassembled as PDⁿP⁻¹. The side panel on the right shows why raising D to a power is so simple — you just raise each diagonal entry individually.

Notice the key insight: the hard part (raising A to a power) gets replaced by the easy part (raising each eigenvalue to a power). The matrices P and P⁻¹ act like translators — they convert between the original coordinate system and the eigenvector coordinate system, where everything is diagonal and simple.

SECTION 4

Mathematical Framework

Let's build up the math step by step. We start with the eigenvalue equation, then show how it leads to the diagonalization formula, and finally the matrix power formula.

EIGENVALUE EQUATION

Av=λvAv = λv

A is the matrix, v is an eigenvector (a non-zero vector), and λ (lambda) is the eigenvalue. This says: "multiplying A by v just scales v by λ."

CHARACTERISTIC EQUATION

det(A−λI)=0det(A − λI) = 0

To find eigenvalues, compute the determinant of (A − λI) and set it equal to zero. Here I is the identity matrix. Solving this polynomial gives you the eigenvalues λ₁, λ₂, etc.

DIAGONALIZATION

A=PDP−1A = PDP⁻¹

P is the matrix whose columns are the eigenvectors of A. D is the diagonal matrix with the eigenvalues on the diagonal. P⁻¹ is the inverse of P. This factorization works only when A has enough linearly independent eigenvectors.

MATRIX POWER FORMULA

An=PDnP−1Aⁿ = PDⁿP⁻¹

This is the payoff! Since D is diagonal, Dⁿ is formed by raising each diagonal entry to the n-th power: if D has λ₁ and λ₂ on the diagonal, then Dⁿ has λ₁ⁿ and λ₂ⁿ.

💡

Why Does Aⁿ = PDⁿP⁻¹ Work?

Here is the beautiful reason. Write A² = A × A = (PDP⁻¹)(PDP⁻¹). Notice that P⁻¹P in the middle equals the identity matrix I, so it cancels out! You get A² = PD(P⁻¹P)DP⁻¹ = PD²P⁻¹. The same cancellation happens for A³, A⁴, and any power n. The P⁻¹P pairs in the middle always collapse to I, leaving just PDⁿP⁻¹.

SECTION 5

Step-by-Step Process for Diagonalization

Here is the complete recipe for computing Aⁿ using diagonalization. The diagram below shows a 2×2 example flowing through each step, so you can see both the general method and a concrete illustration at the same time.

Step-by-Step: Diagonalizing A = [2, 1; 0, 3]STEP 1: Find Eigenvaluesdet(A − λI) = 0(2−λ)(3−λ) = 0λ₁=2, λ₂=3STEP 2: Find Eigenvectorsλ₁=2 → v₁=[1, 0]λ₂=3 → v₂=[1, 1]STEP 3: Build P & DP=[1 1; 0 1]D=[2 0; 0 3]STEP 4: Find P⁻¹P⁻¹=[ 1 −1] [ 0 1]Computing A⁵ Using the FormulaSTEP 5: Compute DⁿD⁵ = [2⁵ 0 ] = [32 0] [ 0 3⁵] [ 0 243]STEP 6: Multiply PDⁿP⁻¹[1 1][32 0][ 1 −1][0 1][ 0 243][ 0 1]RESULTA⁵ = [ 32 211] [ 0 243]Summary of the 6-Step Recipe1. Find eigenvalues by solving det(A − λI) = 02. Find eigenvectors by solving (A − λI)v = 0 for each λ3. Build P (columns = eigenvectors) and D (diagonal = eigenvalues)4. Compute P⁻¹5. Raise D to the n-th power (easy!)6. Multiply: Aⁿ = P × Dⁿ × P⁻¹
This diagram walks through the entire 6-step process using the matrix A = [2, 1; 0, 3]. Steps 1–4 set up the diagonalization. Steps 5–6 use it to compute A⁵. Notice how the hard work (finding eigenvalues and eigenvectors) only needs to be done once — after that, you can compute any power of A quickly.
  1. Step 1 — Find eigenvalues by solving the characteristic equation det(A − λI) = 0.
  2. Step 2 — For each eigenvalue λ, find an eigenvector by solving (A − λI)v = 0.
  3. Step 3 — Build P by placing eigenvectors as columns, and D by placing eigenvalues on the diagonal.
  4. Step 4 — Compute P⁻¹ (the inverse of P).
  5. Step 5 — Compute Dⁿ by raising each diagonal entry to the n-th power.
  6. Step 6 — Multiply P × Dⁿ × P⁻¹ to get Aⁿ.

SECTION 6

Worked Example

Let's work through a complete example from start to finish. We will compute A⁴ where A = [1, 2; 0, 3]. Follow each step carefully — this is the same recipe you will use on every problem.

Computing A⁴ for A = [1, 2; 0, 3]

  1. 1

    Step 1 — Find the Eigenvalues

    We solve det(A − λI) = 0. First, A − λI = [1−λ, 2; 0, 3−λ]. The determinant of a 2×2 matrix [a, b; c, d] is ad − bc. So det(A − λI) = (1 − λ)(3 − λ) − (2)(0) = (1 − λ)(3 − λ). Setting this equal to zero: (1 − λ)(3 − λ) = 0. This gives us λ = 1 or λ = 3.
    Eigenvalues: λ₁ = 1, λ₂ = 3
  2. 2

    Step 2 — Find the Eigenvectors

    For λ₁ = 1: solve (A − I)v = 0. A − I = [0, 2; 0, 2]. This gives 2v₂ = 0, so v₂ = 0 and v₁ is free. Choose v₁ = [1, 0]. For λ₂ = 3: solve (A − 3I)v = 0. A − 3I = [−2, 2; 0, 0]. This gives −2v₁ + 2v₂ = 0, so v₁ = v₂. Choose v₂ = [1, 1].
    Eigenvectors: v₁ = [1, 0], v₂ = [1, 1]
  3. 3

    Step 3 — Build P and D

    Place the eigenvectors as columns of P: P = [1, 1; 0, 1]. Place the eigenvalues on the diagonal of D: D = [1, 0; 0, 3]. Now we have A = PDP⁻¹.
    P = [1, 1; 0, 1] and D = [1, 0; 0, 3]
  4. 4

    Step 4 — Find P⁻¹

    For a 2×2 matrix P = [a, b; c, d], the inverse is (1/det(P)) × [d, −b; −c, a]. Here det(P) = (1)(1) − (1)(0) = 1. So P⁻¹ = [1, −1; 0, 1].
    P⁻¹ = [1, −1; 0, 1]
  5. 5

    Step 5 — Compute D⁴

    Raise each diagonal entry to the 4th power. D⁴ = [1⁴, 0; 0, 3⁴] = [1, 0; 0, 81]. That's it! This is the easy step.
    D⁴ = [1, 0; 0, 81]
  6. 6

    Step 6 — Multiply P × D⁴ × P⁻¹

    First compute PD⁴ = [1, 1; 0, 1] × [1, 0; 0, 81] = [1, 81; 0, 81]. Then multiply by P⁻¹: [1, 81; 0, 81] × [1, −1; 0, 1] = [1×1 + 81×0, 1×(−1) + 81×1; 0×1 + 81×0, 0×(−1) + 81×1] = [1, 80; 0, 81].
    Final answer: A⁴ = [1, 80; 0, 81]
💡

Quick Check

You can verify this result! Compute A² = [1, 2; 0, 3] × [1, 2; 0, 3] = [1, 8; 0, 9]. Then A⁴ = A² × A² = [1, 8; 0, 9] × [1, 8; 0, 9] = [1, 80; 0, 81]. It matches! But notice how much faster diagonalization would be if you needed A¹⁰⁰ — you would just compute 1¹⁰⁰ = 1 and 3¹⁰⁰ instead of doing 99 matrix multiplications.

SECTION 7

Strengths and Limitations

Diagonalization is a powerful technique, but it doesn't work for every matrix. Understanding when it works (and when it doesn't) is just as important as knowing how to do it. Here's a comparison of the strengths and limitations.

FeatureStrengthLimitation
SpeedOnce diagonalized, computing any power Aⁿ is extremely fast — just raise eigenvalues to a power.The initial setup (finding eigenvalues, eigenvectors, and P⁻¹) can be time-consuming for large matrices.
ApplicabilityWorks for any diagonalizable matrix, including many common matrices in physics and engineering.Not all matrices are diagonalizable. A matrix needs n linearly independent eigenvectors to be diagonalizable (where n is its size).
ReusabilityOnce you have P, D, and P⁻¹, you can compute Aⁿ for any value of n without redoing the setup.If you only need one specific power (like A²), direct multiplication might be faster than full diagonalization.
InsightEigenvalues reveal long-term behavior: if all |λ| < 1, Aⁿ → 0 as n → ∞.Complex eigenvalues require working with complex numbers, which adds difficulty.

Strengths and limitations of diagonalization for computing matrix powers

⚡

WHEN TO USE DIAGONALIZATION

Think of diagonalization like building a highway. It takes significant effort to construct the road (finding eigenvalues, eigenvectors, and the inverse). But once the highway is built, every trip (computing Aⁿ for any n) is fast and smooth. If you only need to make one short trip, the back roads (direct multiplication) might be quicker. But if you need many trips or a very long one (large n), the highway is absolutely worth it.

SECTION 8

Connections to Advanced Topics

Diagonalization is not the end of the story — it's a gateway to many powerful ideas in mathematics and its applications. If you continue studying linear algebra, you'll encounter generalizations that handle matrices that can't be diagonalized, as well as exciting real-world applications.

This LessonAdvanced ExtensionWhat Changes
Diagonalization: A = PDP⁻¹Jordan Normal FormHandles non-diagonalizable matrices by using "almost-diagonal" Jordan blocks with 1s above the diagonal.
Real eigenvaluesComplex EigenvaluesSome matrices have eigenvalues like 2 + 3i. The method still works, but with complex arithmetic and rotation interpretations.
Matrix powers AⁿMatrix Exponential eAte^{At}Used in differential equations. Diagonalization turns eAte^{At} into P × diag(eλte^{λt}) × P⁻¹.
2×2 and 3×3 matricesLarge-Scale ApplicationsGoogle's PageRank algorithm uses eigenvalues of enormous matrices. Diagonalization ideas scale up with computer assistance.

How diagonalization connects to more advanced topics

One of the most exciting applications is in Markov chains, where a matrix represents probabilities of moving between states (like weather patterns or web page links). Computing Aⁿ tells you the long-term behavior of the system. Diagonalization makes this calculation practical even for large systems.

SECTION 9

Practice Problems

Try these five problems to test your understanding. They start easy and get progressively more challenging. Remember the six-step recipe from Section 5!

Question 1: CONCEPTUAL

If a diagonal matrix D = [4, 0; 0, 5], what is D³? Explain in your own words why raising a diagonal matrix to a power is so simple.
Show answer
D³ = [4³, 0; 0, 5³] = [64, 0; 0, 125]. Raising a diagonal matrix to a power is simple because when you multiply diagonal matrices, the off-diagonal zeros stay zero and the diagonal entries just multiply with themselves. Each diagonal entry behaves independently, so you can raise each one to the power separately. This is exactly what makes diagonalization so useful — it converts the hard problem of matrix powers into the easy problem of number powers.

Question 2: BASIC CALCULATION

Given A = [3, 0; 0, 2], compute A⁵. (Hint: this matrix is already diagonal!)
Show answer
Since A is already a diagonal matrix, no diagonalization is needed. A⁵ = [3⁵, 0; 0, 2⁵] = [243, 0; 0, 32]. When a matrix is already diagonal, it is its own D, and P = P⁻¹ = I (the identity matrix). This is the simplest possible case, and it shows why we want to convert matrices into diagonal form — diagonal matrices are trivially easy to raise to any power.

Question 3: INTERMEDIATE

Let A = [5, 4; 0, 1]. Find the eigenvalues and eigenvectors of A, then use diagonalization to compute A³.
Show answer
First, find eigenvalues: det(A − λI) = (5 − λ)(1 − λ) = 0, giving λ₁ = 5 and λ₂ = 1. For λ₁ = 5: (A − 5I)v = [0, 4; 0, −4]v = 0, giving v₁ = [1, 0]. For λ₂ = 1: (A − I)v = [4, 4; 0, 0]v = 0, giving v₂ = [−1, 1] (or equivalently [1, −1]). So P = [1, −1; 0, 1], D = [5, 0; 0, 1], P⁻¹ = [1, 1; 0, 1]. Now D³ = [125, 0; 0, 1]. Compute PD³ = [1, −1; 0, 1][125, 0; 0, 1] = [125, −1; 0, 1]. Finally, A³ = PD³P⁻¹ = [125, −1; 0, 1][1, 1; 0, 1] = [125, 124; 0, 1].

Question 4: APPLIED

A population model uses the matrix M = [0.8, 0.3; 0.2, 0.7] to predict next year's populations of two towns. If M has eigenvalues λ₁ = 1 and λ₂ = 0.5 with eigenvectors v₁ = [3, 2] and v₂ = [1, −1], what happens to the population distribution after many years (as n → ∞)? Set up the diagonalization and explain what Mⁿ approaches.
Show answer
Using diagonalization: P = [3, 1; 2, −1], D = [1, 0; 0, 0.5]. As n → ∞, Dⁿ = [1ⁿ, 0; 0, 0.5ⁿ] → [1, 0; 0, 0] because 0.5ⁿ → 0. Therefore Mⁿ → P[1, 0; 0, 0]P⁻¹. The eigenvalue λ₁ = 1 dominates in the long run, which means the population stabilizes in the direction of v₁ = [3, 2]. The ratio of town populations approaches 3:2 regardless of the starting distribution. This illustrates a key insight: the largest eigenvalue determines long-term behavior of iterative systems.

Question 5: CRITICAL THINKING

Consider the matrix B = [1, 1; 0, 1]. Try to diagonalize it. What goes wrong? Why can't every matrix be diagonalized, and what does this tell you about the limitations of the Aⁿ = PDⁿP⁻¹ method?
Show answer
The characteristic equation is det(B − λI) = (1 − λ)² = 0, giving only one eigenvalue λ = 1 with algebraic multiplicity 2. However, solving (B − I)v = [0, 1; 0, 0]v = 0 yields only one linearly independent eigenvector, v = [1, 0]. We need two independent eigenvectors to fill a 2×2 matrix P, so diagonalization fails. This matrix is called "defective" — it has a repeated eigenvalue but not enough eigenvectors. You can still compute Bⁿ by other methods (like the binomial theorem: Bⁿ = I + n[0, 1; 0, 0] = [1, n; 0, 1]), or by using the Jordan normal form. This shows that while diagonalization is powerful, it requires a complete set of independent eigenvectors, and not every matrix provides them.

SUMMARY

Lesson Summary

Summary

In this lesson, you learned how to compute matrix powers efficiently using diagonalization. The central idea is to decompose a matrix A into the product A = PDP⁻¹, where P is built from eigenvectors and D is a diagonal matrix of eigenvalues. This lets you compute Aⁿ = PDⁿP⁻¹, where Dⁿ is trivially easy — just raise each eigenvalue to the n-th power.

The six-step process involves finding eigenvalues (via the characteristic equation), finding eigenvectors, assembling P and D, computing P⁻¹, raising D to the desired power, and multiplying the three matrices together. Remember that this method only works when A has enough linearly independent eigenvectors to be diagonalizable. When it works, diagonalization transforms a potentially enormous computation into something quick and elegant — especially for very large powers of n.

Varsity Tutors • Linear Algebra • Matrix Powers via Diagonalization