For what values of $k$ is the following matrix diagonalizable? The matrix is:
$$\begin{bmatrix}k&1\\0&k^2\end{bmatrix}$$

I am aware that a square matrix is diagonalizable if there exists a matrix $P$ such that $D = P^{-1 }* A * P$ is a diagonal matrix.
 A: You can see that the set of the eigenvalues of the matrix is $\{k,k^2\}$.
If $k=k^2$ (that is, if $k=1$ or $k=0$) then our matrix coincides with his Jordan form. Since a matrix is diagonalizable if and only if his Jordan form is diagonal, you can conclude that our matrix is not diagonalizable.
If $k \neq k^2$, on the other hand, the matrix has distinct eigenvalues and as such is diagonalizable.
Edit: This problem is gonna be very difficult if you approach it using only the definition. You need to know a bit about eigenvalues and eigenspaces to solve it quite easily. It's a bit of theory  that isn't very hard but can't be all put in the space of an answer. You can find it in any book on basic linear algebra, though (disregard the observation on the Jordan form, you don't need it to solve this).
Sorry, I'm not able to give you a simpler answer that's not very long. Hope someone else can help you in a better way. In the meantime, notice that there are real values of $k$ such that the matrix (which I'll call $A$) is diagonalizable.
Take $k=2$ and:
$$P =\begin{pmatrix}
1 & 1\\
0 & 2
\end{pmatrix}
$$
I'll leave it to you to check that:
$$\begin{pmatrix}
2 & 0 \\
0 & 4
\end{pmatrix} = P^{-1}AP $$
