Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $S,T$ be 2 set. Prove that there is a $x\in S$ s.t, $d(x,T)=d(S,T)$ if $S$ is a compact set. Here, $d(S,T)$ denoted the $\inf\{d(s,t):s\in S, t\in T\}$.

share|cite|improve this question
Welcome to math.SE: since you are new, I wanted to let you know a few things about the site. In order to get the best possible answers, it is helpful if you say in what context you encountered the problem, and what your thoughts on it are; this will prevent people from telling you things you already know, and help them give their answers at the right level. Also, many find the use of imperative ("Prove", "Solve", etc.) to be rude when asking for help; please consider rewriting your post. – Julian Kuelshammer Oct 15 '12 at 21:18

It smells like homework, so I'll just give a hint: $d(x,T)$ is a continuous function of $x$ (if you don't know it, you need to prove it, of course).

share|cite|improve this answer
Let $m = \inf \{ d(s,t) \mid s \in S, t \in T \}$. Then for every $\varepsilon > 0$ there is $(s_n,t_n) \in S \times T$ such that $|d(s_n,t_n)-m|<\varepsilon $. Which means $\lim_{n \to \infty} d(s_n, t_n) = m$. Can we now do $\lim_{n \to \infty} d(s_n, t_n) = d(s_n,\lim_{n \to \infty} t_n)$? Or how do we get something of the form $d(s_n, T)$? How does one get from the product thing to something only depending on $S$? Thanks. – Rudy the Reindeer Oct 15 '12 at 7:09
@MattN.: It can be tricky to work with limits here, so you are better off working with infima instead. First, we should note a missing definition from the above: $d(s,T)=\inf\{d(s,t):t\in T\}$. Now it is clear that $d(s,t)\ge d(S,T)$ always, and therefore $d(s,T)\ge d(S,T)$ as well. So $\inf\{d(s,T):s\in S\}\ge d(S,T)$. We want equality, so we need to show the opposite inequality. To do that, pick any $M>\inf\{d(s,T):s\in S\}$. By definition, there is some $s\in S$ with $d(s,T)<M$. Again from defintions, there is a $t\in T$ with $d(s,t)<M$. And so $d(S,T)<M$. – Harald Hanche-Olsen Oct 15 '12 at 9:10
(There are still details to be filled in, of course, but I hope the previous comment helps.) – Harald Hanche-Olsen Oct 15 '12 at 9:11
Thank you very much. It took me very long to understand, I'm sorry for the late reply. Now I think I understand. Would you mind if I posted a second (full) answer? If you do, I might still post it but shortly after delete it so that only +10k users can see it. But I think I'd benefit from writing it up. – Rudy the Reindeer Oct 15 '12 at 17:59
@MattN.: You're welcome. By all means, write up the full answer. I don't quite see the point of deleting it afterwards, though. Oh, yeah, the homework angle. Well, if you do, then come back and undelete it after a few days. I'm sure you as the author of the answer will be able to do so. – Harald Hanche-Olsen Oct 15 '12 at 19:27

Let $S,T$ be subsets of a metric space $(X,d)$. Let $S$ be compact. Let $d(x,T) := \inf_{t \in T} d(x,t)$ and $d(S,T) := \inf_{(s,t) \in S \times T} d(s,t)$.

Claim: There exists $s$ in $S$ such that $d(s,T) = d(S,T)$.

Proof: We have $d(S,T) \leq d(s,T)$ for all $s$ in $S$. Hence it is enough to show that there exists $s$ in $S$ such that $d(S,T) \geq d(s,T)$.

$d(S,T) = \inf_{(s,t) \in S \times T} d(s,t)$ means that for $k$ we can find $(s_k, t_k)$ such that $d(s_k , t_k ) \leq d(S,T) + \frac{1}{k}$. Then $$ \inf_{t \in T} d(s_k, t) = d(s_k, T) \leq d(S,T) + \frac{1}{k} $$ Since $S$ is compact it is sequentially compact hence $s_k$ has a convergent subsequence. Let its limit be denoted by $s$. Then $$\lim_{k \to \infty} d(s_k, T) = d(s,T) \leq \lim_{k \to \infty} d(S,T) + \frac{1}{k} = d(S,T)$$

Which proves the claim.

share|cite|improve this answer
You write "Let $s$ denote the limit of $s_n$." Why does $s_n$ converge? And if it does, why should $d(s,T) \leq d(S,T)$? You seem to switch quantifiers in the last sentence: you start with "for each $t \in T$ there is a sequence" and you end up with "there is $s \in S$ such that for all $t$..." (paraphrased). Such an $s$ can't exist in general. You can salvage your approach: try working with two sequences $s_n$, $t_n$ such that $d(s_n,t_n) \to d(S,T)$. – commenter Oct 18 '12 at 6:50
@commenter Exactly my question too. Why should $d(s,T) \leq d(S,T)$? I discussed the other direction on chat and what appears to be a switching of quantifiers is not. Thanks for the comment, I'll rewrite this later. Maybe. – Rudy the Reindeer Oct 18 '12 at 6:56
Oh, right, it's not switching quantifiers, it's only bad notation: using $s$ for two different things. Confusing. – commenter Oct 18 '12 at 6:59
@commenter Slave driver : ) – Rudy the Reindeer Oct 23 '12 at 9:24
The definitions and the choice of $(s_k,t_k)$ show that $d(S,T) \leq d(s_k,t_k) \leq d(S,T) +\frac{1}{k}$. Choose integers $k(n) \geq n$ such that $d(s,s_{k(n)}) \leq \frac{1}{n}$ (convergence of some subsequence). Since $k(n) \geq n$ you have $$d(S,T) \leq d(s,t_{k(n)}) \leq d(s,s_{k(n)}) + d(s_{k(n)},t_{k(n)})\leq \frac{1}{n} + d(S,T) + \frac{1}{n} \xrightarrow{n\to\infty} d(S,T),$$ so $d(s,t_{k(n)}) \to d(S,T)$ by the squeezing lemma. Since $$d(S,T) \leq d(s,T) \leq \lim_{n\to\infty} d(s,t_{k(n)}) = d(S,T)$$ this gives $d(s,T) = d(S,T)$. – commenter Oct 23 '12 at 10:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.