Linear Algebra
7.618 min read

Diagonalization

A matrix AA is diagonalizable if it can be written as A=PDP1A = PDP^{-1}, where DD is a diagonal matrix and PP is invertible. The columns of PP are eigenvectors and the diagonal entries of DD are the corresponding eigenvalues. This decomposition transforms AA into the simplest possible form — just scaling along eigenvector directions.

Diagonalization makes computing powers trivially easy. Since Ak=PDkP1A^k = PD^kP^{-1}, and DkD^k just raises each diagonal entry to the kk-th power: Dk=diag(λ1k,,λnk)D^k = \text{diag}(\lambda_1^k, \ldots, \lambda_n^k). For a 1000×10001000 \times 1000 matrix applied 50 times, diagonalization replaces 10910^9 multiplications with 10001000 scalar exponentiations.

An n×nn \times n matrix is diagonalizable if and only if it has nn linearly independent eigenvectors — equivalently, if the geometric multiplicity equals the algebraic multiplicity for every eigenvalue. Use the interactive diagram to explore: try the "Distinct λ" and "Symmetric" presets (both diagonalizable) versus "Not diag." (defective) and "Rotation" (complex eigenvalues).

Formal View

Theorem 7.12 — Diagonalization Theorem
An n×nn \times n matrix AA is diagonalizable if and only if it has nn linearly independent eigenvectors v1,,vn\mathbf{v}_1, \ldots, \mathbf{v}_n. When diagonalizable:
A=PDP1A = PDP^{-1}
where P=[v1vn]P = [\mathbf{v}_1 \mid \cdots \mid \mathbf{v}_n] and D=diag(λ1,,λn)D = \text{diag}(\lambda_1, \ldots, \lambda_n).
Corollary 7.13
If AA has nn distinct eigenvalues, then AA is diagonalizable. (The converse is false: a matrix can be diagonalizable even with repeated eigenvalues.)
Remark 7.14
Powers formula: Ak=PDkP1A^k = PD^kP^{-1} for any positive integer kk. More generally, for any polynomial ff, we have f(A)=Pf(D)P1f(A) = Pf(D)P^{-1} where f(D)=diag(f(λ1),,f(λn))f(D) = \text{diag}(f(\lambda_1), \ldots, f(\lambda_n)).

Interactive Visualization

Diagonalization: A = PDP⁻¹

Why This Matters

Diagonalization is the key to computing matrix powers, solving linear ODEs, and understanding long-term behavior of dynamical systems.

  • Markov chains: AkA^k converges to a steady-state as kk \to \infty when the dominant eigenvalue is 1 and all others are strictly inside the unit circle
  • Image and signal processing: diagonal operations in the eigenbasis enable fast filtering and compression
  • Quantum computing: quantum gates are often described by their spectral decomposition
  • Population dynamics: long-run growth rates of populations are determined by the dominant eigenvalue of the Leslie matrix

Quiz

Question 1

If A=PDP1A = PDP^{-1}, what is A3A^3?

Question 2

A matrix with a repeated eigenvalue is never diagonalizable.

Question 3

In the diagonalization A=PDP1A = PDP^{-1}, the columns of PP are:

Common Mistakes

  • Writing Ak=PkDkPkA^k = P^k D^k P^{-k} — the formula is PDkP1PD^kP^{-1}, not PkDkPkP^kD^kP^{-k}.
  • Confusing diagonalizable with invertible — a matrix can be diagonalizable with eigenvalue 0 (not invertible), or invertible but not diagonalizable (defective).
  • Forgetting to check that PP is invertible — if the eigenvectors are linearly dependent, the diagonalization fails.