# Problem about linear algebra [duplicate]

Suppose we have two $n \times n$ square matrices A and B such that $AB=BA$. It is known that A, B and AB all have n distinct eigenvectors that is a basis of $\mathbb{C}^n$. Can we then show that there is a basis of $\mathbb{R}^n$ that comprises entirely of vectors that are eigenvectors of both A and B?

I have no idea on solving this problem. Any form of help is appreciated. Thanks!

• What is the notation ^n ? – Kenny Lau Jun 27 '16 at 12:43
• Do you mean $\Bbb R^{n}$ when you say ^n? – layman Jun 27 '16 at 12:46
• @user46944 How can I type that symbol? – Linear Jun 27 '16 at 12:58
• @Linear: The LaTeX code for $\mathbb{R}^n$ is \mathbb{R}^n. Enclose that in dollar signs so that this site knows to parse it as LaTeX (specifically an implementation thereof known as MathJax), and voila. – Justin Benfield Jun 27 '16 at 13:00
• can you give us the reference of what you say in the text "it is known ...." – m.idaya Jun 27 '16 at 13:18

Let $A$ be a matrix of an endomorphism $f$ of $E$. then if $F_1$ and $F_2$ are two supplementary sub-space in $E$ (that is $E=F_1\oplus F_2$), and are stable under $f$ then by a choice of bases in $F_1$ and in $F_2$, the matrix of $f$ in the base obtened of $E$ (meeting of two preceding bases) is a diagonal block matrix with two block, and $f$ is diagonalized iff the restriction of $f$ to each $F_i$ is diagonalized.
Let $A$ and $B$ two diagonalizable matrix such that $AB = BA$, and $E =\oplus_{\lambda\in spect(A)} E_\lambda$ where $E_\lambda$ is the eigenvector space of $A$ relatively to eigenvalue $\lambda$. so for each $\lambda\in spect(A)$, if $v\in E_\lambda$ then $AB(v)=B(A(v))=B(\lambda v)=\lambda B(v)$ this means that each $E_\lambda$ is stable by $B$ so we can diagonalize the restriction of $B$ to each $E_\lambda$, so we get base of $E$ constituted by eigenvectors of both $A$ and $B$.