← Back to Linear Algebra

Diagonalizing Square Matrices

A square matrix simplifies into a diagonal scaling map when expressed in a basis of its own eigenvectors.

The Diagonalization Condition

An n-by-n matrix is diagonalizable if and only if it has n linearly independent eigenvectors. When this holds, these eigenvectors span the vector space and decouple the transformation into independent 1D scalings along coordinate axes.

A = P D P^{-1}

Constructing P and D

To diagonalize A, assemble the n independent eigenvectors as the columns of an invertible change-of-basis matrix P. The matrix D is a diagonal matrix containing the corresponding eigenvalues aligned in the exact same column order.

P = \begin{bmatrix} v_1 & v_2 & \dots & v_n \end{bmatrix}, \quad D = \operatorname{diag}(\lambda_1, \lambda_2, \dots, \lambda_n)

Computing Matrix Powers

Factoring a matrix via diagonalization makes calculating high powers computationally straightforward. Because neighboring factors of P and its inverse cancel into the identity, computing the power of A reduces to raising the scalar entries on the diagonal of D to that power.

A^k = (P D P^{-1})^k = P D^k P^{-1}

Flashcard

A = P D P^{-1}

Eigendecomposition factoring a matrix into eigenvector and eigenvalue components

The columns of P form an eigenbasis that diagonalizes A into D. The inverse matrix changes coordinates into this eigenbasis, D scales each coordinate by its eigenvalue, and P transforms coordinates back.

Check your understanding

Which condition guarantees that an n-by-n matrix A is diagonalizable?

← Previous lesson Next lesson →