# Proving distance between bounded and compact set in $\mathbb{R}$

Let $E,F \in \mathbb{R}$ be two non-empty closed sets, with $E$ bounded. Show that there are points $x \in E, y \in F$ such that $\text{dist}(E,F) = \lvert x - y\rvert\cdot\text{dist}(E,F)$ is defined as $\inf\{\lvert x - y \rvert: x \in E, y \in F\}$

I know that $E$ bounded implies that it is compact, and intuitively we should have $x$ on the "boundary" of $E$ and similarly for $y$, but I'm struggling to find a way to say everything precisely. I've looked at some of the other similar questions but none of them have been that helpful for me. I've also read that a point has a minimum distance from a compact set, and this sounds like it could be useful.

Since \begin{align} \operatorname{dist}(E, F) = \inf\{|x-y| : x \in E, y \in F\}, \end{align} then there exists a sequence of pairs $(x_n , y_n) \in E\times F$ such that $|x_n-y_n| \rightarrow \operatorname{dist}(E, F)$.
Now, since $\{x_n\}\subset E$ is bounded then it contains a convergent subsequence say $\{x_{n_k}\}$, i.e. $x_{n_k} \rightarrow x \in E$. Moreover, since \begin{align} |x_{n_k}-y_{n_k}| \rightarrow \operatorname{dist}(E, F) \end{align} then it follows \begin{align} |y_{n_k}| \leq \operatorname{dist}(E, F)+|x_{n_k}| \leq \operatorname{dist}(E, F)+M. \end{align} where $M$ is a bound on $E$, i.e. $|x|\leq M$ for all $x \in E$.
Thus, it follows $y_{n_k}$ is also bounded which means it has a subsequence that converges to some $y \in F$.
• Thanks! Just a few things I want to clarify: The reason for the first sentence is because for any $(x_n, y_n) > \text{dist}(E,F)$ we can always choose $(x_n, y_n) >(x_{n+1},y_{n+1}) > \text{dist}(E,F)$ by definition of lower bound, and we just take the sequence to be $(x_n,y_n), (x_{n+1},y_{n+1}), \ldots$? In the last sentence, to conclude the proof I would say that $\lvert x_{n'k} y_{n'k} \rvert \rightarrow \text{dist}(E,F)$ and $\lvert x_{n'k} y_{n'k} \rvert\rightarrow \lvert x - y \rvert$, so $\text{dist}(E,F) = \lvert x - y \rvert$? – b_pcakes Oct 25 '16 at 6:52
• Yes. The first line follows immediately from the definition of $\inf$. – Jacky Chong Oct 25 '16 at 6:53
• For the conclusion, take the sub-subsequence to guarantee convergence of both $x_{n_k'}$ and $y_{n_k'}$. – Jacky Chong Oct 25 '16 at 6:55
• Actually, I don't understand how you get $|y_{n_k}| \leq \operatorname{dist}(E, F)+|x_{n_k}| \leq \operatorname{dist}(E, F)+M$. Can you explain? – b_pcakes Oct 25 '16 at 19:33
• I used the triangle inequality and the fact that $x_n$ are bounded. – Jacky Chong Oct 25 '16 at 19:51