Prove compact subsets of metric spaces are closed

Prove compact subsets of metric spaces are closed

Note, this question is more of analyzing an incorrect proof of mine rather than supplying a correct proof.

My Attempted Proof

Suppose $X$ is a metric space. Let $A \subset X$ be a compact subset of $X$ and let $\{V_{\alpha}\}$ be an open cover of $A$. Then there are finitely many indices $\alpha_{i}$ such that $A \subset V_{\alpha_{1}} \cup \ ... \ \cup V_{\alpha_{n}}$.

Now let $x$ be a limit point of $A$. Assume $x \not\in A$. If $x \not\in A$ put $\delta = \inf \ \{\ d(x, y) \ | \ y \in A\}$. Take $\epsilon = \frac{\delta}{2}$, then $B_d(x, \epsilon) \cap A = \emptyset$ so that a neighbourhood of $x$ does not intersect $A$ asserting that $x$ cannot be a limit point of $A$, hence $x \in A$ so that $A$ is closed. $\square$.

Now there must be something critically wrong in my proof, as I don't even use the condition that $A$ is compact anywhere in the contradiction that I establish. The above proof would assert that every subset of a metric space is closed.

I think my error must be in the following argument : $\delta = \inf \ \{\ d(x, y) \ | \ y \in A\}$. For if we take $X = \mathbb{R}$ and $A = (0, 1) \subset \mathbb{R}$, then $\delta = 0$ if $x = 1$ or $x = 0$.

Am I correct in analyzing this aspect of my proof?

• $\delta$ might be $0$ (and is in fact so if $x$ is a limit point of $A$ and $x\not\in A$). I just noticed you mentioned that in your post, the problem is that $B_d(x,0)$ isn't in general a nbhd of $x$ – Alessandro Codenotti Jan 24 '17 at 11:54

Suppose $$A$$ is compact. Then let $$x$$ be in $$X \setminus A$$. We must find a neighbourhood of $$x$$ that is disjoint from $$A$$ to show closedness of $$A$$.

For every $$a \in A$$ let $$U_a = B(a, \frac{d(a,x)}{2})$$ and $$V_a =B(x, \frac{d(a,x)}{2})$$. Then $$U_a$$ and $$V_a$$ are disjoint open neighbourhoods of $$a$$ and $$x$$ respectively (disjoint follows from the triangle inequality, check this).

Then the $$U_a ,a \in A$$ together form a cover of $$A$$, and now we use compactness of $$A$$ to get finitely many neighborhoods $$U_{a_1}, \ldots, U_{a_n}$$, that also cover $$A$$. But then $$V_{a_1} \cap \ldots V_{a_n}$$ is an open neighbourhood of $$x$$ that misses $$A$$ (since a point in $$A$$ cannot be in all of $$V_{a_1}, \ldots, V_{a_n}$$ because it belongs to some $$U_{a_i}$$ which is disjoint with $$V_{a_i}$$.).

So $$A$$ is closed.

An alternative with sequences: suppose $$x \in \overline{A}$$. Then being a point in the closure we find a sequence in $$A$$, $$(a_n)$$ that converges to $$x$$. The sequence $$(a_n)$$ from $$A$$ has a convergent subsequence in $$A$$ by compactness of $$A$$, so there is some $$a \in A$$ and some subsequence $$a_{n_k} \rightarrow a$$. But also $$a_{n_k} \rightarrow x$$, and as limits of sequences in metric spaces are unique: $$a =x$$, but then $$x \in A$$ as required: $$\overline{A} = A$$.

In a metric space we have:

$A$ is compact iff $A$ is sequentially compact.

Use this property to show that $A$ is closed.

To your proof: if for $x \in X \setminus A$ we define $\delta(x) = \inf \ \{\ d(x, y) \ | \ y \in A\}$, then it holds that

$(*)$ $\quad$ $A$ is closed iff $\delta(x)>0$ for all $x \in X \setminus A$ !

Try a proof of $(*)$.

The fact that you're taking an open ball around x of radius epsilon and that ball doesn't intersect with A is fundamentally incorrect if x is a limit point of A. Thus, your assumption that delta, and effectively epsilon, is greater than 0 is wrong.