# Find $k$ so the matrix is similar to a diagonal matrix

I have the matrix

$$A=\begin{bmatrix} 2 && -2 && k \\ -1 && 2 && 0 \\ -2 && 0 && 2 \end{bmatrix}$$

Now I need to calculate the parameter $k$ so the matrix is similar to a diagonal matrix. After I have found $k$ I need to calculate the matrix $P$ so that the matrix $P^{-1}AP$ is a diagonal matrix.

I calculated the characteristic polynomial of the matrix $A$: $(2 - \lambda)(\lambda^2 - 4 \lambda + 2k + 2)$ (correct me if I'm wrong here). From the polynomial I can se that one eigenvalue is $2$. Now I need to find other eigenvalues from the second part of the polynomial. Here I get kind of stuck. I know that the polynomial is equal to $0$ if $2k + 2 = 0$. From here I get $k=-1$. Now how do I get the eigenvalues? Can I return the calculated $k$ to the characteristic polynomial and then calculate $\lambda^2 - 4\lambda = 0$. Then I would get $\lambda=0$ and $\lambda=4$. Hereby, my matrix $A$ would have 3 different eigenvalues and would be similar to the a diagonal matrix and $P$ would be a matrix formed of eigenvectors I guess. I just need someone to correct me if I'm wrong, or propose a different solution. And also, is this the only possible value of $k$? Thanks

So, the problem is to find $k$ such that the matrix is diagonalizable. From the characteristic polynomial , $(\lambda-2)(\lambda^2-4\lambda+2k+2)$ we get 2 as one eigenvalue. So, next to find the value of $k$ for which $\lambda^2-4\lambda+2k+2$ does not give us the same root. $i.e.\quad k\neq1$.

Moreover, we can see that for $k=1$, the characteristic polynomial becomes $(\lambda-2)^3$. $i.e.$ 2 is an eigenvalue with algebraic multiplicity 3.But $Null(A-2I)=1$. Hence $A$ no diagonalizable.

You did not say which is the field that you are working with. I shall assume that it happens to be $\mathbb R$.
If the polynomial $P(\lambda)=\lambda^2-4\lambda+2k+2$ has two real roots, none of which is $2$, then your matrix is similar to a diagonal matrix. Since $P(2)=2k-2$, you want to have $k\neq1$. Furthermore, $P(\lambda)$ has $2$ real roots distinct if and only if $8-8k>0$, that is, if and only if $k<1$. Therefore, your matrix is similar to a diagonal matrix if $k<1$ and it is not similar to a diagonal matrix if $k>1$.
If $k=1$, then the only eigenvalue is $2$. Since your matrix is not twice the identity matrix, it is not similar to a diagonal matrix.
• Yes, it is the $\mathbb R$ field, forgot to write that. Okay, so the matrix will have 3 distinct eigenvalues for any value of $k<1$. But what about the values greater than 1. How are we sure that the matrix won't be diagonalizable if it has less than 3 distinct eigenvalues? It might still have 3 linear independent eigenvectors. And how would I find the matrix $P$ then? If you could just clear that up for me, I am kind of confused. Thanks ;) – ivana14 May 28 '17 at 18:34
• If $k>1$, then there are eigenvalues in $\mathbb{C}\setminus\mathbb{R}$ and therefore the matrix will not be similar to a diagonal matrix then. – José Carlos Santos May 28 '17 at 18:37
• And how would I find $P$? Do I take any eigenvalues I could get when $k<1$ and calculate eigenvectors which form $P$ or is there a better approach? I guess I $P$ could take many different values.. – ivana14 May 28 '17 at 19:06
• Indeed, that is how I would do it. But I am baffled by your exepression "any eigenvalues I could get when $k<1$". I proved that there are exactly $3$ eigenvalues. – José Carlos Santos May 28 '17 at 19:28
• sorry, what I meant was would the eigenvalues $A$ would have if $k$ was, for example, $0$, be different than the eigenvalues $A$ would have if $k$ was, for example $-1$. I guess they would be, so I asked if I could use any of these sets to find $P$. – ivana14 May 28 '17 at 19:40