If A, B are $n \times n$ matrices and AB=BA. If A, B are $n \times n$ matrices and AB=BA. A has n distinct eigenvalues. Then the eigenvectors of A are also eigenvectors of B?

Suppose $A(x)=cx, B(A(x))=cB(x)=A(B(x))$, this implies that $B(x)$ is an eigeinvector of $A$ associated to $c$,  since $A$ has $n$ distinct eigenvalues,  the eigenspace associated to $c$ has dimension 1, thus $B(x)=dx$.
