I have the following inner product: $\langle u(x), uu^{*}u(x)-u(x)\rangle = 0$ for all $x$, and the textbook I'm reading says this implies $uu^{*}u=u$. Why is this true? This to me only says that $u(x)$ is orthogonal to $uu^{*}u(x)-u(x)$ for all $x$ or more generally that $uu^{*}u(x)-u(x) \in \text{Ran}(u)^{\perp} = \text{ker}(u^{*})$.
I know in general if you have $\langle f,g \rangle = 0$, you don't get to automatically conclude that $f$ or $g=0$ since the inner product isn't injective. I do know however that if $\langle f,g \rangle = 0$ for all $g$, then we can conclude that $f=0$ by setting $g=f$.
However, the inner product $\langle u(x), uu^{*}u(x)-u(x)\rangle = 0$ doesn't have this form, since it's equal to $0$ for all $x$, and on top of that, the left slot depends on $x$ as well.
For context $u:X \longrightarrow X$ is a bounded linear map.
Any help on understanding this would be appreciated, thank you.
Taking transposes, $$\langle u^*ux,u^*ux-x\rangle=0$$ Let $A=u^*u$; then $$x^*A(A-1)x=0\tag{1}$$ $A$ is clearly self-adjoint; by taking transposes of scalars, for any $x,y$, we have $$(x+y)^*A(A-1)(x+y)=0+2x^*A(A-1)y+0=2x^*A(A-1)y$$ Since $x$ and $y$ were arbitrary, $$A(A-1)=0$$ i.e. $A$ is a projection onto its range.
Now note that $x\in\ker{(A)}$ iff $x\in\ker{(u)}$. So if $Ax=0$, then $ux=0=uAx$; otherwise, $Ax=1$, and $uAx=ux$.