Jordan form and its elements I am confused by the following question...

Find a matrix $A \in R^{3\times3}$, such that the minimal polynomial of $A$ is $(\lambda - 1)^2(\lambda + 2)$ and $\forall p,q \in \left\{ 1, 2, 3 \right\}$, $[A]_{pq} \in Z - \left\{0\right\}$ and $|[A]_{pq}| \leq 5$

The first thought that came to me is to construct the dot diagram by the minimal polynomial then write down the Jordan canoncial form, like this
$$
\begin{bmatrix} 
1 & * & * \\ 
1 & 1 & * \\
* & * & -2 \\ \end{bmatrix}
$$
In my opinion, it should fill $0$ to those $*$; however, I don't know how to fill in with other integers.
 A: Filling in the $\ast$ with $0$'s will give you the Jordan normal form of the matrix you're looking for.  Then you just need to conjugate it (which does not change the minimal polynomial) into a matrix with the non-zero entries that you want.  For example, conjugating by
$\begin{bmatrix}1&-1&1\\0&1&-1\\1&0&-1\end{bmatrix}$
does the trick.
A: A way to get an example regardless of what entry you wish in the $3,3$ position (and its negative in the linear factor of the characteristic polynomial) is to write down the Jordan Canonical Form including $0$ where you have your stars. That is set
$$ \mathbf{J}=
\begin{bmatrix} 
1 & 0 & 0 \\ 
1 & 1 & 0 \\
0 & 0 & -2 \\ \end{bmatrix}
$$
(or $1$ in the $3,3$ slot if you replace the last factor $(\lambda -1)$  in the characteristic polynomial by $(\lambda -2)$.
Now all you have to do is produce a nice $3\times 3$ matrix with integer entries that has an inverse with integer entries.  I picked $$ \mathbf {P} =
\begin{bmatrix} 
2 & 3 & 0 \\ 
1 & 1 & 0 \\
2 & 3 & 1 \\ \end{bmatrix}
$$
and computed $\mathbf{P}^{-1}\mathbf{JP}$.  No good--zeros in the last column. Pick another matrix $\mathbf{P_1}$ and compute $(\mathbf{PP_1})^{-1}\mathbf{JPP_1}$. Bingo! 
\begin{bmatrix} 
7 & 9 & -18 \\ 
-24 & -29 & 54 \\
-10 & -12 & 22 \\ \end{bmatrix}
works (unless I copied it wrong from my CAS). And it took much less time then writing this.  Now for you--why did it work and how did I know the inverse of $\mathbf{P}$ would have all integer entries?
