Prove that if A is diagonalisable then the minimal polynomial is square free I know the question has already been asked few times but I don't really understand the proofs. Can someone clarify why if the matrix of a linear application is diagonalisable, its minimal polynomial must be square free? I understand the contrary implication.
 A: Let
$$\mu_A(x)=(x-\lambda_1)\cdots(x-\lambda_p)$$
the minimal polynomial of the matrix $A$ such that $\lambda_i\ne\lambda_j$ for $i\ne j$ then by the primary decomposition theorem we have
$$\Bbb R^n=\ker(A-\lambda_1 I)\oplus\cdots\oplus\ker(A-\lambda_p I)$$
so relative to a basis adapted to the previous decomposition of $\Bbb R^n$ the matrix similar to $A$ is clearly diagonal.
Edit For the other way: If $A$ is diagonalizable then let $(e_1,\ldots,e_n)$ a basis of eigenvectors. Let $P(x)=(x-\lambda_1)\cdots(x-\lambda_p)$. It suffices to prove that $A$ annihilates $P$. Let $x\in\Bbb R^n$ then
$$x=\sum_{k=1}^n x_k e_k$$
and then
$$P(A)x=(A-\lambda_1I)\cdots(A-\lambda_pI)x=0$$
since if $e_k$ is associated to $\lambda_i$ then $(A-\lambda_iI)e_k=0$ and notice that $(A-\lambda_iI)$ and $(A-\lambda_j I)$ commute.
A: You are stumbling on the easier direction. If $P^{-1}AP$ is diagonal $D$ with set of diagonal entries $S$ (not a multiset; each value can be there just once at most), the square-free polynomial $P=\prod_{\lambda\in S}(X-\lambda)$ annihilates $D$, and therefore also the similar matrix $A$. That it annihilates $D$ is because a $P$ applied to a diagonal matrix gives the diagonal matrix obtained by applying $P$ to each of the diagonal entries.
