# Is the Hausdorff distance a metric on the set of closed bounded subsets?

Let $$(X,d)$$ be a metric space and define for a bounded set $$A\subset X$$ and a point $$x\in X$$ the distance from $$x$$ to $$A$$ by $$r(x,A) = \inf\{d(x,a):a\in A\}.$$ Define for closed bounded sets $$A,B\subset X$$ the Hausdorff distance $$h(A,B) = \max\left\{\sup_{a\in A}r(a,B), \sup_{b\in B}r(A,b)\right\}.$$ The book I am using, Elementary Topology Problem Textbook, asks to prove that $$h$$ is a metric on the set $$\mathcal K = \{A\subset X: A \text{ closed and bounded}\}$$. I have two problems with this. First, if $$A=\varnothing$$ then for any $$x\in X$$ we have $$r(x,A)=\inf\varnothing = +\infty$$, so clearly $$h$$ cannot be a metric. This can be remedied by considering $$\mathcal K = \{A\subset X: A \text{ closed, bounded, and nonempty}\}$$.

My second concern is that $$\mathcal K$$ should really be $$\{A\subset X: A \text{ compact}\}$$. To show the triangle inequality for $$h$$, we first need the triangle inequality for $$\rho$$, where $$\rho(A,B) = \sup_{a\in A}r(a,B)$$. For this we need the property that for each $$x\in X$$ and $$A\in\mathcal K$$ there exists $$a_x\in A$$ such that $$r(x,A)=d(x,a_x)$$. In this paper, this is Property (3) of Theorem 1. The proof given relies on sequential compactness (which is equivalent to compactness in metric spaces).

Do we need to limit $$\mathcal K$$ to compact sets, or is it okay to define it on (nonempty) closed bounded sets, in order for $$h$$ to be a metric?

• can't you pick any $a\in A$ so that $r(x,A)\approx d(x,a)$ and proceed from there Nov 21 '19 at 3:39
• What do you mean by $r(x,A)\approx d(x,a_x)$ exactly? Nov 21 '19 at 3:40
• take any $\varepsilon>0$, take $a\in A$ with $r(x,A)\le d(x,a)<r(x,A)+\varepsilon$ Nov 21 '19 at 3:43
• @Mirko And from there can we conclude the triangle inequality for $\rho$? Nov 21 '19 at 3:53

When working with the Hausdorff distance, its better to work with a metric space where $$d\le 1$$. In principle, this is not a problem, since every metirc space is homeomorphic to one where the metric is bounded.

Given this modification, we can define, for arbitrary subsets of $$X$$,

$$h(A,B):=\begin{cases} 0 & \text{if } A=B=\emptyset\\ 1 & \text{if exactly one of A and B is \emptyset}\\ \max\left\{\sup_{a\in A}r(a,B), \sup_{b\in B}r(A,b)\right\}& \text{if }A\neq\emptyset \wedge B\neq\emptyset \end{cases}$$ Then you can show that $$h$$ is a pseudo metric on $$\mathcal{P}(X)$$, the key being the inequality: $$d(x,Y)≤d(x,Z)+h(Y,Z)$$ where we define $$d(x,\emptyset)=1$$.

You can also prove that $$h(A,B)=0\iff \bar A=\bar B$$, which shows that $$h$$ is a metric on the family of closed sets.

When dealing with compact sets, you get easier proofs of the facts above, together with many extra properties. See I.4.F in Kechris' Classical Descriptive Set Theory

• The boundedness part can be taken care of by using $\overline d = \max\{d,1\}$, I suppose. But $h(A,B)=0\iff \overline A=\overline B$ doesn't show that $h$ is a metric, only a pseudometric. Nov 21 '19 at 3:52
• @Math1000 It shows it's a metric when you restrict to the family of closed sets Nov 21 '19 at 3:53
• You mean, it shows it is a metric when you restrict to the family of closed sets? Nov 21 '19 at 3:55
• I see, so the motivation in restricting $\mathcal K$ to compact sets is in e.g. the results "if $(X,d)$ is complete then $(\mathcal K, h)$ is complete" and "if $(X,d)$ is compact then $(\mathcal K, h)$ is compact." Nov 21 '19 at 4:01
• @Math1000 Yes. You also get, for example, $\mathcal{K}$ Polish if $X$ is Polish, which might not be true for mere closed sets (I'm honestly not sure). Polishness (is that a word?) is really the key concept here. The more useful structure imposed on the family of closed sets is that of a measurable space, look up the Effros-Borel structure in Kechris. All of this stuff has surprising applications too. For example, the hyperspace of compact sets pops up when looking (very finely) at trigonometric series. Nov 21 '19 at 4:04