59

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.

Mike Pierce
  • 18,938
Vim
  • 13,640
  • 5
    It's enough to make both matrices diagonalizable. – Ben Grossmann Apr 09 '15 at 14:40
  • 2
    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 – Shai Deshe Apr 09 '15 at 14:43
  • 4
    @Vim: read http://math.stackexchange.com/questions/6258/matrices-commute-common-basis-of-eigenvectors. – Dietrich Burde Apr 09 '15 at 14:43
  • As @DietrichBurde, I recommed future readers to go to this other place: https://math.stackexchange.com/questions/6258/matrices-commute-if-and-only-if-they-share-a-common-basis-of-eigenvectors – A. J. Pan-Collantes Jul 21 '23 at 06:59

8 Answers8

61

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.

Mike Pierce
  • 18,938
reply1988
  • 711
  • 20
    So the assertion holds if $A$ and $B$ only have eigenvalues of multiplicity 1. This is probably the best we can hope for. – Klaus Draeger Apr 09 '15 at 16:23
  • 2
    If they have eigenvalues with higher multiplicity, then we can still say something: not every eigenvector of $A$ is (necessarily) an eigenvector of $B$, but we can find a basis of $n$ eigenvectors of $A$ which are also eigenvectors of $B$. – Riemann Jan 22 '23 at 15:52
  • @KlausDraeger the proof requires eigenvalues of $A$ to have multiplicity 1, but it is not required for $B$, right? – P. Camilleri Sep 27 '23 at 11:24
47

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 \mathcal{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.

Vegetal605
  • 1,171
  • 2
    It is also probably worth adding that the S as above will be spanned by some common eigenvectors of A and B which all have identical eigenvalues, since you showed that each vector in S is also an eigenvector of both A and B. – piedpiper May 18 '19 at 00:03
  • 1
    For a quicker proof, could you have just claimed that the \lambda-eigenspace of A is B invariant just by examining ABv=BAv (implies Bv is an A-evec)? – Richard Birkett Mar 30 '20 at 19:47
  • @RichardBirkett It's been a while, sorry for answering so late. The problem is that there's no reason for $Bv$ to be nonzero for a $\lambda$-eigenspace and hence making it an adequate candidate for an eigenvector. It seems that the existence of the minimal invariant subspace is crucial for the correctness of the proof, without resorting to sloppy arguments. – Algebraic Pavel Dec 14 '22 at 20:16
  • @AlgebraicPavel Yes but if Bv is 0 then it is certainly in the $(A, \lambda)$ eigenspace. So this is a B-invariant subspace. But I do see your point regarding a very quick proof. – Richard Birkett Dec 16 '22 at 19:22
41

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

Dietrich Burde
  • 130,978
12

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

9

They will share an eigenvector: suppose $Ax = ax$, then $BAx = Bax$ and by commutativity $A(Bx) = a(Bx)$, so if $x$ is an eigenvector of $A$ then $Bx$ is an eigenvector of $A$ with the same eigenvalue. Now look at the subspace $V$ generated by $x, Bx, B^2 x,...$, which are all eigenvectors of $A$. Then $V$ is invariant under $B$, so $V$ also contains an eigenvector of $B$.

In fact, more is true. If $A : V \to V$ then we can write $V$ as a direct sum of subspaces $V_\lambda$ of generalised eigenvectors associated to each eigenvalue $\lambda$ of $A$. The $V_\lambda$ are $B$-invariant. So we can split up $V_\lambda$ further into a direct sum of $V_{\lambda\mu}$ corresponding to the different eigenvalues $\mu$ of $B$. We could continue doing this if we have more matrices $C,D$, and so on. This way we split $V$ as a direct sum, and each term of the sum is a generalised eigenspace of all the matrices.

So we can write the matrices as block diagonal matrices where the shape of the blocks is the same for all the matrices, and all the eigenvalues on the diagonal of each block are the same in all matrices. Furthermore, each block may be put in upper triangular form.

Jules
  • 974
  • I'm not sure that I understand you correctly but doesn't my example contradict also your argumentation? Assume we have $A=K^2$ and $x$ is a real vector. $B=K$ and commutes with $A$. Then $x,Bx, B^2x \dots $ are all real vectors and $V$ is real. But it doesn't contain eigenvector of $B$ as they are not real.. – Widawensen Sep 01 '20 at 10:28
  • Vectors in that subspace are not all real, you're allowed to use complex coefficients. – Jules Sep 01 '20 at 11:25
  • 2
    If we're working over the reals the whole thing is trivially false, because then we have matrices with no eigenvectors at all. – Jules Sep 01 '20 at 11:26
  • I understand that $x$ ( from it we start) is not any eigenvector of $A$ but a special one i.e. complex one ? So we have a problem what $x$ to choose for the start.. – Widawensen Sep 01 '20 at 12:13
  • 1
    No, it's any eigenvector. The space $span{x,Bx,B^2 x, ...}$ has complex vectors even if $x,Bx,B^2 x, ...$ are real, because the span takes any linear combination with coefficients from the field we're working over, so if we're working over $\mathbb{C}$ then those vectors can be complex. – Jules Sep 02 '20 at 14:06
  • I see. We need complex coefficients..Thank you for the explanation. It would be interesting to show it in the case described by me..How to know when we need complex coefficients or real are sufficient? – Widawensen Sep 02 '20 at 15:14
  • Why do you want to know. Just use complex numbers. Real numbers are inappropriate for talking about eigenvalues, since then there are matrices without any eigenvalues at all, and the whole theory doesn't work any more. – Jules Sep 02 '20 at 15:18
  • Then we can conclude that criterion must be based on the complexity of eigenvalues. – Widawensen Sep 02 '20 at 16:42
  • Almost all theorems about eigenvalues only work over the complex numbers. The reason for this is that everything in the end boils down to the fundamental theorem of algebra, which says that any polynomial has a complex root. That theorem fails to hold if you replace "complex root" by "real root". Since almost all eigenvalue theorems are based on it, those fail to hold for reals too. – Jules Sep 03 '20 at 01:51
6

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

abel
  • 29,170
  • 4
    (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}- – James Smithson Jul 18 '17 at 18:11
6

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 $\langle S\rangle$, the subalgebra of $M_n(F)$ generated by $S$. Since $S$ is commuting, $\langle S\rangle$ is also commuting and therefore $\langle S\rangle\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 $\langle S\rangle\neq\text{End}(V)$, since $\langle S\rangle$ 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$.

Jose Brox
  • 4,856
6

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

Mike Pierce
  • 18,938
Widawensen
  • 8,172
  • 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. – Widawensen Jan 25 '18 at 10:04
  • I don't understand this example. The vector $[i, 1, 0, 0]$ is an eigenvector of both $K$ and $K^2$. – Jules Aug 30 '20 at 17:24
  • @Jules I meaned that they do not share real eigenvectors. – Widawensen Aug 30 '20 at 18:47
  • Couldn't you have just taken the matrix $K = [0, 3; -3, 0]$ then? – Jules Aug 30 '20 at 19:03
  • @Jules I guess that just wanted to show that the condition - matrix has an eigenvector - doesn't imply that every commuting matrix has this vector as its own eigenvector as was falsely assumed in the OP. I suppose choice of an example is of secondary meaning. – Widawensen Sep 01 '20 at 09:06