Minimal Polynomial Exercise $\newcommand{\Ker}{\operatorname{Ker}}$Let $E$ be a vector space. We are given a matrix $A$ that has a characteristic polynomial $q(t) = -(t-2)^5$. We know that $\dim\Ker(A-2I)^2 = 3$ and $\dim\Ker(A-2I)^4 = 5$. We are asked to find the minimal polynomial of $A$.
This is what I've done so far: since $\dim\Ker(A-2I)^4 = 5 = \dim(E)$, $m_A(x)$ has to divide $(x-2)^4$. Besides, $\dim*\Ker(A-2I)^2 = 3$ implies that $m_A(x)$ does not divide $(x-2)^2$. Therefore, we are left with two candidates for the minimal polynomial of $A$: $(x-2)^4$ or $(x-2)^3$. I don't know how to decide between these two.

Recall that $$ \dim \ker (A - \lambda I)^k - \dim \ker (A - \lambda I)^{k-1}$$ gives you the number of blocks corresponding to $\lambda$ of size at least $k$. See, for example: Jordan form, number of blocks.
So in this case you know that $\dim\ker(A-2I)^2 = 3$ and $\dim\ker(A-2I)^4 = 5$. Let us consider the three possibilities for $\dim\ker(A-2I)^3$.

*

*$\dim\ker(A-2I)^3=3$ is not possible. This would imply that $\dim\ker(A-2I)^k=3$ for each $k\ge 2$. (Also, this would mean that there are no blocks of size $\ge3$, which would lead to $(A-2I)^2=0$. Which is another way to get a contradiction.)

*$\dim\ker(A-2I)^3=5$ would mean that there are $5-3=2$ blocks of size at least $3\times3$. This is not possible in a $5\times 5$ matrix.

*So only one possible case remains: $\dim\ker(A-2I)^3=4$. We get $4-3=1$ block of size at least $3\times3$, and also $5-4=1$ block of size at least $4\times 4$. The Jordan form has one block $4\times4$ and one block $1\times1$.
$$J=\begin{pmatrix}
  2 & 1 & 0 & 0 & 0 \\
  0 & 2 & 1 & 0 & 0 \\
  0 & 0 & 2 & 1 & 0 \\
  0 & 0 & 0 & 2 & 0 \\
  0 & 0 & 0 & 0 & 2 \\
\end{pmatrix}$$ This gives us $m_A(x)=m_J(x)=(x-2)^4$.

