I know that $d(A,B)>0$ if two sets do not intersect. However what is the distance if two sets are very close two each other like $[1,2)$ and $(2,4]$?
-
How do you define the distance between two sets of real numbers? – paw88789 May 17 '21 at 13:28
-
8I know that $d(A,B) > 0$ if two sets do not intersect —are you sure? What in the definition of distance of sets says this? – Matthew Leingang May 17 '21 at 13:29
-
@MatthewLeingang, this is the definition I am using $$\operatorname{dist}(A,B)=\inf{d(a,b):a \in A,b \in B}$$ . – MrDi May 17 '21 at 13:31
-
1$a_n=2-1/n,b_n=2+1/n,d(b_n,a_n)=2/n\to0$ – Shubham Johri May 17 '21 at 13:32
-
OK, good. Are $A$ and $B$ subsets of $\mathbb{R}$? – Matthew Leingang May 17 '21 at 13:32
-
1How do you “know” the first sentence? – Thomas Andrews May 17 '21 at 13:33
-
@MatthewLeingang, Yes. – MrDi May 17 '21 at 13:33
-
1So your example just show you what you know is incorrect. – Arctic Char May 17 '21 at 13:33
-
Apply the definition to the two sets you suggested. If $A = [1,2)$ and $B = (2,4]$, what is $d(A,B)$? – Matthew Leingang May 17 '21 at 13:34
-
2Your statement is true if $A$ and $B$ are both compact sets. – Thomas Andrews May 17 '21 at 13:34
-
@MatthewLeingang, the definition suggests to me that $d(A,B)>0$ – MrDi May 17 '21 at 13:36
-
No. The infimum of a set of positive numbers can be zero. For instance the set ${\frac{1}{n}~:~n\in\Bbb N} = {\frac{1}{1},\frac{1}{2},\frac{1}{3},\frac{1}{4},\dots}$ has infimum equal to zero. – JMoravitz May 17 '21 at 13:37
-
1You should be able to convince yourself that $[1,2)$ and $(2,3]$ are closer together than $\frac{1}{2}$. They are closer together than $\frac{1}{100}$. They are closer together than even $\frac{1}{10000000000000000}$ and so on.... they are closer together than any strictly positive number you pick. And so... – JMoravitz May 17 '21 at 13:39
-
@JMoravitz, oh I get it now, so $d(A,B)=0$. – MrDi May 17 '21 at 13:40
-
1Yes, and this is shown using the very definition you cited involving the infimum and citing specific sequences of elements of $A$ and $B$ whose limit of distances between them approaches zero such as in ShubhamJohri's comment above, showing that the infimum of the set of distances is also zero. – JMoravitz May 17 '21 at 13:41
-
2For future reference, the distance between $[a,b]$ and $[c,d]$ with $a<b\leq c< d$ regardless whether or not we replace any of the square brackets with parentheses instead will always be $c-b$. In this case $d([1,2),(2,3])=2-2=0$ while $d([1,2],(7,9))=7-2=5$ and so on. – JMoravitz May 17 '21 at 13:46
1 Answers
I thought I would summarize the comments so that the question can have an answer.
The definition of distance between subsets of a metric space is: $$d(A,B) = \inf \{d(a,b) \mid a \in A,\ b \in B\}$$ If $A = [1,2)$ and $B = (2,4]$, both as subsets of $\mathbb{R}$ with its usual metric $d(a,b) = |a-b|$, what is $d(A,B)$?
You are correct that if sets $E$ and $F$ have a common point $x$, then $d(E,F) = 0$. Because you can count $x$ as both a point in $E$ and in $F$, and $d(x,x) =0$. But the converse—that $E \cap F = \emptyset \implies d(E,F) > 0$ is not true.
Why would the definition (falsely) “suggest” that the distance between disjoint sets is positive? Because $d(a,b) > 0$ whenever $a \neq b$. But as JMoravitz points out, the infimum of a set of positive numbers need not be a positive number. And Shubham Johri ever-so-succinctly provides an explicit pair of sequences $a_n \in A$, $b_n \in B$, such that $d(a_n,b_n) > 0$ for all $n$, but $\lim_{n \to\infty} d(a_n,b_n) = 0$. This means that $d(A,B) = 0$.
This illustrates an important property of the real numbers—they are dense in the sense for any $x,y \in \mathbb{R}$ with $x < y$ there exists $z$ such that $x < z < y$. Such is not the case for integers, and indeed, for subsets of $\mathbb{Z}$, $d(A,B) =0 \iff A \cap B \neq \emptyset$.
- 26,112