Dimension of commutator of an $n \times n$ matrix $A$ is $n$ implies that min poly and ch poly of $A$ coincides. Let $A$ be an $n \times n$ matrix over a field $\mathbb{F}.$ Then consider the subspace of $M_n(\mathbb{F})$ given by $W=\{ B \in M_n(\mathbb{F}): AB =BA\}.$ Then I know $\text{dim}(W) \geq n$ from my earlier question (Dimension of centraliser of an $n \times n$ matrix is atleast n.) 

How can I show that $\text{dim}(W)=n$ will imply minimal polynomial equals the characteristic polynomial of $A.$

So enough to show that $I,A,A^2,\ldots,A^{n-1}$ are linearly independent. Does it follow immediately ? I cannot see it. 

Also what can we say about the converse ? i.e., minimal polynomial of $A$=characteristic poly of $A$ imply that $\text{dim}(W)=n$ ?

I really need some help. Thank you.
 A: Up to a change of basis in $F^n$, we may assume that $A$ is in  Frobenius normal form, cf.
https://en.wikipedia.org/wiki/Frobenius_normal_form
there are monic polynomials $(p_i)_{i\leq k}\in F[x]$ s.t. 
i) $p_1|p_2|\cdots|p_k$, $p_k$ is the minimal polynomial of $A$ and $p_1\cdots p_k$ is the characteristic polynomial of $A$.
ii) $A=diag(C_{p_1},\cdots,C_{p_k})$, where $C_p$ is the companion matrix of the polynomial $p$. cf.
https://en.wikipedia.org/wiki/Companion_matrix
Note that $C_p$ is cyclic because $e_1,f(e_1),\cdots,f^{(degree(p)-1)}(e_1)$ is a basis of $F^n$. Therefore, it is not difficult to see that
a) the minimal polynomial of $C_p$ is $p$.
b) the commutant of $C_p$ is $F[C_p]$ (the matrices that  are polynomials in $C_p$), and then, has dimension $degree(p)$.
Now, we show the equivalence of the two hypotheses considered by the OP.
$\Leftarrow$ If the minimal polynomial has degree $n$, then $p_k=p_1\cdots p_k$ and $k=1$, that is $A=C_{p_1}$ is cyclic; according to b), $dim(W)=n$.
$\Rightarrow$ Assume that $dim(W)=n$ and $k>1$; we look for a contradiction. Let  $Z=\{B=diag(B_1,\cdots,B_k);C_{p_i}B_i=B_iC_{p_i}\}$; according to b) $dim(Z)=degree(p_1)+\cdots +degree(p_k)=n$ and $W=Z$. Considering a matrix in the form $B=diag(U_{degree(p_1)+degree(p_2)},I_{n-degree(p_1)-degree(p_2)})\in W$, we reduce the problem to the case $k=2$, $A=diag(C_p,C_q)$ where $p|q$.
Let $B=\begin{pmatrix}0&X\\0&0\end{pmatrix}$; $B\in W$ iff  $C_pX-XC_q=0$. This Sylvester equation has a non-zero solution iff $C_p$ and $C_g$ have a common eigenvalue, that is, iff $p$ and $q$ have a common root, that is true because $p|q$. We obtain a matrix $B$ which is  in $W\setminus Z$, that is a contradiction and we are done.  $\square$
