# If $K$ compact then $K$ is closed (a proof by sequences)

Let be $(X,d)$ a metric space and $K \subset X$ a compact set. I would like to prove that $K$ is closed.

I think that this solution is not correct. I will use the following definition:

"$K$ is compact if every sequence, in $K$, has a convergent subsequence that converges to $x \in K$."

Let be $(x_n)_{n \in \mathbb{N}}$ a sequence in $K$ such that $x_n$ converges to $x$. Then I will show that $x \in K$. If $x_n$ is in $K$ - compact -, then it has a subsequence $(x_{n_{k}})$ that converges to $y \in K$. Then $y = x$. That is, $x\in K$.

I think that the definition, that I used, is not correct. There is some counterexample?

• But your proof is correct. – user99914 May 16 '18 at 6:07
• Small detail: You ought to prove (or at least point out explicitly) that any subsequence of a convergent sequence converges to the same limit. However, it is correct. – Arthur May 16 '18 at 6:09
• Yes, the point of convergence must belong to K. – AVATAR May 16 '18 at 6:43
• @orrillo It's likely that when your books say "$x_n$ converges in $K$", they mean it converges in the subspace topology of $K$, in which case the limit is automatically in $K$. If the limit were not assumed to be in $K$, then any bounded set of $\mathbb R^n$ would be compact, even an open interval. – Jack M May 16 '18 at 7:28
• @orrillo What you are quoting is the definition of a compact space. If you are dealing with a space $X$ then obviously there is nothing outside $X$ so the limit point is automatically in $X$. Then you say that a subset $K\subseteq X$ is compact if it is compact as a space, meaning with subspace metric/topology, meaning treated as a space. With that you can clearly see that the limit point has to be in $K$. – freakish May 16 '18 at 13:01

You do use essentially that limits of sequences are unique : $x_n \to a$ and $x_n \to b$ implies $a=b$ for all sequences $(x_n)$.
So explicitly: suppose $(x_n)_n$ is a sequence in $C$ that converges (in $X$, the whole (metric) space) to $p$. As $C$ is (sequentially) compact, there is a subsequence $(x_{n_k})_k$ of $(x_n)_n$ and a $c \in C$ such that $x_{n_k} \to c$.
By the fact that we have a subsequence, we also know that $x_{n_k} \to p$ (this holds in all spaces: a subsequence of a convergent sequence converges to the same limit). Finally, by unicity of limits $p=c \in C$, so $p \in C$ and $C$ is (sequentially) closed.
This only proves the statement "a compact set is closed" if you know you're in a context where sequentially compact is equivalent to compactness and sequentially closed implies closed. A valid context is metric spaces, as I said. But if you're required to prove this statement in a more general setting, you will need that $X$ is Hausdorff (or something close to it) and use coverings or use the above proof generalised to nets (using Hausdorffness too).