TITLE: Find real number $a$ such that matrix $A$ is NOT diagonalisable
QUESTION [8 upvotes]: Consider the matrix:
$\begin{bmatrix}2 & a & -1\\0 & 2 & 1\\-1 & 8 & -1\end{bmatrix}$
Find all $a \in \mathbb R$ such that $A$ is not diagonalisable.
I've never thought of such a problem before. What is the systematic way to make a matrix non-diagonalisable?

REPLY [2 votes]: Addendum. I have been slow on one point; if $a$ lies outside a certain range, then there must be complex eigenvalues, that is, not real numbers. That is what the other answers and comments are emphasizing, that it might not be possible to diagonalize over the real numbers. 
Another way for non-diagonal Jordan form is real but repeated (generalized) eigenvalues, where there is not a basis of eigenvectors. This is the aspect I address below.
ORIGINAL: The derivative of the characteristic polynomial is $3(x-3)(x+1).$   When $a=5,$ we do get the characteristic polynomial as a multiple of $(x-3)^2.$  When $a=-27,$ we  get the characteristic polynomial as a multiple of $(x+1)^2.$ These lead to  non-diagonal (but real) Jordan forms, see below.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
With $a=5$ and
$$
\left(
\begin{array}{ccc}
1&-9&5 \\
1&27&5 \\
-6&18&6 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
2&4&5 \\
-1&1&0 \\
5&1&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
36&0&0 \\
0&36&0 \\
0&0&36 \\
\end{array}
\right)
$$
we get
$$
\frac{1}{36} \;
\left(
\begin{array}{ccc}
1&-9&5 \\
1&27&5 \\
-6&18&6 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
2&5&-1 \\
0&2&1 \\
-1&0&-1 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
2&4&5 \\
-1&1&0 \\
5&1&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
-3&0&0 \\
0&3&1 \\
0&0&3 \\
\end{array}
\right)
$$
The final version is called Jordan Normal Form. In the U.S. it is taught with the nilpotent part above the diagonal. In some countries, for example Uruguay, it is taught with any extra $1$s below the diagonal. 
Actually using the Jordan form for something merely requires writing out
$$
\frac{1}{36} \;
\left(
\begin{array}{ccc}
2&4&5 \\
-1&1&0 \\
5&1&1 \\
\end{array}
\right) 
\left(
\begin{array}{ccc}
-3&0&0 \\
0&3&1 \\
0&0&3 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
1&-9&5 \\
1&27&5 \\
-6&18&6 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
2&5&-1 \\
0&2&1 \\
-1&0&-1 \\
\end{array}
\right)
$$ 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
WHEN $a=-27,$
With
$$
\left(
\begin{array}{ccc}
1&-17&-3 \\
1&19&-3 \\
6&6&18 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
10&8&3 \\
-1&1&0 \\
-3&-3&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
36&0&0 \\
0&36&0 \\
0&0&36 \\
\end{array}
\right)
$$
we get
$$
\frac{1}{36} \;
\left(
\begin{array}{ccc}
1&-17&-3 \\
1&19&-3 \\
6&6&18 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
2&-27&-1 \\
0&2&1 \\
-1&0&-1 \\
\end{array}
\right)
 \left(
\begin{array}{ccc}
10&8&3 \\
-1&1&0 \\
-3&-3&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
5&0&0 \\
0&-1&1 \\
0&0&-1 \\
\end{array}
\right)
$$
$$
\frac{1}{36} \;
 \left(
\begin{array}{ccc}
10&8&3 \\
-1&1&0 \\
-3&-3&1 \\
\end{array}
\right) 
\left(
\begin{array}{ccc}
5&0&0 \\
0&-1&1 \\
0&0&-1 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
1&-17&-3 \\
1&19&-3 \\
6&6&18 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
2&-27&-1 \\
0&2&1 \\
-1&0&-1 \\
\end{array}
\right)
$$
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=