# Hausdorff metric and compactness

Exercise 7.4.15 (Introduction to Real Analysis by Jiri Lebl): Let $$X$$ be a metric space and $$C \subset \mathscr{P} (X)$$ the set of nonempty compact subsets of $$X$$. Using the Hausdorff metric from Exercise 7.1.8, show that $$(C, d_H)$$ is a metric space. That is, show that if $$L$$ and $$K$$ are nonempty compact subsets then $$d_H(L, K) =0$$ if and only if $$L=K$$.

I know from Exercise 7.1.8 that the Hausdorff metric is a pesudo metric because $$d_H(X,Y)$$ can be zero for $$X \not= Y$$. For example, in Wikipedia it shows that $$d_H(\{3,6\}, \{1,3,6,7\}) =0$$. I also know that if $$L$$ is compact, every sequence in $$L$$ has a subsequence convergent in $$L$$. But, I do not know how to approach this question. I appreciate if you give some help.

• The example you gave from this Wikipedia page is for another attempt at defining a metric on $C$ , not for the actual $d_H$ that we use! So don't confuse yourself. Jan 11, 2020 at 10:00
• Note that actually $d_H(\{3,6\},\{1,3,6,7\})=2$ from $d(1, \{3,6\})=2$. Jan 11, 2020 at 10:01

Let $$L, K \subset X$$ be nonempty compact subsets.

Suppose $$d_H(L, K)=0$$. Then, by definition of $$d_H$$, we have $$\sup_{x \in L} d(x, K)=\sup_{x \in K} d(x, L)=0$$. Since $$K$$ is closed, $$d(x, K)=0 \iff x \in K$$, for all $$x$$, in particular, $$x \in L$$. So $$L \subset K$$. Symmetrically, $$K \subset L$$, too, so $$K=L$$.

The converse should be clear enough. Otherwise, let me know.

• Where do you use compactness? Jan 11, 2020 at 9:47
• I don't as it isn't necessary for the required statement. If I were to verify all the conditions for $d_H$ being a metric, I would need the boundedness of the subsets $L, K$, which, in this case, is guaranteed by compactness. Jan 11, 2020 at 16:43

Firstly, compactness guarantees that $$d_H(K,L)$$ is finite.

I'll use the definition $$d_H(K,L)=\max\{\sup_{x \in K} d(x,L), \sup_{x \in L} d(x,K)\}$$

and the facts $$d(x,A)=0 \iff x \in \overline{A}$$, and most of all that when $$A$$ is closed and $$x \notin A$$ then $$d(x,A)>0$$. That should be well-known.

Now if $$K \neq L$$ we can assume WLOG there is some $$p \in K\setminus L$$ (for definiteness) and then $$d_H(K,L)\ge \sup_{x \in K}d(x,L) \ge d(p,L)>0$$ by the second fact and $$p \notin L$$ and $$L$$ closed.

So $$K \neq L \implies d_H(K,L) \neq 0$$ which is equivalent logically to $$d_H(K,L)=0 \implies K=L$$ (for positive functions like $$d_H$$).

This already holds for distinct closed sets, not just compact ones. But compactness does give finiteness, which is also important. (we could use an equivalent bounded metric to avoid that, if you like). Closedness is important as e.g. $$d_H((0,1),[0,1]) =0$$ if we allow non-closed sets.