I have a question regarding special conditions in matrices. What are all of the special conditions where $AB=BA$ for two square matrices $A$ and $ B$? Would this be asking for multiples of the identity? What are the special conditions? Thank you.
If $B=p(A)$ for some polynomial $p$, then $AB=BA$.
A noteworthy converse case is where $A$ has a Jordan form with only one Jordan block per eigenvalue. In that case, if $AB=BA$ for some $B$, then $B=p(A)$ for some polynomial $p$.