The point of this chapter is (1) that diagonal matrices are awesome, and (2) to explain the conditions under which one has a *diagonalizable *matrix on their hands. As to why one would want to diagonalize a matrix, see (1).

### Diagonal matrices

A **diagonal **matrix is a square matrix satisfying unless . Diagonal matrices have the nicest possible properties in their algebra. If and are diagonal matrices of size , then

- , , and are diagonal. More to the point, !
- and is zero if any of the diagonal entries of are.

* e.g. *Let

First, is diagonal. Second, .

Finally, observe that for any basis vector , that . In other words, all a diagonal matrix does to the basis vectors is scale them. (This will be important later.)

### Similar matrices

Recall that all matrices represent linear transformations written in a given basis. If a matrix is square, it represents a linear operator (a linear map from a space to itself, up to isomorphism). If two square matrices and represent the same linear operator, then they are **similar** and we write .

From another point of view, the only difference between and is that they act on their vector space in terms of different bases. Therefore, there is a change of basis matrix such that : either you act on the space and then change the basis or change the basis and then act on the space, but the result is the same. Therefore, an equivalent definition of similarity is the existence of an invertible matrix such that .

An obvious application of this concept is to ask whether a given square matrix is **diagonalizable**, or similar to a diagonal matrix.

### Eigenvectors and eigenvalues

Remember that a diagonal matrix just scales the basis elements. Let’s put some math into that sentence. If is a linear operator on , then is an **eigenvector** of the **eigenvalue ** if

The eigenvectors of form a vector space,

which is a subspace of .

Therefore, *acts diagonally* on its eigenvectors. If we could write the whole space in terms of the eigenvectors, then we could find a diagonal matrix for .

*is diagonalizable if its eigenvectors form a basis for *.

How do you find eigenvalues for a square matrix , then? We must solve the equation

for and . First, write ; now we can subtract and distribute.

If is a nonzero vector that destroys, then must cause . The determinant is a polynomial in , called the **characteristic polynomial **of . Its roots are the eigenvalues of . Once you have the eigenvalues, you can solve for .