A subset is compact if and only if it is closed and bounded.

Proof

Suppose is compact. Then by is bounded, so is bounded. Furthermore, is closed in Hausdorff .
Conversely, if is closed and bounded, find interval s.t. . Then this space is a finite product of compact intervals hence compact. But then is also compact, as a closed subspace.