Distance between two compact sets and a counterexample when these two are only closed

188 Views Asked by At

Here is my exercise that I'm struggling with for 2 days.

Since I'm a beginner for Analysis it is so hard for me to solve.

Please help me...

Let $X$ be a metric space with metric $d$. For nonempty subsets $A,B\subset X$ define $d(A,B)=\inf\{d(a,b)\vert a\in A~~and~~b\in B\}$. Show that if $A$ and $B$ are compact subspaces then there exist points $a\in A$ and $b\in B$ with $d(a,b)=d(A,B),$ so in particular $d(A,B)>0$ if $A\cap B=\varnothing.$

Show by an example that both these statements can be false if $A$ and $B$ are only assumed to be closed instead of compact.

1

There are 1 best solutions below

1
On BEST ANSWER

Since $A$ and $B$ are compact, their product $A\times B$ is compact. Hence the function $d:A\times B\rightarrow \mathbb{R}$ has an element $x\in A\times B$ such that $d(x)$ is the infimum. This proves the theorem.

For a counterexample, take $A=\{n+2^{-n}:n\in\mathbb{Z}^+\}$ and $B=\mathbb{Z}^+$. Note that $A\cap B=\emptyset$ but $\lim 2^{-n}=0$, hence $d(A,B)=0$.