Let $A$, $B$ be two $n\times n$ matrices over $\mathbb{C}$. If $AB=BA$ then there exists a basis $\mathcal B$ such that under this basis, the matrices of $A$, $B$ are both upper triangular. How to prove this?
I know how to prove the following: If $A$, $B$ are diagonalizable and commute, then they are simultaneously diagonalizable. Will the proof here be similar?
Moreover, give an example such that $A$, $B$ don't commute and are not simultaneously triangularizable. Also give an example such that $A$, $B$ commute but are not diagonalizable, then they are not simultaneously diagonalizable.
I will be very grateful if you post your answers and share with me. Helps is really in need urgently. Thanks a lot.