Let $A$, $B$ be complex matrices that commute. Show that if they are $2$x$2$, then there is a polynomial $p$ such that either $p(A)=B$ or $p(B)=A$. Show the result is false for $3$x$3$.
I'm not really sure where to start with this problem. The only way I could think of $2$x$2$ being relevant, was that you know exactly what the coefficients of the characteristic polynomials are (in terms of trace and determinant). But this doesn't seem to help. Can someone provide a hint how to get start? Thank you.