Matrices commute if and only if they share a common basis of eigenvectors?

Suppose that $A$ and $B$ are $n\times n$ matrices, with complex entries say, that commute.
Then we decompose $\mathbb C^n$ as a direct sum of eigenspaces of $A$, say $\mathbb C^n = E_{\lambda_1} \oplus \cdots \oplus E_{\lambda_m}$, where $\lambda_1,\ldots, \lambda_m$ are the eigenvalues of $A$, and $E_{\lambda_i}$ is the eigenspace for $\lambda_i$. (Here $m \leq n$, but some eigenspaces could be of dimension bigger than one, so we need not have $m = n$.)

Now one sees that since $B$ commutes with $A$, $B$ preserves each of the $E_{\lambda_i}$: If $A v = \lambda_i v, $ then $A (B v) = (AB)v = (BA)v = B(Av) = B(\lambda_i v) = \lambda_i Bv.$

Now we consider $B$ restricted to each $E_{\lambda_i}$ separately, and decompose each $E_{\lambda_i}$ into a sum of eigenspaces for $B$. Putting all these decompositions together, we get a decomposition of $\mathbb C^n$ into a direct sum of spaces, each of which is a simultaneous eigenspace for $A$ and $B$.

NB: I am cheating here, in that $A$ and $B$ may not be diagonalizable (and then the statement of your question is not literally true), but in this case, if you replace "eigenspace" by "generalized eigenspace", the above argument goes through just as well.


This is false in a sort of trivial way. The identity matrix $I$ commutes with every matrix and has eigenvector set all of the underlying vector space $V$, but no non-central matrix has this property.

What is true is that two matrices which commute and are also diagonalizable are simultaneously diagonalizable. The proof is particularly simple if at least one of the two matrices has distinct eigenvalues.


Let $S$ be a set of commuting matrices over an algebraically closed field $F$. Then there may not be a common basis of eigenvectors (since any of them may not be diagonalizable!) but there must be at least a common eigenvector:

Burnside's theorem on matrix algebras states that if $F$ is algebraically closed, $V$ is a finite-dimensional $F$-vector space and $S$ is a proper subalgebra of $\text{End}(V)$ then there exists a nontrivial $S$-invariant subspace, i.e, there exists $W\leq V$ with $0\neq W\neq V$ such that $s(W)\subseteq W$ for every $s\in S$.

Suppose $S\subseteq M_n(F)$ with $n>1$ is commuting. Observe that a subspace of $F^n$ is $S$-invariant if and only if it is invariant for $<S>$, the subalgebra of $M_n(F)$ generated by $S$. Since $S$ is commuting, $<S>$ is also commuting and therefore $<S>\neq M_n(F)$. Burnside's theorem applies, and so there exists a proper and nontrivial subspace $V\leq F^n$ which is invariant for all $S$. If $V$ has dimension more than $1$ then $<S>\neq\text{End}(V)$, since $<S>$ is commuting, and we can apply Burnside's theorem again. By induction there exists an $S$-invariant subspace of dimension $1$, and so a common eigenvector for the matrices in $S$.