Lemma (compact subset in Hausdorff space is closed)

Let $X$ be a topological space.

If $X$ is Hausdorff and a subset $Y\subseteq X$ is compact, then $Y$ is closed.

Proof