# $A,B\in \mathbb R^{n\times n}$ share $n$ common linearly-independent eigenvectors $\Rightarrow AB=BA$.

I've been trying to prove the following statement:

Let $$A,B\in \mathbb R^{n\times n}$$ be square matrices such that they share $$n$$ common linearly-independent eigenvectors. Then $$AB=BA$$.

Everything I thought of seemed to be unhelpful, so I have no clue what to do next.

Thank you and have a nice day!.

• Hint: write the matrices in terms of basis given by those eigenvectors. – Wojowu Jan 13 at 18:18
• @Wojowu I think I got it. Thanks! – Amit Zach Jan 13 at 18:26

Note that though $$A, B \in \Bbb R^{n \times n}$$, the eigenvalues may be complex and thus the eigenvectors may be in $$\Bbb C^n$$. Bearing this in mind, we proceed:

Let

$$\vec e_1, \vec e_2, \ldots, \vec e_n \tag 1$$

be the $$n$$ common, linearly independent eigenvectors of $$A$$ and $$B$$; then we have

$$A\vec e_i = \alpha_i \vec e_i, \; 1 \le i \le n, \tag 2$$

and

$$B\vec e_i = \beta_i \vec e_i, \; 1 \le i \le n, \tag 3$$

for some scalars $$\alpha_i, \beta_i \in \Bbb C$$, $$1 \le i \le n$$. Thus

$$AB \vec e_i = A(\beta_i \vec e_i) = \beta_i A \vec e_i = \beta_i \alpha_i \vec e_i = \alpha_i \beta_i \vec e_i = \alpha_i B\vec e_i = B \alpha_i \vec e_i = BA\vec e_i. \tag 4$$

Since the $$\vec e_i$$ are $$n$$ in number and linearly independent, the form a basis of $$\Bbb C^n$$; thus for any

$$\vec v \in \Bbb C^n \tag 5$$

we may write

$$\vec v = \displaystyle \sum_1^n v_i \vec e_i, \; v_i \in \Bbb C, \; 1 \le i \le n,; \tag 6$$

thus

$$AB \vec v = \displaystyle \sum_1^n v_i AB \vec e_i = \sum_1^n v_i BA \vec e_i = BA\vec v; \tag 7$$

therefore we conclude

$$AB = BA. \tag 8$$

• Thank you very much, this is exactly what I did after the hint I was just given. I'm happy to see that my proof was similar to your professional one :) – Amit Zach Jan 13 at 19:29
• Thanks for the kind words. If you really think my proof is "professional", you might consider "accepting it". Cheers! ;) – Robert Lewis Jan 13 at 19:31