[proofplan]
We prove existence, uniqueness, and characterisation of the nearest-point projection onto a closed convex subset of a Hilbert space. The parallelogram law converts the minimisation problem into a Cauchy sequence argument: if two points are both nearly optimal, the parallelogram identity (combined with convexity of $K$) forces them to be close. Existence and uniqueness follow from completeness and the Cauchy estimate. The variational inequality characterisation is derived by testing against convex paths $z + t(y-z)$, and the contraction property follows by adding two variational inequalities.
[/proofplan]
[step:Prove any minimising sequence is Cauchy via the parallelogram law]
Let $d := \inf_{y \in K} \|x - y\|$, and let $\{y_n\} \subset K$ be a minimising sequence with $\|x - y_n\| \to d$.
[claim:Parallelogram estimate for minimising sequences]
For any $y_m, y_n$ in the minimising sequence,
\begin{align*}
\|y_m - y_n\|^2 \le 2\|x - y_m\|^2 + 2\|x - y_n\|^2 - 4d^2.
\end{align*}
[/claim]
[proof]
Apply the parallelogram law with $a = x - y_m$ and $b = x - y_n$:
\begin{align*}
\|a + b\|^2 + \|a - b\|^2 = 2\|a\|^2 + 2\|b\|^2.
\end{align*}
Now $a - b = y_n - y_m$, and $a + b = 2(x - \frac{y_m + y_n}{2})$. Since $K$ is convex, the midpoint $\frac{y_m + y_n}{2} \in K$, so $\|a + b\|^2 = 4\|x - \frac{y_m + y_n}{2}\|^2 \ge 4d^2$. Substituting:
\begin{align*}
\|y_m - y_n\|^2 = 2\|x - y_m\|^2 + 2\|x - y_n\|^2 - \|2x - y_m - y_n\|^2 \le 2\|x - y_m\|^2 + 2\|x - y_n\|^2 - 4d^2.
\end{align*}
Since $\|x - y_m\|^2 \to d^2$ and $\|x - y_n\|^2 \to d^2$, the right-hand side tends to $0$.
[/proof]
[guided]
The parallelogram law is the defining geometric property of Hilbert spaces, and this is precisely where it enters the Projection Theorem. We set $a = x - y_m$ and $b = x - y_n$ in the parallelogram identity:
\begin{align*}
\|a + b\|^2 + \|a - b\|^2 = 2\|a\|^2 + 2\|b\|^2.
\end{align*}
Now $a - b = y_n - y_m$ and $a + b = 2(x - \frac{y_m + y_n}{2})$. Since $K$ is convex, the midpoint $\frac{y_m + y_n}{2} \in K$, so $\|a + b\|^2 = 4\|x - \frac{y_m + y_n}{2}\|^2 \geq 4d^2$. Rearranging:
\begin{align*}
\|y_m - y_n\|^2 = 2\|x - y_m\|^2 + 2\|x - y_n\|^2 - \|2x - y_m - y_n\|^2 \leq 2\|x - y_m\|^2 + 2\|x - y_n\|^2 - 4d^2.
\end{align*}
Since $\|x - y_m\|^2 \to d^2$ and $\|x - y_n\|^2 \to d^2$, the right-hand side tends to $2d^2 + 2d^2 - 4d^2 = 0$. Hence $\{y_n\}$ is Cauchy.
The convexity of $K$ is essential: it ensures the midpoint $\frac{y_m + y_n}{2}$ lies in $K$, giving the lower bound $4d^2$. Without convexity, the midpoint could be outside $K$ and the lower bound fails.
This argument fails in general Banach spaces because the parallelogram law does not hold. For example, in $L^p$ with $p \neq 2$, nearest-point projections onto closed convex sets may fail to be unique.
[/guided]
[/step]
[step:Establish existence and uniqueness of $P_K x$]
Since $\{y_n\}$ is Cauchy and $H$ is complete, $y_n \to z$ for some $z \in H$. Since $K$ is closed, $z \in K$. By continuity of the norm, $\|x - z\| = \lim \|x - y_n\| = d$, so $z$ achieves the infimum.
Uniqueness: if $z_1, z_2 \in K$ both achieve $d$, apply the parallelogram estimate with $y_m = z_1$, $y_n = z_2$ to get $\|z_1 - z_2\|^2 \le 2d^2 + 2d^2 - 4d^2 = 0$.
[/step]
[step:Derive the variational inequality characterisation]
[claim:Variational inequality]
$z = P_K x$ if and only if $z \in K$ and $(x - z, y - z)_H \le 0$ for all $y \in K$.
[/claim]
[proof]
($\Rightarrow$) Let $z = P_K x$. Fix $y \in K$ and consider the path $z_t := (1-t)z + ty \in K$ for $t \in [0,1]$ (by convexity). Since $z$ minimises $\|x - \cdot\|$ over $K$:
\begin{align*}
\|x - z\|^2 \le \|x - z_t\|^2 = \|x - z\|^2 - 2t(x-z, y-z)_H + t^2\|y-z\|^2.
\end{align*}
Cancelling $\|x-z\|^2$ and dividing by $t > 0$: $0 \le -2(x-z, y-z)_H + t\|y-z\|^2$. Sending $t \to 0^+$ gives $(x-z, y-z)_H \le 0$.
($\Leftarrow$) If $(x-z, y-z)_H \le 0$ for all $y \in K$, then for any $y \in K$:
\begin{align*}
\|x - y\|^2 = \|x-z\|^2 + 2(x-z, z-y)_H + \|z-y\|^2 \ge \|x-z\|^2,
\end{align*}
since $(x-z, z-y)_H = -(x-z, y-z)_H \ge 0$.
[/proof]
[/step]
[step:Prove $P_K$ is a contraction]
[claim:Contraction property]
$\|P_K x_1 - P_K x_2\| \le \|x_1 - x_2\|$ for all $x_1, x_2 \in H$.
[/claim]
[proof]
Write $z_i = P_K x_i$. The variational inequality for $z_1$ tested with $y = z_2$ gives $(x_1 - z_1, z_2 - z_1)_H \le 0$. The variational inequality for $z_2$ tested with $y = z_1$ gives $(x_2 - z_2, z_1 - z_2)_H \le 0$. Adding:
\begin{align*}
(x_1 - x_2 - (z_1 - z_2), z_2 - z_1)_H &\le 0 \\
(x_1 - x_2, z_2 - z_1)_H - \|z_1 - z_2\|^2 &\le 0.
\end{align*}
By the Cauchy--Schwarz inequality, $\|z_1 - z_2\|^2 \le (x_1 - x_2, z_2 - z_1)_H \le \|x_1 - x_2\|\|z_1 - z_2\|$. Dividing by $\|z_1 - z_2\|$ (if nonzero) gives $\|P_K x_1 - P_K x_2\| \le \|x_1 - x_2\|$.
[/proof]
[/step]