Finding the Orthogonal Vector $z$ to a (closed) Subspace $M$, given the Existance of the closest Element $y_0 \in M$ to a vector $x \notin M$ Let $(\mathfrak H, \langle \cdot,\cdot \rangle)$ be an infinite dimensional Hilbert space, let $M$ be a closed proper subspace in $\mathfrak H$. Given that for every non-zero $x \notin M$ there exists a unique $y_0 \in M$ such that
$$
\delta = \| x - y_0 \| = \inf_{v \in M} \| x - v \|
$$
prove that $z = x - y_0$ is orthogonal to $M$, i.e.
$$\langle z,y\rangle = 0,\ \forall y \in M  \tag{1}$$
My Attempt:
With $z = x - y_0$ it follows that
$$
\delta = \|x-y_0\| = \|z\| = \inf_{v \in M} \| (x - y_0) + y_0 - v \| = \inf_{y \in M} \| z + y \|
$$
$$
\iff\quad  0\le\|z\| \le \|z + y\|,\quad \forall y\in M \tag{2}
$$
The last inequality implies
$$
0 \le \|z + y\|^2 -\|z\|^2 = \|y\|^2 +\langle z,y \rangle +\langle y,z \rangle,\quad \forall y\in M \tag{3}
$$
where the RHS was rewritten in terms of the inner product. It is sufficient to prove $(1)$ for $\{ \hat u \in M: \| \hat u\| = 1 \}$, since any vector $v \in M$ is of the form $v = \alpha\hat u,\ \alpha \in \mathbb C$.
First assume for some $\hat u$ that $\langle \hat u,z\rangle \ne 0$, therefore $y = -\langle \hat u,z\rangle \hat u \ne 0$. By $(3)$ one concludes that $\langle \hat u,z\rangle = 0$, a contradiction!. That means that $\langle \hat u,z\rangle \ne 0$ is false for the assumed $\hat u$.
Indeed, the RHS of $(3)$ becomes (with $y = -\langle \hat u,z\rangle \hat u$)
\begin{align}
\|y\|^2 +\langle z,y \rangle +\langle y,z \rangle 
&= \|-\langle \hat u,z\rangle\hat u\|^2 +\langle z,-\langle \hat u,z\rangle\hat u \rangle +\langle -\langle \hat u,z\rangle\hat u,z \rangle \\
&= |\langle \hat u,z\rangle|^2 \|\hat u\| -\langle \hat u,z\rangle\langle z,\hat u \rangle -\overline{\langle \hat u,z\rangle}\langle \hat u,z \rangle \\
&= |\langle \hat u,z\rangle|^2 - \langle \hat u,z\rangle\langle z,\hat u \rangle -\langle z, \hat u\rangle\langle \hat u,z \rangle \\
&= |\langle \hat u,z\rangle|^2 - |\langle \hat u,z\rangle|^2 -|\langle \hat u,z\rangle|^2 \\
&= -|\langle \hat u,z\rangle|^2 \\
\end{align}
So the last inequality reads now
$$
0 \le -|\langle \hat u,z\rangle|^2 \qquad\implies\qquad \langle \hat u,z\rangle = 0
$$
Which is the aforementioned contradiction.
My Question: is there any logical mistake or circularity or flaws?
 A: Suppose $x-y_0$ is not orthogonal to $M$, where $y_0\in M$ is the closest vector in $M$ to $x$. Then there exists a non-zero vector $m\in M$ such that $\langle x-y_0,m\rangle \ne 0$. And you have the orthogonal decomposition
$$
          x - y_0 = \left(x-y_0-\frac{\langle x-y_0,m\rangle}{\langle m,m\rangle}m\right)+\frac{\langle x-y_0,m\rangle}{\langle m,m\rangle}m
$$
That gives the desired contradiction:
$$
         \|x-y_0\|^2=\|x-y_0-\frac{\langle x-y_0,m\rangle}{\langle m,m\rangle}m\|^2+\frac{|\langle x-y_0,m\rangle|^2}{\|m\|^2} \\
          > \|x-y_0-\frac{\langle x-y_0,m\rangle}{\langle m,m\rangle}m\|^2
$$
Therefore, $x-y_0$ is orthogonal to $M$, contrary to assumption.
A: Here is my direct proof without contradiction.
We have from the existance of the closest element $y_0 \in M$, with $z = x - y_0$
$$
0\le\|z\| \le \|z + y\|,\quad \forall y\in M \qquad \implies\qquad 0 \le \|z + y\|^2 -\|z\|^2 ,\quad \forall y\in M \tag{*}
$$
As stated before, it is sufficient to prove $(1)$ only for $\{ \hat u \in M: \| \hat u\| = 1 \}$. For any element in $\mathfrak H$ (and in particulat for $z = x-y_0$) we have
$$
\|z\|^2 = |\langle\hat u, z\rangle|^2 + \|z-\langle \hat u, z\rangle \hat u\|^2, \quad \forall \hat u \in \mathfrak H, \|\hat u\| = 1
$$
Which by (*) implies
$$
-|\langle\hat u, z\rangle|^2 = \|z-\langle \hat u, z\rangle \hat u\|^2 - \|z\|^2 \ge 0 \qquad\overset{(*)}{\implies}\qquad \langle\hat u, z\rangle = 0, \quad \forall \hat u \in M, \|\hat u\| = 1
$$
