Let $(V, <,>)$ be a finite dimensional vector space with an inner product, and let $f,g \in End(V)$ two self adjoint linear transformations.
(a) Prove that if $f$ and $g$ commute, then, for every eigenvalue $\lambda$ of $f$:
- the eigenspace $E_{\lambda}=\{v \in V: f(v)=\lambda v \}$ is $g$-invariant.
- ${E_{\lambda}}^{\perp}$ is $f$-invariant and $g$-invariant.
(b) Prove that $f$ and $g$ commute if and only if there exists and orthonormal basis of $V$ formed by common eigenvectors between $f$ and $g$.
The attempt at a solution:
(a) Let $v \in E_{\lambda}$. I want to show that $g(v) \in E_{\lambda}$, so $f(g(v))=f \circ g (v)=g \circ f (v)=g(f(v))=g(\lambda v)=\lambda g(v) \implies g(v) \in E_{\lambda}$, this proves $E_{\lambda}$ is $g$-invariant.
Now let $x \in {E_{\lambda}}^{\perp}$. First let's show invariance under $f$, invariance under $f$ means that $f(x) \in {E_{\lambda}}^{\perp}$, at the same time, this means $<f(x),v>=0$ for all $v \in E_{\lambda}$. So $<f(x),v>=<x,f(v)>=<x,\lambda v>=\overline \lambda <x,v>=0$.
I had problems showing $g$ invariance: let $x \in {E_{\lambda}}^{\perp}$: I need to show that $<g(x),v>=0$; I know that $<g(x),v>=<x,g(v)>$ and I also know by (a) that $g(v) \in E_{\lambda}$. I don't know how to use that last information, all I can see is that $f(g(v))=\lambda g(v)$, I don't see how this is going to help me showing $<x,g(v)>=0$
For part (b) I had absolutely no idea what to do, I am open to suggestions and ideas.
For answering the part b): the only if direction is clear.
Now for the if direction we prove it by induction on the dimension $\dim V$. The result is obvious in the case $\dim V=1$ and assume that the result is true if $\dim V$ is less or equal $n$. Let $\dim V=n+1$ and let $\lambda $ an eigenvalue of $f$:
For the first question since $g(v)\in E_{\lambda}$ and $x\in E^\perp_{\lambda}$ then $\langle x,g(v)\rangle=0$ is immediate.