I'm working in my homework of linear algebra and there is this problem I'm strugling with
Let $V$ be a finite-dimensional vector space with an inner product, and let $T$ be a linear operator on $V$. I'm trying to prove the following result:
If $W$ is a subspace of $V$, then $W$ is $T$-invariant if and only if $W^\perp$ is $T^*$-invariant.
I know that $W$ is $T$-invariant means $T(w) \in W$ for all $w \in W$; also that $W^\perp$ is $T^*$-invariant means $T^*(v) \in W^\perp$ for all $v \in W^\perp$; and $T^*$ is the adjoint of $T$, satisfying $\langle T(x), y \rangle = \langle x, T^*(y) \rangle$ for all $x, y \in V$
For the forward direction ($\Rightarrow$), I tried assuming $W$ is $T$-invariant and taking $v \in W^\perp$. I need to show that $T^*(v) \in W^\perp$, which means I need to show $\langle w, T^*(v) \rangle = 0$ for all $w \in W$.
Using the adjoint property, I can write: $$\langle w, T^*(v) \rangle = \langle T(w), v \rangle$$
Since $W$ is $T$-invariant, $T(w) \in W$, and since $v \in W^\perp$, this should give me $\langle T(w), v \rangle = 0$.
However, I'm having trouble with the reverse direction ($\Leftarrow$) and would appreciate guidance on how to structure that proof properly.
How can I do the reverse direction ($\Leftarrow$)?
Any hints or suggestions or solutions would be greatly appreciated!