01 / 20
n

Matrix Powers via
Diagonalization

Learn how to compute \(A^n\) efficiently by decomposing a matrix into its eigenvalues and eigenvectors: the key technique that turns repeated multiplication into simple exponentiation.

Linear Algebra

What Is Diagonalization?

Diagonalization is the process of finding an invertible matrix \(P\) and a diagonal matrix \(D\) such that a square matrix \(A\) can be written as:

$$A = PDP^{-1}$$
\(P\)
Matrix whose columns are the eigenvectors of \(A\)
\(D\)
Diagonal matrix with eigenvalues \(\lambda_1, \lambda_2, \dots\) on the diagonal
\(P^{-1}\)
The inverse of the eigenvector matrix \(P\)

Why Compute Matrix Powers?

Computing \(A^n\) arises in many real-world applications. Multiplying \(A\) by itself \(n\) times is slow: it costs \(O(n \cdot d^3)\) operations. Diagonalization reduces this to a single matrix multiply plus raising scalars to powers.

Dynamical Systems
State after \(n\) time steps: \(\mathbf{x}_n = A^n \mathbf{x}_0\)
Markov Chains
Long-run probabilities from transition matrix powers
Fibonacci Numbers
Closed-form via \(2 \times 2\) matrix exponentiation

The Key Insight: Powers Simplify

When \(A = PDP^{-1}\), multiplying \(A\) by itself causes the inner terms to cancel. Watch what happens with \(A^2\):

$$A^2 = (PDP^{-1})(PDP^{-1}) = PD\underbrace{(P^{-1}P)}_{I}DP^{-1} = PD^2P^{-1}$$

The Diagonalization Theorem

A = P
\(\lambda_1\)
\(\lambda_2\)
\(P^{-1}\)
\(A^n\)
\(=PD^nP^{-1}\)

Diagonalizable vs. Not Diagonalizable

Diagonalizable Not Diagonalizable
Eigenvectors \(n\) linearly independent Fewer than \(n\) independent
Eigenvalues Distinct (sufficient) Repeated with deficient eigenspaces
Example \(\begin{pmatrix}2&0\\0&3\end{pmatrix}\) \(\begin{pmatrix}2&1\\0&2\end{pmatrix}\)
Computing \(A^n\) \(PD^nP^{-1}\) Use Jordan form or other methods

How to Compute \(A^n\): Step by Step

1
Find eigenvalues. Solve \(\det(A - \lambda I) = 0\) to get \(\lambda_1, \lambda_2, \dots\)
2
Find eigenvectors. For each \(\lambda_i\), solve \((A - \lambda_i I)\mathbf{v} = \mathbf{0}\)
3
Build \(P\) and \(D\). Columns of \(P\) are eigenvectors; diagonal of \(D\) holds eigenvalues (in matching order)
4
Compute \(P^{-1}\). Use the inverse formula for the size of \(P\)
5
Assemble: \(A^n = P \cdot \text{diag}(\lambda_1^n, \lambda_2^n, \dots) \cdot P^{-1}\)

Example 1: Find \(A^n\) for a \(2 \times 2\) Matrix

Let \(A = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}\). We want to find a general formula for \(A^n\).

Example 1: Assembling the Result

Example 2: Fibonacci Matrix

The Fibonacci recurrence \(F_{n+1} = F_n + F_{n-1}\) can be written as a matrix equation:

$$\begin{pmatrix}F_{n+1}\\F_n\end{pmatrix} = \begin{pmatrix}1&1\\1&0\end{pmatrix}^n \begin{pmatrix}1\\0\end{pmatrix}$$

Example 3: A Specific Power

Compute \(A^4\) for \(A = \begin{pmatrix}5&4\\1&2\end{pmatrix}\).

Visualizing the Decomposition

Standard Basis
\(\mathbf{e}_1\)
\(\mathbf{e}_2\)
\(\mathbf{x}\)
\(P^{-1}\)
Change basis Eigen Basis
\(\mathbf{v}_1\)
\(\mathbf{v}_2\)
Scale by \(\lambda_1^n, \lambda_2^n\)
\(D^n\)
\(P\)
Change back Result
\(A^n\mathbf{x}\)

Properties of \(D^n\)

Since \(D\) is diagonal, its powers are trivially computed. Each entry is independent:

$$D^n = \begin{pmatrix}\lambda_1^n & 0 & \cdots & 0 \\ 0 & \lambda_2^n & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_k^n\end{pmatrix}$$
\(|\lambda| > 1\)
\(\lambda^n\) grows: the component along that eigenvector expands
\(|\lambda| = 1\)
\(\lambda^n\) stays bounded: the component oscillates or stays fixed
\(|\lambda| < 1\)
\(\lambda^n \to 0\): the component decays to zero

When Can You Diagonalize?

✓
Distinct eigenvalues: If all \(n\) eigenvalues are different, \(A\) is always diagonalizable
✓
Symmetric/Hermitian matrices: Real symmetric matrices are always diagonalizable (via orthogonal eigenvectors)
?
Repeated eigenvalues: Check if geometric multiplicity equals algebraic multiplicity for each eigenvalue
✕
Defective matrices: If any eigenvalue has fewer independent eigenvectors than its algebraic multiplicity, diagonalization fails

Common Mistakes to Avoid

✕ Wrong Column Order
The columns of \(P\) must match the order of eigenvalues on the diagonal of \(D\). Swapping columns of \(P\) without swapping diagonal entries gives incorrect results.
✕ Forgetting \(P^{-1}\)
Writing \(A^n = PD^n\) and omitting the \(P^{-1}\) factor. The full formula is \(A^n = PD^nP^{-1}\): all three pieces are essential.
✕ Assuming All Matrices Diagonalize
Not every matrix is diagonalizable. Always verify you have \(n\) linearly independent eigenvectors before applying the method.

Summary: The Full Pipeline

Step Operation Result
1 \(\det(A - \lambda I) = 0\) Eigenvalues \(\lambda_1, \dots, \lambda_n\)
2 \((A - \lambda_i I)\mathbf{v} = \mathbf{0}\) Eigenvectors \(\mathbf{v}_1, \dots, \mathbf{v}_n\)
3 Form \(P\) and \(D\) \(P = [\mathbf{v}_1 | \cdots | \mathbf{v}_n]\), \(D = \text{diag}(\lambda_i)\)
4 Invert \(P\) \(P^{-1}\)
5 Multiply \(A^n = PD^nP^{-1}\)

Question 1 of 5

If \(A = PDP^{-1}\), which expression correctly gives \(A^3\)?

Question 2 of 5

A \(3 \times 3\) matrix has eigenvalues \(\lambda_1 = 2\), \(\lambda_2 = -1\), \(\lambda_3 = 4\). What is \(D^5\)?

Question 3 of 5

Which matrix is not diagonalizable?

Question 4 of 5

For \(A = \begin{pmatrix}2&1\\0&3\end{pmatrix}\), what is \(A^3\)?

Question 5 of 5

A diagonalizable matrix \(A\) has eigenvalues \(\lambda_1 = 0.5\) and \(\lambda_2 = 0.8\). What happens to \(A^n\) as \(n \to \infty\)?