If your n x n matrix has n distinct eigenvalues, you know already that the corresponding eigenvectors are linearly independent, so the matrix can be diagonalized.
If your n x n matrix has fewer than n distinct eigenvalues, it may or may not be diagonalizable – it depends on the dimensions of its eigenspaces. Here's how that works.
There are two important numbers associated with each eigenvalue.
For any matrix A with an eigenvalue λk |
|
|
The relevant point:
|
Proof. (omitted) |
The algebraic multiplicities of all the eigenvalues (real or complex) of an n x n matrix add up to n, the degree of its characteristic polynomial. To get enough linearly independent eigenvectors, then, none of the eigenvalues can be complex, and each eigenspace must have the maximum possible dimension, equal to the algebraic multiplicity of its eigenvalue. If any eigenspace has geometric multiplicity less than its algebraic multiplicity, then the matrix cannot be diagonalized.
When can a matrix be diagonalized? |
A square matrix can be diagonalized if and only if |
|
|
Proof. (omitted) |
For example, suppose the characteristic polynomial of a 7 x 7 matrix is p(λ) = –2(λ – 3)2(λ – 1)5. The eigenvalues are 3 and 1. If the eigenspace for the eigenvalue 1 has dimension 4, the matrix cannot be diagonalized, since the eigenspace for the eigenvalue 3 has dimension at most 2, giving a total of only 6 linearly independent eigenvectors, not 7.