Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 27

Matrix Powers Through Diagonalization

Recommended resources

Hello! Welcome to the next lesson in our linear algebra journey.

In the last lesson, we mastered the procedure for diagonalizing a matrix , finding the eigenvector matrix and eigenvalue matrix such that . We saw this as a change of basis to a special "eigenbasis" where a transformation becomes a simple scaling.

Today, we'll put that powerful technique to work. Our goal is to apply diagonalization to efficiently compute powers of a matrix, such as . Calculating this directly would be a computational nightmare, but as you'll see, diagonalization turns it into a surprisingly straightforward task. This method is not just a clever trick; it's fundamental for analyzing systems that evolve over time, a concept central to both machine learning algorithms and the principles of quantum mechanics.

1. The Power of Diagonalization

Let's start by exploring what happens when we want to compute . If is diagonalizable, we can write:

Notice what happens in the middle. We have . Since is an invertible matrix, this product is simply the identity matrix, . This leads to a beautiful simplification:

The problem of squaring has been transformed into the much simpler problem of squaring the diagonal matrix . We can extend this pattern. For :

This reveals a general and powerful rule.

To see this cancellation trick explained visually, let's watch a short segment from a helpful video.

Diagonalization and power of a matrix

This video from the Prime Newtons channel clearly explains why the direct computation of matrix powers is difficult and demonstrates the cancellation that makes diagonalization so effective.

Watch the segment from 5:11 to 6:44. The key idea is how the P⁻¹ and P matrices cancel out, leaving only the diagonal matrix D to be raised to a power.

As the video shows, the general formula for any positive integer power is:


2. Why is this so much easier?

The formula is a huge computational shortcut for two reasons:

  1. Computing is trivial. If is a diagonal matrix, its -th power is found by simply raising each diagonal entry to the -th power.
  2. It replaces many matrix multiplications with just two. Instead of performing expensive matrix-matrix multiplications to find , we only need to perform the two multiplications in , regardless of how large is. The main work is in the initial diagonalization and finding , which you only have to do once.

From your computer science background, you can appreciate the algorithmic efficiency here. The direct computation of is far more costly than the one-time cost of diagonalization followed by this simple three-step process.


3. A Complete Worked Example

Let's walk through the full procedure to compute :

  1. Diagonalize : Find the eigenvector matrix and the eigenvalue matrix such that .
  2. Compute : Raise the diagonal elements of to the -th power.
  3. Find : Compute the inverse of the eigenvector matrix.
  4. Multiply: Calculate the final result by multiplying the three matrices: .

The following video provides a complete, step-by-step calculation of for a 2x2 matrix. It will tie together everything from the last lesson and this one.

Diagonalization and power of a matrix

Now let's watch a complete example of computing A¹⁰⁰. The video provides a clear, end-to-end demonstration of the method.

Watch the entire video (around 11 minutes). The first half is a recap of finding P and D. The main new content for this lesson begins at 5:11, where the speaker uses the P D¹⁰⁰ P⁻¹ formula to perform the final calculation.


4. Formalizing the Concept and an Application

To reinforce what you've just seen, let's turn to a more formal text resource. It concisely states the proposition for computing matrix powers and presents a fascinating example.

Powers of a diagonalizable matrix

This interactive textbook section formalizes the concept of computing matrix powers via diagonalization and provides a compelling application.

Read Subsection 4.3.2, 'Powers of a diagonalizable matrix'. Focus on Proposition 4.3.9, which is the formal rule A^k = PD^kP⁻¹, and Example 4.3.10. This example shows how the long-term behavior of a system (where a population is located) is determined by the eigenvalues.

The example in the reading concerning population movement is a simple case of a Markov chain. As gets large, the term with the smaller eigenvalue () vanishes, and the system's state is dominated by the eigenvector associated with the largest eigenvalue (). This idea of a system evolving towards a steady state governed by its dominant eigenvalue/eigenvector is a recurring theme in many areas, including Google's PageRank algorithm and the analysis of dynamical systems.

Test your understanding!

A matrix is diagonalized as where:

Calculate .

Hint: First, find . For a 2x2 matrix , the inverse is .

Show answer
  1. Find :
    The determinant of is .
    So, .

  2. Compute :

  3. Multiply :

    First, multiply and :

    Now multiply by , keeping the factor at the front:

    So, .


Conclusion

You have now learned one of the most practical applications of eigenvalues and eigenvectors. By leveraging diagonalization, you can compute high powers of a matrix efficiently, a task that would otherwise be computationally intensive or intractable.

Key Takeaways:

  • The formula to compute the -th power of a diagonalizable matrix is .
  • This method is efficient because computing involves simply raising the individual eigenvalues on the diagonal to the -th power.
  • The entire process involves three main stages: diagonalize to find and , compute , and then multiply the matrices , , and to get the result.

Preview of the Next Lesson:

So far, we've noted that not all matrices are diagonalizable. In the next module, we will begin exploring a special, and very important, class of matrices that are always diagonalizable and possess other beautiful properties. We will start by learning to define and identify symmetric (for real numbers) and Hermitian (for complex numbers) matrices. These matrices are the bedrock of quantum mechanics and appear in crucial machine learning applications like Principal Component Analysis (PCA).