I am reading the book Nonlinear Programming: Theory and algorithms by Bazaraa et al. However, I am not sure if I am undertanding the proof of the following theorem correctly.
Closet Point Theorem. Let $S$ be a non-empty closed convex set in $R^n$ and let $y∉S$, then $∃$ a point $\hat{x}∈S$ with minimum distance from $y$, i.e.,$‖y−\hat{x}‖≤‖y−x‖∀x∈S$. Furthermore, $\hat{x}$ is a minimizing point if and only if $(y−ˆx)^T(x−ˆx)≤0$
I understand the proof of the first part of the theorem. I am just having troubles understanding the proof of $\hat{x}$ is a minimizing point if and only if $(y−ˆx)^T(x−ˆx)≤0$ when stablishing sufficiency
Proof
For the second part of the proof (to prove sufficiency), assume $\left ( y-\hat{x} \right )^{\tau }\left ( x-\hat{x} \right )\leq 0 \forall x\in S$
Now, $\left \| y-x \right \|^{2}=\left \| y-\hat{x}+ \hat{x}-x\right \|^{2}=\left \| y-\hat{x} \right \|^{2}+\left \|\hat{x}-x \right \|^{2}+2\left (\hat{x}-x \right )^{\tau }\left ( y-\hat{x} \right )$ by the parallelogram law
$\Rightarrow \left \| y-x \right \|^{2}\geq \left \| y-\hat{x} \right \|^{2} $because $\left \| \hat{x}-x \right \|^{2}\geq 0$ and $\left ( \hat{x}- x\right )^{T}\left ( y-\hat{x} \right )\geq 0$
Thus, $\hat{x}$ is minimizing point.
$\blacksquare$
The part I am not sure about is why $\left \| \hat{x}-x \right \|^{2}\geq 0$ and $\left ( \hat{x}- x\right )^{T}\left ( y-\hat{x} \right )\geq 0$. My undertanding is that $\left \| \hat{x}-x \right \|^{2}\geq 0$ because the definition of the Euclidean Norm, am I right?, and $\left ( \hat{x}- x\right )^{T}\left ( y-\hat{x} \right )\geq 0$ follows from $(y−ˆx)^T(x−ˆx)≤0$
$\|\hat{x}-x\|$ is a real number. When we square a real number, we get a nonnegative number.
As for the other inequality is due to we started from the assumption that
$$(y-\hat{x})^T(x-\hat{x}) \le 0$$
Multiplying by negative, we have
$$(y-\hat{x})^T(\hat{x}-x) \ge 0$$
which is equivalent to
$$(\hat{x}-x)^T(y-\hat{x}) \ge 0$$