uniqueness of positive operator Let $A,B$ be commuting positive operators on a Hilbert space such that $\langle(A-B)(A+B)x,x\rangle=0$ for all $x$ in the Hilbert space. Prove that $A=B$.
My attempt: The above implies that $A=B$ on the image of $A+B$, hence on the closure on the image. So I have to show $A=B$ on the kernel of $A+B$. How to proceed?
 A: I think I have answered this for you before, but I'll explain it again in more detail. The proof hinges on the following lemma, whose proof is given at the end. Perhaps you'll accept this answer.

Lemma Let $X$ be a complex Hilbert space and let $T\in\mathcal{L}(X)$ satisfy $(Tx,x) \ge 0$ for all $x \in X$. Then $(Tx,x)=0$ iff $Tx=0$. That is, $\mathcal{N}(T)=\{ x : (Tx,x)=0 \}$.

Let $X$ be a complex Hilbert space, and let $A, B \in \mathcal{L}(X)$ satisfy $(Ax,x) \ge 0$ and $(Bx,x) \ge 0$ for all $x \in X$. Clearly $((A+B)x,x) \ge 0$ and $((A+B)x,x) = 0$ iff $(Ax,x)=0=(Bx,x)$. Therefore, the above lemma proves that $\mathcal{N}(A+B)=\mathcal{N}(A)\cap\mathcal{N}(B)$.
If $X$ is a complex Hilbert space and $A, B \in \mathcal{L}(X)$ are commuting positive operators on $X$ such that $A^{2}=B^{2}$, then
$$
                     (A-B)(A+B)=0.
$$
Consequently $A-B=0$ on $\mathcal{R}(A+B)^{c}$ ('c' denotes closure.) But $A-B=0$ also holds on the orthogonal complement
$$
     \mathcal{R}(A+B)^{\perp}=\mathcal{N}(A+B)=\mathcal{N}(A)\cap\mathcal{N}(B).    
$$
Thus $A=B$ because $A-B=0$ on
$$
                X = \mathcal{R}(A+B)^{c}\oplus \mathcal{N}(A+B).
$$
To prove the lemma Let $T \ge 0$ on the complex Hilbert space $X$. For each $\epsilon > 0$, $(x,y)_{\epsilon}=((T+\epsilon I)x,y)$ is an inner product on $X$ because $T+\epsilon I$ is positive definite. By the Cauchy-Schwarz inequality
$$
        |(x,y)_{\epsilon}|^{2} \le (x,x)_{\epsilon}(y,y)_{\epsilon}.
$$
Letting $\epsilon$ tend to $0$ gives
$$
                  |(Tx,y)|^{2} \le (Tx,x)(Ty,y),\;\;\; x,y \in X.
$$
If $(Tx,x)=0$ for some $x$, then $(Tx,y)=0$ for all $y$, which implies $Tx=0$.
NOTE: You can find a positive square root $P$ of $A^{\star}A$ that commutes with every $B\in \mathcal{L}(X)$ that commutes with $A^{\star}A$. And you can do this without the functional calculus, using only sequences of polynomials in $A^{\star}A$. In fact, such a square root can be used to supply an alternative proof of the spectral theorem. The polar decomposition does not require the full power the spectral theorem.
A: As $A$ and $B$ commute, you have $\langle (A^2-B^2)x,x\rangle=0$ for all $x$, so $A^2=B^2$. Now you can use that both $A,B$ are positive, so $A$ is the unique positive square root of $A^2$, and likewise with $B$. So $A=B$. 
I don't immediately see how to prove that $A=B$ in the kernel of $A+B$ other than doing what I did above, which shows $A=B$ everywhere. 
