# Commuting matrices are simultaneously triangularizable

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.

To show that $AB=BA$ implies that $A,B$ are simultaneously triangularizable, it is sufficient to prove that $A,B$ have a common eigenvector (after, reason by recurrence). Let $\lambda$ be an eigenvalue of $A$. Then $\ker(A-\lambda I)$ is a $B$-invariant subspace. Thus, there is an eigenvector of $B$ that is in $\ker(A-\lambda I)$. Clearly we may change $\mathbb{C}$ with any algebraically closed field.
EDIT: If $u$ is such a common eigenvector, then consider a basis $u,e_2,\cdots,e_n$. In this new basis, $A,B$ become $\begin{pmatrix}\lambda&K\\0&A_1\end{pmatrix},\begin{pmatrix}\mu&L\\0&B_1\end{pmatrix}$ with $A_1B_1=B_1A_1$ and you can conclude, using the recurrence hypothesis.
Ren, I think that the other questions are your business. Yet, you can easily prove that if $A,B$ are simult. triang., then $AB-BA$ is a nilpotent matrix.
• it is sufficient to prove that $A$, $B$ have a common eigenvector (after, reason by recurrence). How to continue? $A$, $B$ are not diagonalizable. Dec 5 '13 at 2:40
• Why there is an eigenvector of $B$ that is in $\ker(A−λI)$ if $\ker(A−λI)$ is a $B$-invariant subspace?
• @Shiquan: yes with the decomposition user91684 posted and the knowledge that $A_1$ and $B_1$ commute you can now apply the induction hypothesis. Sep 15 at 9:13
• @LMD if $U \subseteq \mathbb{C}^{n}$ is a $B \in \mathbb{C}^{n,n}$ invariant subspace with a matrix of basis vectors $X \in \mathbb{C}^{n,m}$, then there is $B_1 \in \mathbb{C}^{m,m}$ with $BX=XB_1$ (why?). $B_1$ has an eigenpair $(\mu,y)$ (why?) and calculate $BXy$ to find an eigenvector of $B$. What is the rank of $X$ and conclude why $Xy \neq 0$. Sep 15 at 9:23