Let $A: H_1\to H_2$ be a bounded linear operator, where $H_1,H_2$ are Hilbert spaces. Prove that $Ax=y$ has a least squares solution for each $y\in H_2$ if and only if the range of $A$ is closed.
I am having trouble with this problem. I am failing to see why there would not be a least squares solution if the range of $A$ is not closed. Nonetheless, I would appreciate any help with formulating a proof.