I'm facing the following problem:
Let $X$ be a Hilbert space, $A,B$ be subspaces of $X$ such that $X=A\oplus B$ and $T\in B(X)$ such that $T\vert_A=\text{Id}_A$, $T\vert_B=-\text{Id}_B$. Prove that $T=T^{-1}$ and that $T^*=T$.
The first statement is easy; indeed, if $x=a+b$, then $Tx=a-b$, therefore $TTx=a+b=x$, thus $TT=\text{Id}_X$ and we are done. But I really can't move on with the second statement. I proved that $T^*=T$ if and only if $A\bot B$:
Indeed, if $T^*=T$, then $<Tx,y>=<x,T^*y>=<x,Ty>$ for all $x,y$, which yields $<Tx-x,y+Ty>=0$. If $a,b\in A,B$ respectively, then for $x=b, y=a$ we have that $<a,b>=0$. The converse is obvious by taking random $x,y$ and writing them in the form $a+b$ where $a\in A, b\in B$. But I can't prove that $A\bot B$. I tried taking the closure of $A$ and writing $X$ as $X=\overline{A}\oplus\overline{A}^{\bot}$ ,and, since $\overline{A}^\bot=A^\bot$, $X=\overline{A}\oplus A^{\bot}$ but I couldn't move on. Any ideas?
Your problem in understanding here might be that "verticality" of $A$ and $B$ are due to the definition of the direct sum of Hilbert spaces.
For arbitrary Hilbert spaces $(A,\langle\cdot,\cdot\rangle_A)$, $(B,\langle\cdot,\cdot\rangle_B)$, one defines the direct sum as ordered pairs of the form $$ A\oplus B=\lbrace (a,b)\,|\,a\in A,b\in B\rbrace $$ which turns into a vector space with componentwise addition and scalar multiplication. Then $A\oplus B$ becomes a Hilbert space under the scalar product $$ \big\langle (a_1,b_1),(a_2,b_2)\big\rangle_{A\oplus B}:=\langle a_1,a_2\rangle_A+\langle b_1,b_2\rangle_B\,.\tag{1} $$ Now it is customary to write these elements of not as ordered pairs $(a,b)$, but as a sum $a+b$ (by identifying $A$ with $A\times\lbrace 0\rbrace\subset A\otimes B$ and same with $B$). With this identification, every $x\in A\oplus B$ can be uniquely expressed as $x=a+b$ for some $a\in A$, $b\in B$. So in some sense it is by definition that $$ \langle x,Ty\rangle=\big\langle a_1+b_1,(\operatorname{Id}_Aa_2-\operatorname{Id}_Bb_2)\big\rangle=\langle a_1+b_1,a_2-b_2\rangle\overset{(1)}=\langle a_1,a_2\rangle-\langle b_1,b_2\rangle=\ldots= \langle Tx,y\rangle\,, $$ because $A\oplus B$ by definition (1) / construction / assumption are "orthogonal".