11

Is given metric space $(M, d)$. Let $A\cap B = \emptyset; \,\,\text{dist}(A,B):=\inf\{d(x,y):x\in A, y\in B\}$. $A, B$ are both closed sets. Is it possible that $\text{dist}(A,B)=0$?

The first thought comes into mind is that obviously $\text{dist}(A,B)>0$, but possibly there are some tricky $d$ and $A, B$ so that it's untrue.

Thanks in advance!

nakajuice
  • 2,617

3 Answers3

32

HINT: In $\Bbb R^2$ consider the axes and the graph of $y=\frac1x$.

It’s just a little harder in $\Bbb R$, but it can be done. Let $\langle \epsilon_n:n\in\Bbb Z^+\rangle\to 0$, where each $\epsilon_n\in(0,1)$. Let $A=\Bbb Z^+$ and $B=\{n+\epsilon_n:n\in\Bbb Z^+\}$.

Brian M. Scott
  • 631,399
  • The idea is that $y=\frac{1}{x}$ converges in $\Bbb R$ but diverges in $\Bbb R^2$? – nakajuice Dec 03 '12 at 21:56
  • @starovoitovs: Not really, though the example does depend on the fact that $\frac1x\to 0$ as $x\to\infty$. Look at the distance in $\Bbb R^2$ between $\langle n,0\rangle$ on the $x$-axis and $\left\langle n,\frac1n\right\rangle$ on the graph of $y=\frac1x$. – Brian M. Scott Dec 03 '12 at 22:04
  • Let $a_n=(n,0), b_n=(n,\frac{1}{n})$, so it's clear that $d(a_n, b_n) < \epsilon$, so that $\text{dist}(a_n, b_n) = 0$. And $b_n$ is still closed, because a sequence $b_n = (n,\frac{1}{n})$ diverges in $\Bbb R^2$, what is not the case in $\Bbb R$ if $b_n$ would be $b_n = \frac{1}{n}$ (so that $b_n$ wouldn't be closed set). Am I right? – nakajuice Dec 03 '12 at 22:10
  • @starovoitovs: Since you never defined $\epsilon$, you can’t say that $d(a_n,b_n)<\epsilon$; however, $d(a_n,b_n)=\frac1n$, and for any given $\epsilon>0$ there is certainly an $n$ such that $\frac1n<\epsilon$. In fact $d(a_n,b_n)\to 0$ as $n\to\infty$, which is what we want, and what you probably meant. Your second sentence, though, makes no sense: the closed sets are the $x$-axis and the graph of the function. – Brian M. Scott Dec 03 '12 at 22:33
  • Second sentence was about considering that both of them are closed. In $\Bbb R$ if we take $a_n = 0, b_n = \frac{1}{n}$, the distance between them converges to zero, but $\frac{1}{n}$ is not closed, so we have to relate this example to $\Bbb R^2$ where first component $n$ of both $a_n, b_n$ diverges and thus both sequences diverge, so that after some steps it implies that $b_n$ is closed set. – nakajuice Dec 03 '12 at 22:49
  • Thank you Brian for detailed answer and replies! I think I got it. – nakajuice Dec 03 '12 at 22:50
  • 1
    @starovoitovs: You’re welcome. Yes, you can show that way that ${b_n:n\in\Bbb Z^+}$ is closed. Or you can use the fact that the graph of any continuous function from one metric space to another is closed in the product of the spaces. – Brian M. Scott Dec 03 '12 at 22:58
  • 1
    Elegant examples. Thank you. – rosterherik Apr 25 '18 at 08:42
11

Ok The answer has been given. But I would like to point out that the good assumption to ensure that the distance is strictly positive is that one of the set is compact, say :

Let $(M,d)$ be a metric space $A$ a compact subset and $B$ a closed subset. If $A\cap B=\emptyset$ then $d(A,B)>0$.

Hint :Proceed by contradiction if $d(A,B)=0$ then $d(x_n,y_n)\rightarrow 0$ Assume (up to the extraction of a subsequence) that $x_n\rightarrow x$ with $x\in A$. Then show (triangular inequality) that $d(x,B)=0$. Then it is easy to show since B is closed that $x\in B$.

user42070
  • 594
  • 3
  • 10
5

The OP has added additional information, specifying that the closed and disjoint sets.
the answer below no longer applies.


It could be that $A$ and $B$ intersect at one point $x$, in which case $d(x, x) = 0.$

For example: suppose we have the closed intervals $A \subset \mathbb{R}, B \subset \mathbb{R}$, with: $A = [0, 1],\;\; B = [1, 2]$.

Then $x = 1 \in A, y = 1 \in B$, and $d(x, y) = 0$.

amWhy
  • 210,739
  • 5
    Why not delete this answer, given that it no longer addresses the question? Given your reputation, you wouldn't lose much. – Alex M. Aug 20 '17 at 16:40