Find a basis for two operators Let $(E, \langle \cdot, \cdot \rangle)$ be an $n$-dimensional Hilbert space and $A,B \colon E \to E$ linear isomorphisms. 
Does there exist a basis $\{e_{1},...,e_{n}\}$ of $E$ such that $\mathcal{A}=\{A(e_{1}),...,A(e_{n})\}$ and $\mathcal{B}=\{B(e_{1}),...,B(e_{n})\}$ are orthogonal bases?
Hints or solutions are greatly appreciated.
 A: We define the following two inner products on $E$
$$ \langle v, w\rangle_A:=\langle Av, Aw \rangle \qquad \langle v, w\rangle_B:=\langle Bv, Bw \rangle.$$
Your question is now, whether there exists a basis $\{ e_1, \dots, e_n \}$ which is orthogonal with respect to both inner products. This is true and is proven here
Show that a Hilbert space with two inner products has a basis that is orthogonal with respect to both inner products
A: This is true. Define a new inner product $g(v,w)$ on $E$ by the formula $g(v,w) := \left< Av, Aw \right>$ and let $\beta(v,w) := \left< Bv, Bw \right>$ (this is another inner product on $E$ but what is important that it is a symmetric bilinear form). Then you can find an orthonormal basis $e_1,\dots,e_n$ of $(E,g)$ such that with respect to this basis, $\beta$ is diagonal. That is,
$$ g(e_i, e_j) = \left<Ae_i, Ae_j \right> = \delta_{ij},  \\
\beta(e_i,e_j) = \left<Be_i, Be_j \right> = \delta_{ij}, \,\,\,  i \neq j.
$$
Thus, $(Ae_1, \dots, Ae_n)$ is $\left< \cdot, \cdot \right>$-orthonormal and $(Be_1,\dots,Be_n)$ is $\left< \cdot, \cdot \right>$-orthogonal. Note that $e_1,\dots,e_n$ won't necessarily be $\left< \cdot, \cdot \right>$-orthogonal.
