# Prove that there exists a nearest point in a closed set $A \subset \mathbf{R}^n$ to a point outside of $A$

I know that the assertion can be proved by a direct application of the Bolzano-Weierstrass Theorem. I am interested in proving this using the extreme value theorem for continuous functions.

Claim: Let $x_0 \notin A\subset \mathbf{R}^n$. $A$ is closed. Then there is an $x_1 \in A$ such that $|x_1-x_0| \leq |x-x_0|, \forall x \in A$. (The norm is Euclidean)

Proof: Since $x_0 \notin A$ we have $0<|x-x_0|$. Thus $d=\inf_{x \in A}|x-x_0|$ can be defined. Take a $\delta>0$. Consider the set $S=\{x:|x-x_0| \leq d+\delta\} \cap A$. Clearly $S$ is bounded. It is also closed, being the intersection of two closed sets. Because the function $f(x)=|x-x_0|$ is continuous, it will attain its minimum value over $S$. So there exists an $x_1 \in A$ s.t. $|x_1-x_0| \leq |x-x_0|$ for all $x\in A$ with $|x-x_0| \leq d+\delta$. But this means that $d \leq |x_1-x_0| \leq d + \delta$ for an arbitrary $\delta$. Hence, $|x_1-x_0|=d=\inf_{x \in A}|x-x_0|$.

Please tell me if this is correct, specially the last line about which I have doubts.

-
Please make questions self-contained and not reliant on the title. (The claim doesn't state that $A$ is closed.) – joriki Oct 24 '11 at 9:56
Than you for pointing that out. – Iconoclast Oct 24 '11 at 10:44

This seems unnecessarily complicated. You can just take any point $x$ in $A$ and consider the set $S$ of points that are at least as close to $x_0$ as $x$. This is also a bounded closed set, so the distance to $x_0$, being a continuous function, attains its minimum value on this set. This minimum value is also the minimum value over all of $A$, since any points not in $S$ are further away from $x_0$.