# 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
{"ft_lang_label":"__label__en","ft_lang_prob":0.85819614,"math_prob":0.999918,"size":1390,"snap":"2021-43-2021-49","text_gpt3_token_len":443,"char_repetition_ratio":0.10678211,"word_repetition_ratio":0.026086956,"special_character_ratio":0.3172662,"punctuation_ratio":0.12658228,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.0000049,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-18T15:19:33Z\",\"WARC-Record-ID\":\"<urn:uuid:2924eee7-7f39-4b40-8d64-d7778c96ac53>\",\"Content-Length\":\"176346\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:059850f8-323a-4490-b469-9bfe9332ebd7>\",\"WARC-Concurrent-To\":\"<urn:uuid:cb05f41e-6b5b-401f-8e0f-efc6bfe8926c>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3444521/is-the-hausdorff-distance-a-metric-on-the-set-of-closed-bounded-subsets\",\"WARC-Payload-Digest\":\"sha1:4Z3HDLSMUPDRTVDLEVBX774RN56WZXAY\",\"WARC-Block-Digest\":\"sha1:RVOJGACAXLAJWHZAJMLEHYMXSQW5B7KV\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323585203.61_warc_CC-MAIN-20211018124412-20211018154412-00081.warc.gz\"}"}