# Does a compact subspace have to be closed in an arbitrary metric space?

For Euclidean spaces, we have that a compact subspace has to be closed (and bounded.) But how about an arbitrary metric space? Or how about an arbitrary topology space?

-

## 2 Answers

A compact subset of a Hausdorff space is closed (exercise), and any metric space is Hausdorff. In general this need not be the case. The simplest counterexample is the $2$-point space with the indiscrete topology.

-
I see. If a subset of a Hausdorff space is not closed, then there exists a sequence of points in this subset that converge to a point not in this subset, which means that this subset is not complete, hence not compact. In non-Hausdorff space however, it is no longer true that a subset that contains all its limits is necessarily a closed subset. – Voldemort Oct 13 '12 at 2:08
Since the question is sated for metric spaces, why not use the following elementary fact. Take $u$ to be a limit point and $u_n$ a sequence in the compact subset converging to $u$. Since $u_n$ has a subsequence converging in the compact subset, $u$ must be in the compact subset. – user12918723509187 Oct 13 '12 at 2:37
@Voldemort: No, a subset that contains all of its limit points is necessarily closed in any space. What Qiaochu is pointing out is that in a non-Hausdorff space you can have a compact set that doesn’t contain all of its limits points and therefore isn’t closed. – Brian M. Scott Oct 13 '12 at 3:59

It's also true that any compact subset of a metric space is bounded, since $\{B_n( 0) : n \in \mathbb{N} \}$ is an open cover.

-
That I already knew. Actually, in metric space, a subset is compact if and only if it is totally-bounded and complete. – Voldemort Oct 13 '12 at 2:14