For matrices, if $AB=BA$, then does it follow that $B^{2}A=AB^{2}$?

Suppose $AB=BA$ ($A, B$ are $n\times n$ matrices). Does that mean $B^{2}A=AB^{2}$ ? I looked for counter cases and couldn't find any. I tried to prove this by multiplying both sides and comparing, but I got stuck since I don't know how to effectively use the fact that $AB = BA$. Any advice or general direction would be greatly appreciated.

• Thanks a lot, this is now very clear.
– Ron
Apr 16, 2015 at 19:56
• I see you are new here--welcome! It seems that your question has been answered to your satisfaction. A good practice to get in the habit of here is to choose the most satisfactory answer that helped you (you can do this by clicking the check mark under the down arrow by an answer score). This gives the answerer due acknowledgment and it also lets others know that you are satisfied with the answer(s) you received. You have several high-quality answers here to choose from. I'd suggest you choose whichever one helped the most. Again, welcome to MSE! Apr 16, 2015 at 20:42
We have $B(AB)=B(BA)=B^2A$ and also $(BA)B=(AB)B=AB^2$, hence indeed $B^2A=AB^2$.
Yes: $$B^2A = (BB)A = B(BA) = \ldots$$ I think now it should be clear how to go on (I've explicitly set parentheses to make it more obvious; of course you don't strictly need them).
i think so. $$B^2A = B(BA) = B(AB) = (BA)B = (AB)B = AB^2$$
Note that associativity of matrix multiplication is key. You are given that $AB=BA$. Thus, I would start by multiplying both sides of the equation you are given by $B$ on the left. This is how you could visualize it: \begin{array}{ccc} AB &=& BA\\ B(AB) &=& B(BA)\\ (BA)B &=& (BB)A\\ (AB)B &=& (BB)A\\ A(BB) &=& (BB)A\\ AB^2 &=& B^2A\\ \end{array} Thus, when we are given that $AB=BA$, it necessarily follows that $AB^2=B^2A$.