Diagonalization (Changing to the Eigenbasis)

Factoring a matrix into its core components: its eigenvalues and eigenvectors.

We've just learned how to find the "soul" of a matrix—its eigenvalues (`λ`) and eigenvectors (`v`). We discovered that these eigenvectors form the special, invariant axes of the transformation.

This leads to a groundbreaking idea: What if we changed our entire coordinate system to align with these special axes? What if we wrote all our vectors not in terms of the standard `i` and `j`, but in terms of the matrix's own eigenvectors?

This change of basis is the key to diagonalization. Diagonalization is a matrix decomposition—a way of factoring a matrix `A` into the product of three simpler matrices. It is arguably the most important decomposition for understanding dynamic systems.

A=PDP1A = PDP^{-1}

Let's break down the cast of characters in this remarkable equation:

  • `A` is the original matrix we want to understand.
  • `D` is a simple **diagonal matrix**. Its diagonal entries are the **eigenvalues** of `A`.
  • `P` is a matrix whose columns are the corresponding **eigenvectors** of `A`.
  • `P⁻¹` is the inverse of `P`.

The "Why": The Story of the Transformation

The equation `A = PDP⁻¹` isn't just a formula; it's a story. It tells us that the complex transformation of `A` is actually a simple three-step process. To understand what `A` does to a vector `x`, we can compute `PDP⁻¹x`, reading from right to left:

  1. `P⁻¹x` (Change of Basis): The matrix `P⁻¹` acts as a translator. It takes `x` (written in the standard `i,j` system) and rewrites it in the language of the eigenvectors.
  2. `D * (P⁻¹x)` (A Simple Scaling): Now that our vector is in the eigenbasis, the transformation is incredibly simple. The diagonal matrix `D` just stretches or shrinks the vector along these new eigenvector axes.
  3. `P * (D(P⁻¹x))` (Change Back): The result we have now is in the eigenbasis. `P` acts as a translator to convert it back to the standard `i,j` coordinate system.

The decomposition reveals the true nature of `A`: **"Change to the eigenbasis, perform a simple scaling, and then change back."** Many complex transformations are just simple scaling operations viewed from a different, "tilted" perspective—the perspective of the eigenvectors.

The "How": Constructing P and D
Let's use our result from the last lesson. For the matrix `A = [3 -1; 2 0]`, we found:
  • `λ₁ = 1` with eigenvector `v₁ = [1, 2]`
  • `λ₂ = 2` with eigenvector `v₂ = [1, 1]`

Step 1: Construct the Eigenvalue Matrix `D`

A diagonal matrix with eigenvalues on the diagonal.

D=[1002]D = \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix}

Step 2: Construct the Eigenvector Matrix `P`

Place the eigenvectors as columns, in the same order as `D`.

P=[1121]P = \begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix}

Step 3: Find the Inverse `P⁻¹`

For a 2x2 matrix `[a b; c d]`, the inverse is `1/(ad-bc) * [d -b; -c a]`.

`det(P) = (1)(1) - (1)(2) = -1`

P1=11[1121]=[1121]P^{-1} = \frac{1}{-1} \begin{bmatrix} 1 & -1 \\ -2 & 1 \end{bmatrix} = \begin{bmatrix} -1 & 1 \\ 2 & -1 \end{bmatrix}

Step 4: Verify the Decomposition

Check if `PDP⁻¹` equals `A`.

First, `PD`:

PD=[1121][1002]=[1222]PD = \begin{bmatrix} 1 & 1 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & 2 \end{bmatrix} = \begin{bmatrix} 1 & 2 \\ 2 & 2 \end{bmatrix}

Now, `(PD)P⁻¹`:

(PD)P1=[1222][1121]=[3120]=A(PD)P^{-1} = \begin{bmatrix} 1 & 2 \\ 2 & 2 \end{bmatrix} \begin{bmatrix} -1 & 1 \\ 2 & -1 \end{bmatrix} = \begin{bmatrix} 3 & -1 \\ 2 & 0 \end{bmatrix} = A

It works perfectly! We have successfully decomposed `A` into its fundamental components.

The Power of Diagonalization: Calculating Matrix Powers

One of the most immediate applications is calculating high powers of a matrix, a common task in modeling systems that evolve over time.

What is `A¹⁰⁰`? Calculating `A*A*A...` one hundred times would be a nightmare. But with diagonalization, it's trivial.

A2=(PDP1)(PDP1)=PD(P1P)DP1=PDIDP1=PD2P1A^2 = (PDP^{-1})(PDP^{-1}) = P D (P^{-1}P) D P^{-1} = PDIDP^{-1} = PD^2P^{-1}

The pattern holds for any power `k`:

Ak=PDkP1A^k = PD^kP^{-1}

Calculating `Dᵏ` is incredibly easy—you just raise each diagonal element to the `k`-th power.

When is a Matrix Not Diagonalizable?