Let $A \subset \mathbb{R^n}$ be a closed subset and $x \in \mathbb{R^n}$.
How to prove that a point $p \in A$ exists such that $d_2(p,x)=\inf\limits_{q \in A}d_2(q,x)$?
I tried to focus upon the case that $A$ is a bounded set and compact. I used:
$q \in \mathbb{R^n} \Leftrightarrow d(q,\mathbb{R^n})=0$. So it's $q=p$.
But I don't know how to use the infimum here.
Does it work or is there another way to prove this?
Let $x_0 \in \Bbb{R}^n$ and $s=\inf_{a \in A}d_2(a,x)$
For all $n \in \Bbb{N},\exists a_n \in A$ such that $$s \leq d_2(a_n,x_0) < \frac{1}{n}+s \Rightarrow d_2(a_n,x_0) \to s$$
Also
$$||a_n||_2=d_2(0,a_n)\leq d_2(a_n,x_0)+d_2(x_0,0)=$$ $$d_2(a_n,x_0)+||x_0||_2 \leq 2+s+||x_0||_2=C, \forall n \in \Bbb{N}$$
Thus $a_n \in \overline{B_2(0,C)}$ which is a compact set so exists $a_0 \in \overline{B(0,C)}$ and a subsequence $a_{n_k}$ such that $a_{n_k} \to a_0 \Leftrightarrow d_2(a_{n_k},a_0) \to 0$
Also from this we have that $d_2(a_{n_k},x_0) \to d_2(a_0,x_0)$ because $$|d_2(a_{n_k},x_0)-d_2(x_0,a_0)| \leq d_2(a_{n_k},a_0)$$ and also $d_2(a_{n_k},x_0) \to s$
So from uniqueness of limit we have that $d(a_o,x_0)=s$.