# 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 }$ [duplicate]

$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.

## marked as duplicate by Dietrich Burde, daw, user1551 linear-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Nov 19 '15 at 16:52

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.
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.