[Math] Finding a diagonal matrix with the form $P^{-1}AP$ and a basis order

eigenvalues-eigenvectorslinear algebra

Consider the matrix:

$$M = \begin{bmatrix}
3 & 1 & 1 \\[0.3em]
2 & 4 & 2 \\[0.3em]
1 & 1 & 3
\end{bmatrix}$$

It has the eigen-values: $\lambda = 2,6$.

Now, $V_{\lambda=2}$ is spanned by $\{ (1,-1,0), (1,-2,1) \}$ and $V_{\lambda=6}$ is spanned by $\{ (3,2,1) \}$

We have those vectors as a basis of $\mathbb{Q}^3$ and therefore; if we denote $P=(v_1,v_2,v_3)$ then:

$$ P^{-1}AP = \begin{bmatrix}
2 & 0 & 0 \\[0.3em]
0 & 2 & 0 \\[0.3em]
0 & 0 & 6
\end{bmatrix}$$

It happened to be that $v_1 = (1,-1,0), v_2 = (1,-2,1), v_3 = (3,2,1)$ – But how can one tell this (the order of the basis) without any trial and error?

Thanks.

Best Answer

You have a little bit of leeway when it comes to diagonalization.

There are multiple ways to diagonalize a matrix (depending on how you arrange your eigenvalues), but a simple rule to check whether one will work. Let me explain.

In the example you have given, you set up your diagonal matrix of eigenvalues as:

$$D = P^{-1}AP = \begin{bmatrix}2 & 0 & 0 \\ 0 & 2 & 0 \\0 & 0 & 6 \end{bmatrix}$$

But, really there is no reason why you couldn't write:

$$D' = P'^{-1}AP'= \begin{bmatrix}6 & 0 & 0 \\ 0 & 2 & 0 \\0 & 0 & 2 \end{bmatrix}$$

However, once your diagonal matrix of eigenvalues $D$ is set, we need to choose our matrix of eigenvectors $P$ in a special way. The condition (or rule) that we need to satisfy is to arrange the columns of the matrix $P$ so that the first column is an eigenvector of the first eigenvalue in the diagonal matrix $D$, the second column is a (different) eigenvector corresponding to the second eigenvalue in $D$, and so on.

So, for instance, the matrix $D$ above could have the following matrix $P$ (where we have used the eigenvectors as given in the statement of the question):

$$P = \begin{bmatrix} 1 & 1 & 3 \\ -1 & - 2 & 2 \\ 0 & 1 & 1 \end{bmatrix}$$

Each column of $P$ is an eigenvector of the corresponding entry in the matrix $D$.

For the matrix $D'$, where the first eigenvalue is 6, our matrix $P'$ would have to have the eigenvector corresponding to the eigenvalue 6 in its first column:

$$P = \begin{bmatrix} 3 & 1 & 1 \\ 2 & - 1 & -2 \\ 1 & 0 & 1 \end{bmatrix}$$

The bottom line: there is no fixed, unique way to diagonalize a matrix, since we can rearrange the eigenvalues in the diagonal matrix. However, once we set our matrix $D$, the matrix $P$ must correspond to that $D$ by having the corresponding eigenvectors arranged in the same order as their eigenvalues appear in the diagonal matrix.