If $B ∈ M_n(F)$ such that AB = BA, prove that $B = a_0 + a_1A + a_2A^2 + ··· +a_{n−1}A^{n−1 }$ $Let\ A ∈ M_n(F)$\ such that $A^n = 0$ but $A^{n−1} \neq 0.$
$If\ B ∈ M_n(F)$ such that $AB = BA$, prove that $B = a_0 + a_1A + a_2A^2 + ··· +a_{n−1}A^{n−1} $
for some $a_0,...,a_{n−1} ∈ F.$
I only know that $AB^n = B^nA$, and $\{v,Av,...,A^{n-1}v\}$ is a basis of $F^n$,
but I'm not sure if they are useful.
 A: Hint
If $B=\sum_i a_i A^i$ then surely $Bv=\sum_i a_i A^iv$. However the collection $\{A^i_v\}_i$ forms a basis so there is exactly one way to express $Bv$ in this basis. So this gives us a way to find the $a_i$. From here just apply $B$ to all the base vectors.
A: First, $A^n=0$ and $A^{n-1}\ne0$ means that $A$ is nilpotent, and its characteristic polynomial is equal the minimal polynomial. Thus there is an invertible matrix $S$ such that
$$
S^{-1}AS=\pmatrix{0&1&0 \dots\\ 0&0&1&\dots\\ \dots}=:J
$$
i.e., it is just one Jordan block to the eigenvalue $0$. Now write $C:=S^{-1}BS$, then it holds $JC=CJ$. Write $C=(c_{ij})$ the we see
$$
CJ = \pmatrix{ 0&c_{11}& \dots &c_{1,n-1}\\\vdots &\vdots&& \vdots\\0&c_{n1}& \dots &c_{n,n-1}}
= JC=\pmatrix{ c_{21}& \dots &c_{2n}\\\vdots && \vdots\\c_{n1}& \dots &c_{nn}\\ 0 & \dots &0}.
$$
We immediately see that $c_{n1}\dots c_{n,n-1}$ and $c_{21}\dots c_{n1}$ must be zero. Moreover $c_{ij}=c_{i+1,j+1}$ for all $i,j=1\dots n-1$. Hence the matrix $C$ has the form
$$
C=\pmatrix{ c_{11} & c_{12} &  \dots & c_{1n} \\ 0&c_{11} &   \dots & c_{1n} \\ \vdots & \ddots &\ddots&\ddots\\ 0&0&\dots&c_{11}},
$$
which is nothing else than $C=\sum_{i=0}^{n-1} c_{1,i+1} J^{i}$. This implies
$$
B = SCS^{-1} = \sum_{i=0}^{n-1} c_{1,i+1}S J^{i}S^{-1} =\sum_{i=0}^{n-1} c_{1,i+1}A^i,
$$
which is the claim.
