# Prove that the distance between a disjoint compact set and closed set is nonzero.

Let $X$ be a metric space, and $K$ is compact and $C$ is closed, and $K$ and $C$ are disjoint. Prove that $$\inf_{k\in K, c\in C} d(k,c) > 0$$

What I'm thinking is considering the function $f: K \rightarrow \mathbf{R}$ defined as $f(k) = d(k,C)=\inf_{c\in C} d(k,c)$. This function is uniformly continuous (given some $\epsilon >0$ let $\delta = \epsilon$, then $|d(x,C)-d(y,C)| \leq d(x,y) < \delta = \epsilon$ by the reverse triangle inequality, which I hope holds true for using the metric this: I can't seem to prove it out because the inf makes it confusing for me).

A continuous function on a compact set achieves its minimum. So if, our original inf was 0, there must be a $k$ such that $\inf_{c\in C} d(k,c) = 0$. This would imply $k$ is an accumulation/limit point of $C$ and $C$ is closed, so $k\in C$, a contradiction. I think this completes the proof.

Please let me know if I've done something erroneous, I am particularly concerned about the reverse triangle inequality bit not holding when using the metric this way. Also, if you have an alternative proof, I'd love to see it! Thanks!

• Not sure, but by definition of $\inf$ there is two sequences $k_n, c_n$ in $K$ and $C$ such that $|d(k_n,c_n) - \inf(d(K,C)) | < 1/n$. Since $X$ is metric we can extract a subsequence converging for $k_{n_j}$, and then we can also put $q_n$ in a compact, and then the sequence are both convergent now. If $\inf d(K,C) = 0$ then say $k_n \to l \in C$ and since $K$ is closed $l \in K \cap C$ which contradicts the hypothesis of the beginning. – user171326 Mar 4 '15 at 8:04

Take an arbitrary point $p\in C$.
By the triangle inequality it follows that for $x,y\in K$:
$$d(x,p)\leq d(x,y)+d(y,p)$$
Taking the infimum on the left side yields: $$d(x,C)\leq d(x,y)+d(y,p) \Leftrightarrow d(x,C)- d(x,y)+ \leq d(y,p)$$ If we take the infimum on the right side it follows that: $$d(x,C)- d(x,y)+ \leq d(y,C)$$ Thus, $d(x,C)- d(y,C) \leq d(x,y)$. If you change the role of $x$ and $y$ you will get the desired inequality.
• So, switching the roles of $x$ and $y$ we get another inequality to play with, that being: $d(y,C) - d(x,C) \leq d(x,y)$ I still do not see how we have shown that $d(C,K) > 0$ – Mathematical Mushroom May 11 at 23:29