Solution (source code)

= Solution

Work over the <field> containing the stated $n$ distinct <eigenvalues> of $B$; in a real formulation these must be real to obtain real <eigenvectors>. Choose one <eigenvector> for each distinct <eigenvalue>. By <independence of eigenvectors for distinct eigenvalues>, these $n$ <vectors> are a <basis>. Consequently each <eigenspace> $E_\lambda(B)$ has <dimension> one: in an expansion in this <eigenbasis>, $Bw=\lambda w$ forces every coefficient with a different <eigenvalue> to vanish.

Now let $v\ne0$ be any <eigenvector> of $B$. By part (d), $Av$ belongs to its one-dimensional <eigenspace>, so $Av=\mu v$ for some <scalar> $\mu$. This proves that \b[$v$ is an <eigenvector> of $A$], including the case $Av=0$, where $\mu=0$. This is the crucial one-dimensional step in <simple spectrum gives simultaneous diagonalization>.