Determining a matrix given the characteristic and minimal polynomial Let $p_a=(x-2)^2(x-7)^4x$ be the characteristic polynomial of the matrix $A$ and $(x-2)^2(x-7)x$ the minimal polynomial. Determine the matrix $A$.
My work: I know the matrix has to be $7x7$ and in its diagonal it must have two $2$, four $7$ and one $0$, so:
\begin{bmatrix}{}
    2&  &  &  & & & \\
    &  2&  &  & & &\\
    & & 7 &  & & &\\
   &  &  & 7 & & &\\
    &  &  &  & 7& & \\
    &  &  &  & & 7 &\\
    &  &  &  &  &  & 0\\  \end{bmatrix} 
I don't know how to follow, what information gives me the minimal polynomial?

The minimal polynomial in this case gives you the information about the relevant Jordan blocks. Since it has $(x-2)^2$ as a factor, you must have one $2 \times 2$ Jordan block associated to the eigenvalue $2$ (and not two $1 \times 1$ Jordan blocks). To see why, note that the minimal polynomial of
$$ \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} $$
is $(x - 2)$ while the minimal polynomial of 
$$ \begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} $$
is $(x - 2)^2$.
Similarly, since the minimal polynomial has $(x-7)$ as a factor, al the Jordan blocks associated to the eigenvalue $7$ must be $1 \times 1$. Hence, $A$ is similar to the matrix
$$ \begin{pmatrix} 2 & 1 & 0 & 0 & 0 & 0 & 0 \\
0 & 2 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 7 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 7 & 0 & 0 & 0 \\
0 & 0 & 0 & 0 & 7 & 0 & 0 \\
0 & 0 & 0 & 0 & 0 & 7 & 0 \\
0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\end{pmatrix}. $$ 
