# distance from a point to a set in $\mathbb R^k$

I'm working on a proof very similar to the one attempted here but from a more naive stand point.

Let $Y \subset \mathbb R^k$ be a nonempty, closed, and bounded set. Let $x$ in $\mathbb R^k$. Define $d(x,Y)= \inf \{||x-y||:y \in Y \}$.

Claim: We will show that $\exists y \in Y$ such that $d(x,Y)=||x-y||$.

Here's my thinking:

$Y$ is nonempty, so $\exists y \in Y$.

We need to show $d(x,Y)$ exists:

There's a thread starting with something like: $Y$ is bounded so there exists $M \in \mathbb R$ such that $||y-0||< M, \quad\forall y \in Y$. Then use the triangle inequality to show the metric is bounded, but

...there doesn't seem to be anything that precludes $x$ from being in $Y$ itself. In fact, since $Y$ is nonempty we can have $x = y \implies d(x,Y)=||x-y||=0$. Does this indicate that 0 is a lower bound for $\{||x-y||:y \in Y\}$, so we have the existence of an $\inf{||x-y||:y \in Y}$? Indeed, if $x = y$, then we have satisfied the claim, but this seems rather skimpy.

So now consider $x \notin Y$, then we have $x \neq y \implies d(x,Y) > 0$. At this point I'm a bit stuck, probably because I need to go to bed and live to fight another day. I'm thinking I need to consider a sequence ($y_n$) and by B-W Thm it has a convergent subsequence ($y_{n_{k}}$), but I might only be thinking about this because I wrote a similar proof earlier in the week. The tip I got was to invoke Heine-Borel, but we already have that this is a closed, bounded set in $\mathbb R^k$ i.e. compact.

Any pointers greatly appreciated. This is in the context of a first course in analysis. We've discussed sequences and now metric spaces briefly.

• If x is in Y in the distance is the usual distance, If x is not in Y then it is the distance from the point from Y which is closest to x. Where is the problem? – user480281 Sep 30 '17 at 7:22
• Of course there is no problem. I was over-tired working on this last night, and thinking quite wrongly about the phrase "distance from a point to a set." I appreciate the humor in your absurd comment. – AndyDufresne Sep 30 '17 at 21:13

For all $y \in Y$ we have that $$d(x,Y) \leq ||x-y||$$

Now from the properties of infimum we can find $y_n \in Y$ such that $$b_n=||x-y_n|| \to d(x,Y)$$

Now $y_n \in Y$ which is closed and bounded ,hence compact from $\text{Heine-Borel}$.

Thus exists $y_{k_n}$ a subsequence of $y_n$ such that $$y_{k_n} \to y_0 \in Y$$

We also have that $$b_{k_n}=||y_{k_n}-x|| \to d(x,Y)$$ $$||y_{k_n} -x|| \to ||y_0-x||$$

because $|(||y_{k_n}-x||-||y_0-x||)| \leq ||y_{k_n}-x-(y_0-x)||=||y_{k_n}-y_0|| \to 0$

Thus from uniqueness of limit we have $$d(x,Y)=||y_0-x||$$

• My proof here is also correct. – user480281 Sep 30 '17 at 15:19
• Ok ..so is mine. – Marios Gretsas Sep 30 '17 at 15:21
• You have to be more rigorous on your proofs..intuition is important but mathematics are also based on the formalism and sometimes more on the formalism than intuition. – Marios Gretsas Sep 30 '17 at 15:24
• You know that I know that. – user480281 Sep 30 '17 at 15:28
• Ok ..then you must give more formalistic proofs .. – Marios Gretsas Sep 30 '17 at 15:31