Not all square matrices can be diagonalised. For example, consider the matrix
Its eigenvalues are -2, -2 and -3. Now, it's certainly possible to find a matrix S with the property that
where D is the diagonal matrix of eigenvalues. One such is
it's easy to check that
However, the trouble is that S is singular. It turns out that there is no non-singular S with the property that
and therefore no S with the property that
You may have spotted that two of the eigenvalues of A were repeated, and you may be wondering whether this has anything to do with why A can't be diagonalised. Indeed it does, but it can't be the whole story. For example, consider the matrix
Like A, B has two repeated eigenvalues: the eigenvalues of B are also -2, -2 and -3. However, B can certainly be diagonalised. It's not hard to show that if
then
Moreover, S is not singular (in fact, \text{det}(S)=-3), and therefore S^{-1} exists, meaning that
The mystery deepens slightly when we realise that our choice of S here was far from unique. We could just as easily, for example, have used the matrix
So what's going on here? What is the difference between A and B? How come they have the same eigenvalues, each with one repeat, and yet A isn't diagonalisable yet B is?
The answer is revealed when obtain the eigenvectors of the two matrices.
(i) For the eigenvalue -3, we have
which straightforwardly gives the eigenvector
(ii) For the repeated eigenvalue -2, we have
which equally straightforwardly gives the eigenvector
And that's it. We can't go any further, because there are no more eigenvalues. So we don't have three eigenvectors with which to form the diagonalising matrix S.
Contrast this with B.
(i) For the eigenvalue -3, we have
which, as before, straightforwardly gives the eigenvector
(ii) This time, for the repeated eigenvalue -2, we have
Now, here things are different, because all three of the rows of this matrix may be reduced to the equation
This represents a plane in 3D space, and any vector in this plane is an eigenvector. We may therefore form our diagonalising matrix S out of
together with any two non-parallel vectors of the form
that satisfy
that is, that are perpendicular to the vector
Both of the choices
will work fine, as will infinitely many others.
1. In general, any 3 by 3 matrix whose eigenvalues are distinct can be diagonalised.
2. If there is a repeated eigenvalue, whether or not the matrix can be diagonalised depends on the eigenvectors.
(i) If there are just two eigenvectors (up to multiplication by a constant), then the matrix cannot be diagonalised.
(ii) If the unique eigenvalue corresponds to an eigenvector {\bf e}, but the repeated eigenvalue corresponds to an entire plane, then the matrix can be diagonalised, using {\bf e} together with any two vectors that lie in the plane.
3. If all three eigenvalues are repeated, then things are much more straightforward: the matrix can't be diagonalised unless it's already diagonal.