Showing diagonalisability using primary decomposition I am trying to solve the following exercise (not to be handed in):

Let $T : V \rightarrow V$ be a $\mathbb{F}$-linear map with $\dim V < \infty$. Suppose 
  that $p(T)=0$ for some monic polynomial $p(x) \in \mathbb{F}[x]$ which factorizes into distinct linear factors. Show
  that $T$ is diagonalisable.

Since $p(T) = 0$ and $p(x)$ factorizes into some, say $n$ distinct linear factors, I can decompose $V$ into a direct sum of kernels in the following way
$$V = \ker a_1 \oplus \ker a_2 \oplus \ldots \oplus \ker a_n$$
where $p(x) = a_1 \cdot a_2 \cdots a_n$ is the factorization of $p(x)$. But how do I use this to show that $T$ is diagonalisable?
Since this is meant for exam study and is not really homework, I would like the solution to be more than a hint.
 A: The point here is the word "linear". If the factors are linear, it means that are of the form $t - \lambda$. Then, the invariant subspaces in your decomposition are just eigenvector subspaces:
$$
\mathrm{Ker} (T - \lambda \mathrm{Id}) \ .
$$
So, you pick a basis of each one -which will be formed by eigenvectors-, and put all these bases together, obtaining a basis of $V$ made out of eigenvectors. Thus, $T$ is diagonalisable. 
A: As stated in my lecture note the theorem say that if we have a decomposition
of the minimal polynomial of $T$ into irreducible elements in $\mathbb{F}[\lambda]$ 
$$m_{T}(x)=(\varphi_{1}(\lambda))^{c_{1}}...(\varphi_{r}(\lambda))^{c_{r}}$$
Then there are $r$ invariant subspaces $$W_{1},...W_{r}$$ s.t $$V=W_{1}\oplus...\oplus W_{r}$$
and $T|_{W_{i}}=\varphi_{i}(\lambda))^{c_{i}}$
In your case you have some polynomial $p$ s.t $p(T)=0$ and $p$
splits into distinct linear factors, since $m_{T}\mid p$ we have it that
$m_{T}$ splits into distinct linear factors.
Let $\alpha_{1},...,\alpha_{r}\in\mathbb{F}$ s.t $m_{T}(x)=(x-\alpha_{1})...(x-\alpha_{r})$
(and recall $i\neq j\implies\alpha_{i}\neq\alpha_{j})$.
Since each $W_{i}$ is invariant and by the stated above we have that
this means $T(W_{i})\subset W_{i}$ and $\forall v\in W_{i}:\, T|_{W_{i}}(v)=\alpha_{i}v$
Denote $k_{i}:=dim(W_{i})$, then by $V=W_{1}\oplus...\oplus W_{r}$
we have it that $k_{1}+...+k_{r}=n$. Take a basis $B_{i}$ for $W_{i}$
and from $\forall v\in W_{i}:\, T|_{W_{i}}(v)=\alpha_{i}v$ deduce
that $[T|_{W_{i}}]_{B_{i}}$ is of the form $$diag(\alpha_{i},...,\alpha_{i})$$
Since this is a direct sum we have a basis $B=\cup B_{i}$ and $[T]_{B}$is
diagonal as a direct sum of diagonal matrices.
Note: You can also use Jordan normal form to deduce that the minimal polynomial splits into distinct linear factor iff the matrix is diagonalizable but I chose to do it by the theorem as asked (the existence of the Jordan normal form in this case should not worry you since the eigenvalues are on the field in this is sufficient, in any case there is a field containing $\mathbb{F}$ in which the Jordan normal form exist).
A: Simply realize that the minimal polynomial consists of different linear factors. If this is the case T is diagonalisable (To see this use the primary decomposition, every characteristic subspace is of dimension 1).
