# If $A$ and $B$ commute, show that they have a common eigenvector? [duplicate]

That is, if $AB = BA$. I can see that it is true if all the eigenvalues of $A$ or $B$ are distinct. Let $(\lambda, \textbf{x})$ be an eigenpair of $A$ (or whichever one has distinct eigenvalues). So

\begin{align*} A\textbf{x} = \lambda \textbf{x} \\ BA\textbf{x} = \lambda B \textbf{x} \\ AB\textbf{x} = \lambda B \textbf{x} \end{align*}

So either $(\lambda, B\textbf{x})$ is an eigenpair of $A$ or $B\textbf{x} = \textbf{0}$ and then $(0, \textbf{x})$ is an eigenapair of $B$. If the first is the case, $B\textbf{x}$ must be a multiple of $\textbf{x}$ as $\lambda$ already has an eigenvector associated with it and it can have no more.

In fact, if $A$ or $B$ has all distinct eigenvalues then it seems they must have exactly the same eigenvectors. I'm not sure how to get the result I actually want though.

Edit: The family of commuting matrices sharing an eigenvector definitely encompasses this result, but the tools used their are beyond what we've developed in the course I'm taking.

For any $n\times n$ matrix $A$ we can find an eigenvalue $\lambda$ (although we may have to use complex numbers). Then there is an eigenspace $E_\lambda$ of vectors of dimension $0<m\leq n$ corresponding to $\lambda$. Choose a basis $\mathcal{B}=\{\textbf{x}_1,\dotsc,\textbf{x}_m\}$ for this eigenspace, and consider how the matrix $B$ acts on those basis vectors, which gives you a new representation $B'$ of (the restriction of ) $B$ relative to this basis.

$$B'=B|_{E_\lambda}=\begin{pmatrix} B\textbf{x}_1 & \dotsc & B\textbf{x}_m \end{pmatrix}$$

A priori, since there are $m$ vectors with $n$ components making up the columns of this matrix, it would appear to be an $n\times m$ matrix, which need not be square. However, as you have already observed in your question, we know that

$$A(B\textbf{x}_i) = AB\textbf{x}_i = BA \textbf{x}_i = B(A\textbf{x}_i)\\ =B(\lambda \textbf{x}_i) = \lambda(B\textbf{x}_i)$$

so $B\textbf{x}_i$ is also an eigenvector of $A$ with eigenvalue $\lambda$ or else is $0$. Or in other words $B$ takes eigenvectors of $A$ to new eigenvectors of $A$ with same eigenvalue or at worst to members of that eigenspace (the zero vector is in the eigenspace but is not considered an eigenvector). This is where the commutativity of $A$ and $B$ is invoked.

Hence each $B\textbf{x}_i$ is a linear combination of the eigenbasis vectors $\{\textbf{x}_j\}_j$, and may be therefore expressed as an $m$-component vector in terms of the basis $\mathcal{B}$, so this new matrix is actually square $m\times m$ when the column vectors are expressed in terms of that basis.

Therefore $B'$ has an eigenvalue $\mu$ (possibly complex) and also an eigenvector $\textbf{y}$. That is $B'\textbf{y}=\mu\textbf{y}$. This eigenvector of $B'$ (by construction) is also an eigenvector of $B$ (since $B'$ is a restriction of $B$) and of $A$, since

$$\textbf{y}=\sum a_i\textbf{x}_i\Rightarrow \\ \quad A\textbf{y}=A(\sum a_i\textbf{x}_i)=\sum a_iA\textbf{x}_i=\\ \sum a_i\lambda\textbf{x}_i=\lambda(\sum a_i\textbf{x}_i)=\lambda\textbf{y}.$$

Therefore $\textbf{y}$ is an eigenvector of both $A$ and $B$.