Surjection that Preserves Inner Product is Linear

Theorem
Let $H, K$ be Hilbert spaces, and denote by $\left\langle{\cdot, \cdot}\right\rangle_H$ and $\left\langle{\cdot, \cdot}\right\rangle_K$ their respective inner products.

Let $U: H \to K$ be a surjection such that:


 * $\forall g,h \in H: \left\langle{g, h}\right\rangle_H = \left\langle{Ug, Uh}\right\rangle_K$

Then $U$ is a linear map, and hence an isomorphism.