# In a metric space a compact set is closed

I want to show the following:

Let $X$ be a metric space. Show that every compact subset $Y$ of $X$ is closed.

The idea is to show that $X\setminus Y$ is open. So, for any $x \in X\setminus Y$, I cover up the compact set $Y$ with balls defined as $B_{\epsilon}(y_0):=\{y\in Y \mid d(y,y_0)<\frac{d(x,y_0)}{2}\}$. Then $\bigcup_{i\in I}B_{\epsilon}(y_0^i)=Y$. Due the compactness of $Y$ there exists finitely many balls such that: $\bigcup_{i = 1}^n B_{\epsilon}(y_0^i)$. Now it is clear that $B_{\epsilon}(x)\subseteq X\setminus Y$.

Is this correct? And I don't like the style of the notations. Maybe someone can give me some advice?

## 2 Answers

Well, the notation isn't formally correct. It's ok to take $B_ε(y_0) := \{y ∈ Y \mid d(y, y_0) < \frac{d(x, y_0)}{2} \}$. But then $ε$ stands for nothing and is just part of the name so it doesn't make sense when you take the final $ε$ in the last step. On the other hand the definition corresponds to the definition of open ball with radius of $\frac{d(x, y_0)}{2}$ so probably for each $y ∈ Y$ you choose radius $ε_y := \frac{d(x, y)}{2}$ and then take open ball $B_{ε_y}(y)$.

Also $I$ doesn't cover anything, it is just index set, which in our case has no well-defined meaning. What is $y_0^i$? You can actually index by the points of $Y$ so your cover is $\{B_{ε_y}(y): y ∈ Y\}$. Then there is finite $F ⊆ Y$ such that $\{B_{ε_y}(y): y ∈ F\}$ still covers $Y$. Then we take $ε := \min\{ε_y: y ∈ F\}$ and now $B_ε(x) ⊆ X \setminus Y$.

• Thanks for the answer, that helped a lot. One question is left. $\epsilon$ is not 0, only because we have a finite set of balls, which covers our compact set, right? If we do not have compactness, then $\epsilon$ could be zero, right? – Marm Jun 26 '14 at 15:25
• @Balla Yes you are right, but formally it is more like $ε > 0$ because it is mininum: it is one of those $ε_y$'s which are positive. If the set was infinite it may have not a minimum. And if you took infimum instead, then it could be zero as you say. – user87690 Jun 26 '14 at 15:40

Disregard this if you haven't covered sequential compactness.

In the scope of metric spaces, compactness via open cover and sequential compactness are equivalent.

To prove that $Y$ is closed, consider a sequence $(x_n)\in Y^\mathbb N$ such that $(x_n)$ converges to some $l \in X$.

Your goal is to prove $l\in Y$.

Since $Y$ is compact, there is some subsequence $(x_{n_k})$ that converges to some $L\in Y$

But any subsequence of a convergent sequence converges to the limit of the original sequence.

Hence $l=L$ and $l\in Y$

• thanks for your answer, but i dont want to prove it in this way :). So without sequential compactness – Marm Jun 26 '14 at 15:21