Mathwords logoMathwords

Matrix Diagonalization — Definition, Formula & Examples

Matrix diagonalization is the process of rewriting a square matrix as a product A=PDP1A = PDP^{-1}, where DD is a diagonal matrix of eigenvalues and PP is a matrix whose columns are the corresponding eigenvectors. It simplifies computations like raising a matrix to a power.

An n×nn \times n matrix AA is said to be diagonalizable if there exists an invertible matrix PP and a diagonal matrix DD such that A=PDP1A = PDP^{-1}. Equivalently, AA is diagonalizable if and only if it has nn linearly independent eigenvectors, which form the columns of PP, with the diagonal entries of DD being the corresponding eigenvalues.

Key Formula

A=PDP1A = PDP^{-1}
Where:
  • AA = The original n × n square matrix
  • PP = Invertible matrix whose columns are linearly independent eigenvectors of A
  • DD = Diagonal matrix whose diagonal entries are the eigenvalues of A

How It Works

First, find all eigenvalues of AA by solving the characteristic equation det(AλI)=0\det(A - \lambda I) = 0. Next, for each eigenvalue λi\lambda_i, find its eigenvector(s) by solving (AλiI)x=0(A - \lambda_i I)\mathbf{x} = \mathbf{0}. Arrange the eigenvectors as columns of PP and place the matching eigenvalues along the diagonal of DD. If you end up with nn linearly independent eigenvectors for an n×nn \times n matrix, the matrix is diagonalizable. A key payoff: Ak=PDkP1A^k = PD^kP^{-1}, where DkD^k is trivial to compute since you just raise each diagonal entry to the kkth power.

Worked Example

Problem: Diagonalize the matrix A = [[4, 1], [2, 3]].
Find eigenvalues: Solve det(A − λI) = 0.
det(4λ123λ)=(4λ)(3λ)2=λ27λ+10=(λ5)(λ2)=0\det\begin{pmatrix} 4-\lambda & 1 \\ 2 & 3-\lambda \end{pmatrix} = (4-\lambda)(3-\lambda) - 2 = \lambda^2 - 7\lambda + 10 = (\lambda - 5)(\lambda - 2) = 0
Find eigenvectors: For λ = 5: solve (A − 5I)x = 0, giving the eigenvector (1, 1). For λ = 2: solve (A − 2I)x = 0, giving the eigenvector (1, −2).
λ1=5:v1=(11),λ2=2:v2=(12)\lambda_1 = 5: \mathbf{v}_1 = \begin{pmatrix}1\\1\end{pmatrix}, \quad \lambda_2 = 2: \mathbf{v}_2 = \begin{pmatrix}1\\-2\end{pmatrix}
Assemble P and D: Place the eigenvectors as columns of P and eigenvalues on the diagonal of D.
P=(1112),D=(5002)P = \begin{pmatrix}1 & 1\\1 & -2\end{pmatrix}, \quad D = \begin{pmatrix}5 & 0\\0 & 2\end{pmatrix}
Answer: A = PDP⁻¹ where P = [[1, 1], [1, −2]] and D = [[5, 0], [0, 2]].

Why It Matters

Diagonalization turns repeated matrix operations into simple arithmetic on eigenvalues. In physics and engineering, it decouples systems of differential equations into independent scalar equations. It also underpins the principal component analysis (PCA) technique widely used in data science.

Common Mistakes

Mistake: Assuming every square matrix can be diagonalized.
Correction: A matrix is diagonalizable only if it has n linearly independent eigenvectors. For example, a 2×2 matrix with a repeated eigenvalue that yields only one independent eigenvector is not diagonalizable.