Metric Spaces – Distance Between Two Sets and Their Closest Points

metric-spaces

Assume we have a metric space $S$, a metric $d$ and two subsets of it, called $A$ and $B$. Assume also that $A\cap B = \emptyset$. Assume also that at least one of these sets is bounded, ie. has no sequence of points where the the distance between points gets infinitely large.

Then we define the distance between $A$ and $B$ as $\min \{ d(a,b)| a \in \bar A, b \in \bar B\}$, the points a and b belong to the closure of the respective set.

When $S = \Re^n$ (vectors of real numbers), it is clear (if someone can explain why, would be great) that $d(A,B) = d(\partial A, \partial B)$, ie, the two points $a \in A, b \in B$ that are closest to each other and belong to different sets, are also members of the respective boundary of the set they belong to.

I would like thoughts on when this is true in general. When the is the distance between two sets the same as the distance of their boundaries?

Best Answer

Your definition of distance between sets $A$ and $B$ doesn't work for some metric spaces. Consider two examples.

Let $S = \mathbb{Q}$. Let $A=[0,\sqrt{2}) \cap \mathbb{Q}$ and $B = \{2\}$. Sets $A$ and $B$ are closed bounded subsets of the metric space $S$. However, $\min\{d(a,b): a\in A, b\in B\}$ is not defined (but $\inf\{d(a,b): a\in A, b\in B\} = 2 - \sqrt{2}$).

Now let $S = \ell_1$. Let $e_i$ be the standard basis of $\ell_1$. Let $A = \{e_i: i\in{\mathbb{N}}\}$ and $B = \{(1 - 1/i) e_i: i\in{\mathbb{N}}\}$. Sets $A$ and $B$ are bounded and closed. Again, $\min\{d(a,b): a\in A, b\in B\}$ is not defined (but $\inf\{d(a,b): a\in A, b\in B\} = 0$).

To avoid this problem, let us assume that $A$ and $B$ are compact sets (or, alternatively, that $S$ is a complete metric space, and $A$ and $B$ are totally bounded sets).

To ensure that $d(A,B) = d(\partial A, \partial B)$, it is sufficient to assume that $S$ is a path metric space (of course, it is a sufficient but not a necessary condition). Recall that $S$ is a path metric space if the distance between every pair of points equals the infimum over of the lengths of curves joining the points (see [Gromov “Metric structures for Riemannian and non-Riemannian spaces”]). In particular, all normed spaces are path metric spaces. Also a closed Riemannian manifold equipped with the geodesic metric is a path metric space.

Proof. Suppose that $S$ is a path metric space. Consider compact subsets $A,B \subset S$. We want to prove that $d(A,B) = d(\partial A, \partial B)$. Suppose to the contrary that $d(A,B) < d(\partial A, \partial B)$. Let $a\in A$ and $b\in B$ be such that $d(a,b) = d(A,B)$.

Choose $\varepsilon > 0$ such that $(1 + \varepsilon) d(A,B) < d(\partial A, \partial B)$. Since $S$ is a path metric space, there is a curve $\gamma:[0,1]\to S$ with $\gamma(0) = a$ and $\gamma (1) = b$ of length at most $(1 + \varepsilon) d(A,B)$. This curve cannot intersect both $\partial A$ and $\partial B$, as otherwise the distance between $\partial A$ and $\partial B$ would be at most $(1 + \varepsilon) d(A,B)$. On the other hand, $\gamma(t_A) \in \partial A$ for $t_A = \sup \{t: \gamma(t) \in A\}$ and $\gamma(t_B) \in \partial B$ for $t_B = \inf \{t: \gamma(t) \in B\}$. We get a contradiction. QED

Here is an example when $d(A,B) \neq d(\partial A, \partial B)$. Let $S= [-1,1]\times \{0,1\}$. Define \begin{align*} d((x,0),(y,0)) &= d((x,1),(y,1)) = |x-y|;\\ d((x,0),(y,1)) &= |x| + |y| + 1. \end{align*} It is easy to verify that $(S, d)$ is a complete metric space. Let $A = [-1,1] \times \{0\}$ and $B = [-1,1] \times \{1\}$. We have, $\partial A = \{-1,1\} \times \{0\}$ and $\partial B = \{-1,1\} \times \{1\}$. Thus $$d(A,B) = d((0,0), (0,1)) = 1$$ but $$d(\partial A, \partial B) = d((1,0),(1,1)) = 3.$$