Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Possible Duplicate:
If $A$ is compact and $B$ is closed, show $d(A,B)$ is achieved

Define the distance between two nonempty subsets $A$ and $B$ of $R^n$ by

$dist(A,B):=inf${$||x-y||:x∈A$ and $y∈B$}. Prove that if $A$ and $B$ are compact sets which satisfy $A∩B=∅$, then $dist(A,B)>0$.

(Is it obvious since $A∩B=∅$, then $inf${$||x-y||:x∈A$ and $y∈B$} must$>0$ since $x≠y$?)

share|cite|improve this question

marked as duplicate by Jonas Meyer, 5PM, Nate Eldredge, Micah, Brian M. Scott Jan 28 '13 at 5:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

It isn't enough that $A\cap B=\emptyset$ - for instance $A=(0,1)$ and $B=(1,2)$ are disjoint and would have $\text{dist}(A,B)=0$. So you'll need to incorporate compactness in some way. – icurays1 Jan 28 '13 at 4:15

It is not obvious in general, only as they are compact. Look at the easy example of $\left[-1, 0\right), \left(0, 1\right]$: the intervals don't interesect, but are at $0$ distance. Note they are not compact.

As to showing this, it's pretty much covered in this older MSE post: Disjoint compact sets in a Hausdorff space can be separated (which is assuming you have a Hausdorff space, as is likely).

Edit: as pointed out below by GM, we surely are in a Hausdorff Space, and the proof goes through verbatim defining open balls in the usual way.

share|cite|improve this answer
OP says we're in ${\bf R}^n$, presumaby with the usual metric topology, so, Hausdorff, for sure. But maybe that's overkill. – Gerry Myerson Jan 28 '13 at 4:54
@Gerry Myerson: Good point. As you know, proof is (or can be made to look) the same in the general setting, and that of $\mathbb{R^n}. However, I will add an edit reflecting your true observation. – gnometorule Jan 28 '13 at 4:59

Define $f:A\times B \to \mathbb{R}$ by setting $(x,y) \to \lVert x-y \rVert$. As $f$ is continuous and $A\times B$ is compact, then there must be $(x,y) \in A\times B$ such that $\operatorname{inf}f(A\times B)=dist(A,B)=f(x,y)$. So if $dist(A,B)=0$ then $f(x,y)=0$. But $f(x,y)=\lVert x-y\rVert=0$ means that $x \in cl(B)=B$, a contradiction.

share|cite|improve this answer
what is $cl(B)$? – i_a_n Jan 28 '13 at 5:31
@i_a_n : That's the closure of $B$ in $\mathbb{R}$. – Sayantan Jan 28 '13 at 5:44

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