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.
Suppose $Range \ A$ is closed. Then consider the closed convex subset $y- \ Range \ A$. We know in a Hilbert space any closed convex subset has an element of minimum norm. Thus $\exists x\in H_1$ such that $||y-Ax||$ is minimized.
For the other part assume $Range \ A$ is not closed. Then $\exists y \in H_2$ such that $y$ is a limit point of $Range \ A$ but $y \notin Range \ A$. Since $y$ is a limit point we have $d(y,Range \ A):=inf\ \{||y-Ax|| \ ; x\in H_1 \}=0$ . By existence of least square solution we have $\hat x \in H_1$ such that $||y-A\hat x||=inf\ \{||y-Ax|| \ ; x\in H_1 \}=0$ But this shows $y\in Range \ A$ which contradicts my initial assumption.