In one of my exams I'm asked to prove the following

Suppose $A,B\in \mathbb R^{n\times n}$, and $AB=BA$, then $A,B$ share the same eigenvectors.

My attempt is let $\xi$ be an eigenvector corresponding to $\lambda$ of $A$, then $A\xi=\lambda\xi$, then I want to show $\xi$ is also some eigenvector of $B$ but I get stuck.
Could anyone help me out here? Thanks in advance!

  • 4
    $\begingroup$ It's enough to make both matrices diagonalizable. $\endgroup$ – Omnomnomnom Apr 9 '15 at 14:40
  • $\begingroup$ Take $A=I$ and $B=2I$, then they have different eigenvalues but they commute. What you can say, though, is that if $AB=BA$ then $A$ is diagonalizable iff $B$ is and then they can be diagonalized simultaneously $\endgroup$ – Shai Deshe Apr 9 '15 at 14:43
  • 2
    $\begingroup$ @Vim: read math.stackexchange.com/questions/6258/…. $\endgroup$ – Dietrich Burde Apr 9 '15 at 14:43

(Modified) Answer of Qiaochu Yuan here: 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 other matrix except a multiple of the identity matrix has this property.

  • 3
    $\begingroup$ "but no non-identity matrix has this property." — Wrong. For every number $c$, the matrix $cI$ also has that property. For $c\ne 1$ that matrix clearly is not the identity matrix (for $c=0$ it doesn't even have the same rank). $\endgroup$ – celtschk Apr 9 '15 at 14:50
  • $\begingroup$ @celtschk : $\;\;\;$ For $\: n = 0 \:$ those matrices clearly are the identity matrix. $\;\;\;\;\;\;\;$ $\endgroup$ – user57159 Apr 9 '15 at 15:50
  • $\begingroup$ @RickyDemer: But then, for $n=0$ the claim is trivially true, not trivially false, since in that case the sets of eigenvectors (always the empty set, since eigenvectors are by definition non-zero) of any commuting matrices $A$ and $B$ (where we always have $A=B$) are identical. $\endgroup$ – celtschk Apr 9 '15 at 15:57

Sorry for my poor English first.

The answer is in the book "Linear algebra and its application" by Gilbert Strang.

I'll just write down what he said in the book.

"Starting from $Ax=\lambda x$, we have

$$ABx = BAx = B \lambda x = \lambda Bx$$

Thus $x$ and $Bx$ are both eigenvectors of $A$, sharing the same $\lambda$ (or else $Bx = 0$). If we assume for convenience that the eigenvalues of $A$ are distinct – the eigenspaces are one dimensional – then $Bx$ must be a multiple of $x$. In other words $x$ is an eigenvector of $B$ as well as $A$."

There's another proof using diagonalization in the book.

Anyways, how did you guys put λ and other symbols in a math type?

  • $\begingroup$ You should look at mathematics meta, search for Mathjax tutorial. $\endgroup$ – Zach466920 Apr 9 '15 at 15:03
  • 2
    $\begingroup$ So the assertion holds if $A$ and $B$ only have eigenvalues of multiplicity 1. This is probably the best we can hope for. $\endgroup$ – Klaus Draeger Apr 9 '15 at 16:23

Commuting matrices do not necessarily share all eigenvector, but generally do share a common eigenvector.

Let $A,B\in\mathbb{C}^{n\times n}$ such that $AB=BA$. There is always a nonzero subspace of $\mathbb{C}^n$ which is both $A$-invariant and $B$-invariant (namely $\mathbb{C}^n$ itself). Among all these subspaces, there exists hence an invariant subspace $\mathcal{S}$ of the minimal (nonzero) dimension.

We show that $\mathcal{S}$ is spanned by some common eigenvectors of $A$ and $B$. Assume that, say, for $A$, there is a nonzero $y\in S$ such that $y$ is not an eigenvector of $A$. Since $\mathcal{S}$ is $A$-invariant, it contains some eigenvector $x$ of $A$; say, $Ax=\lambda x$ for some $\lambda\in\mathbb{C}$. Let $\mathcal{S}_{A,\lambda}:=\{z\in \mathcal{S}:Az=\lambda z\}$. By the assumption, $\mathcal{S}_{A,\lambda}$ is a proper (but nonzero) subspace of $\mathcal{S}$ (since $y\not\in\mathcal{S}_{A,\lambda}$).

We know that for any $z\in \mathcal{S}_{A,\lambda}$, $Bz\in \mathcal{S}$ since $\mathcal{S}_{A,\lambda}\subset\mathcal{S}$ and $\mathcal{S}$ is $B$-invariant. However, $A$ and $B$ commute so $$ ABz=BAz=\lambda Bz \quad \Rightarrow\quad Bz\in \mathcal{S}_{A,\lambda}. $$ This means that $\mathcal{S}_{A,\lambda}$ is $B$-invariant. Since $\mathcal{S}_{A,\lambda}$ is both $A$- and $B$-invariant and is a proper (nonzero) subspace of $\mathcal{S}$, we have a contradiction. Hence every nonzero vector in $\mathcal{S}$ is an eigenvector of both $A$ and $B$.

EDIT: A nonzero $A$-invariant subspace $\mathcal{S}$ of $\mathbb{C}^n$ contains an eigenvector of $A$.

Let $S=[s_1,\ldots,s_k]\in\mathbb{C}^{n\times k}$ be such that $s_1,\ldots,s_k$ form a basis of $\mathcal{S}$. Since $A\mathcal{S}\subset\mathcal{S}$, we have $AS=SG$ for some $G\in\mathbb{C}^{k\times k}$. Since $k\geq 1$, $G$ has at least one eigenpair $(\lambda,x)$. From $Gx=\lambda x$, we get $A(Sx)=SGx=\lambda(Sx)$ ($Sx\neq 0$ because $x\neq 0$ and $S$ has full column rank). The vector $Sx\in\mathcal{S}$ is an eigenvector of $A$ and, consequently, $\mathcal{S}$ contains at least one eigenvector of $A$.

EDIT: There is a nonzero $A$- and $B$-invariant subspace of $\mathbb{C}^n$ of the least dimension.

Let $\mathcal{I}$ be the set of all nonzero $A$- and $B$-invariant subspaces of $\mathbb{C}^n$. The set is nonempty since $\mathbb{C}^n$ is its own (nonzero) subspace which is both $A$- and $B$-invariant ($A\mathbb{C}^n\subset\mathbb{C}^n$ and $B\mathbb{C}^n\subset\mathbb{C}^n$). Hence the set $\mathcal{D}:=\{\dim \mathcal{S}:\mathcal{S}\in\mathcal I\}$ is a nonempty subset of $\{1,\ldots,n\}$. By the well-ordering principle, $\mathcal{D}$ has the least element and hence there is a nonzero $\mathcal{S}\in\mathcal{I}$ of the least dimension.

  • $\begingroup$ Thanks! Well I think that's perhaps what the author of the exam intended to mean.. I may have misread the information conveyed in the original text, since there is some ambiguity there in reading the original text in my language. $\endgroup$ – Vim Apr 9 '15 at 16:41
  • $\begingroup$ @Vim You are welcome! $\endgroup$ – Algebraic Pavel Apr 9 '15 at 16:44
  • 1
    $\begingroup$ It's not clear why an $A$-invariant subspace should contain an eigenvector. $\endgroup$ – egreg Apr 9 '15 at 20:05
  • $\begingroup$ @egreg True. Added details. $\endgroup$ – Algebraic Pavel Apr 10 '15 at 1:27
  • $\begingroup$ I'm still a bit confused. why such an $S$ must exist? $\endgroup$ – Vim Apr 10 '15 at 4:01

As noted in another answer, the statement is not true as stated, just take $$ A = \begin{bmatrix}1&0\\0&1\\\end{bmatrix}, \qquad B = \begin{bmatrix}1&0\\0&2\\\end{bmatrix}. $$

What is true is that, if $A$ and $B$ are diagonalizable, then $A$ and $B$ can be simultaneously diagonalized. Thanks to Thomas Andrews for pointing out an oversight.

Applying $B$ to both sides of $\lambda \xi = A \xi$ you get $\lambda (B \xi) = B A \xi = A (B \xi)$, so either $B \xi = 0$, or $B \xi$ is an eigenvector for $A$ with respect to the eigenvalue $\lambda$.

In any case $B$ maps the eigenspace $W$ of $A$ relative to the eigenvalue $\lambda$ into itself. On $W$, $A$ acts like the scalar $\lambda$. Now one can put $B$ in diagonal form on $W$ without changing the scalar shape of $A$ on $W$.

  • 1
    $\begingroup$ @ThomasAndrews, thanks for pointing out my oversight. $\endgroup$ – Andreas Caranti Apr 9 '15 at 14:36
  • 1
    $\begingroup$ This can't be right, since if $A$ and $B$ are diagonal matrices, then $AB=BA$ but they definitely don't need to have the same eigenvalues. $\endgroup$ – Thomas Andrews Apr 9 '15 at 14:37

matrices $A = \pmatrix{0&1\\0&0}, B = \pmatrix{1&0\\0&1}$ commute, but they don't share the eigenveetor $\pmatrix{0\\1}$ of $B.$

  • $\begingroup$ (0,1) is an eigenvector of A with eigenvalue zero. More precisely, the eigenbasis of both of these matrices is the same in C^{2}- $\endgroup$ – James Smithson Jul 18 '17 at 18:11

Let $S$ be a set of commuting matrices over an algebraically closed field $F$. As Algebraic Pavel said above, 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. Let us prove that this can also be seen as an easy consequence of Burnside's theorem on matrix algebras:

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$.


The other counterexample can be generated with a real skew-symmetric matrix, denote it $K$. Consider matrix dimension $4 \times 4$. Take for example $K=\begin{bmatrix} 0 & 3 & 0 & 0 \\ -3 & 0 & 0 & 0\\ 0 & 0 & 0 & 4\\ 0 & 0 & -4 & 0 \end{bmatrix}$.

Now if $K$ is skew-symetric then $K^2$ is symmetric.
$K$ and $K^2$ commute as polynomials.

Now for $K$ we have no real eigenvectors at all, but for $K^2$ (as it is symmetric) there are eigenvectors which can be presented as only real. The matrices do not share any eigenvectors.

  • $\begingroup$ From the above Klaus Draeger's comment "So the assertion holds if $A$ and $B$ only have eigenvalues of multiplicity $1$. This is probably the best we can hope for". Here in the case $K^2$ we have eigenvalues $-9$ and $-16$, both of multiplicity 2. Interesting that $K$ has eigenvalues only of multiplicity 1 (although conjugate in pairs). Taking this into account it is not surprise that for example $K$ and $K^3$ share the same ( complex) eigenvectors - here we have condition of multiplicity 1 fulfilled. $\endgroup$ – Widawensen Jan 25 '18 at 10:04

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.