How to prove that a compact set in a Hausdorff topological space is closed? How to prove that a compact set $K$ in a Hausdorff topological space $\mathbb{X}$ is closed? I seek a proof that is as self contained as possible.
Thank you.
 A: Elias!!! :-)
Then years delayed... I'd like to show one demonstration that uses quite different characterizations of being Hausdorff and being compact. If you already know those, the demonstration is really simple... it's just the ending of this post.
Compactness / finite intersection property
I will assume that you know that a topological space $K$ is compact if whenever $\mathscr{F}$ is a family of closed sets with the finite intersection property, then
\begin{equation*}
  \bigcap_{F \in \mathscr{F}} F \neq \emptyset.
\end{equation*}
Hausdorff
Being Hausdorff means that for any different points $a, b \in X$, there is a closed neighbourhood $F$ of $a$ such that $b \not \in F$. Call $\mathscr{F}(a)$ the family of closed neighbourhoods of $a$. Then, being Hausdorff means that for any $a$,
\begin{equation*}
  \bigcap_{F \in \mathscr{F}(a)} F = \{a\}.
\end{equation*}
In the closure of $K$
A point $a$ being in the closure of a set $K$ means that every neighbourhood of $a$ has non trivial intersection with $K$. In particular,
\begin{equation*}
  \mathscr{F}(a)|_K := \{ F \cap K |\, F \in \mathscr{F}\}
\end{equation*}
is a family of (relative to $K$, closed sets) with the finite intersection property.
Summing up together
Take $a \in \overline{K}$. Then, $\mathscr{F}(a)|_K$ is a family of closed sets (closed in $K$!) with the finite intersection property. Therefore,
\begin{equation*}
  \emptyset \neq \bigcap_{K \cap F \in \mathscr{F}(a)|_K} K \cap F = K \cap \bigcap_{F \in \mathscr{F}(a)} F = K \cap \{a\}.
\end{equation*}
Therefore, $a \in K$. That is, $\overline{K} \subset K$... and $K$ is closed.
A: A "sequential" proof: Let $x_\alpha \in K$ be a net with limit $x \in \mathbb{X}$. By compactness of $K$, there exists a subnet $x_{\alpha_{\beta}}$ which converges in $K$. Let $y \in K$ denote its limit. Since it's a subnet of $x_\alpha$, it follows that also $x_\alpha \to y$. Since $\mathbb{X}$ is Hausdorff, nets have unique limits, so $y=x$ and in particular $x \in K$.
A: Fix $x\in\mathbb{X}\setminus K$. Since $\mathbb{X}$ is Hausdorff, for each $y\in K$ there are disjoint open sets $U_y$ and $V_y$ such that $x\in U_y$ and $y\in V_y$. $\{V_y:y\in K\}$ is an open cover of $K$, so it has a finite subcover, say $\{V_y:y\in F\}$, where $F$ is some finite subset of $K$. Let $$U=\bigcap_{y\in F}U_y\;;$$ clearly $U$ is an open nbhd of $x$ disjoint from $K$. Since $x$ was an arbitrary point of $\mathbb{X}\setminus K$, $K$ must be closed.
A: Note that we do not need the full Hausdorff property for the proof given in the other answers to work, we only need that every compact subspace $C$ is Hausdorff. Furthermore, clearly if every compact subspace is closed we must have the T1 condition since points are compact, so there will be some sort of converse, and weakening the condition as we just did is a way to find one.
Since the union of $C$ with any point in its complement is still compact, and therefore Hausdorff, we can still find a finite open cover of $C$ disjoint with an open neighbourhood of an arbitrary point outside $C$, meaning that the complement is open.
Conversely, if any compact subset is closed, and on top of that they are strongly locally compact (every not necessarily neighbourhood of a point in it contains a compact neighbourhood of that point, this is equivalent to locally compact for Hausdorff spaces but does not follow from being compact if non-Hausdorff), then we have that any compact subset is Hausdorff. Since for any separate points x and y, the complement of x is an open neighbourhood of y, and therefore contains a compact (and therefore closed) neighbourhood of Y due to being strongly locally compact. Since it is closed, it is disjoint to an open neighbourhood of x.
For more on this, see k-Hausdorff spaces which is a weaker condition than being Hausdorff, but still implies that every compact subspace is closed. It is equivalent to the so called weak Hausdorff property for Hausdorff-compactly generated spaces.
