TITLE: In a non-Hausdorff space, can a compact subset fail to be closed?
QUESTION [6 upvotes]: In a Hausdorff space $X$, every compact subset $Y$ is closed. So if I relax the condition on $X$ being Hausdorff, is it possible compact subset $Y$ of $X$ not being closed?

REPLY [14 votes]: For sure. Consider $X = \{a, b\}$ with topology $\tau = \{\emptyset, \{a\}, X\}$. Note that $(X, \tau)$ is not Hausdorff and that $\{a\}$ is compact (the open covers for $\{a\}$ are already finite), but not closed.

REPLY [5 votes]: Yes.  Take a compact Hausdorff space with topology $\tau$ and weaken the topology, i.e. take any topology $\tau'$ strictly weaker than $\tau$, so that there is some set $U$ that is open in topology $\tau$ but not in $\tau'$.
But $U^c$ is still compact in $\tau'$ (because any open cover for $\tau'$ is still an open cover for $\tau$).  So $U^c$ is a compact set that is not closed
for topology $\tau'$.