Show that if \(X\) is Hausdorff and \(A\subseteq X\) is compact then \(A\) is closed.
Solution
Let \(x\in X\setminus A\).
1. For each \(a\in A\), Hausdorffness gives disjoint open sets \(U_a,V_a\) with\[ a\in U_a,\qquad x\in V_a. \]The sets \(U_a\) cover \(A\).
2. Compactness gives \(a_1,\dots,a_r\in A\) such that\[ A\subseteq U_{a_1}\cup\cdots\cup U_{a_r}. \]Set\[ V=V_{a_1}\cap\cdots\cap V_{a_r}. \]Then \(V\) is an open neighborhood of \(x\) and is disjoint from every \(U_{a_i}\), hence from \(A\).
3. Thus every point of \(X\setminus A\) has an open neighborhood contained in \(X\setminus A\). Therefore \(X\setminus A\) is open and \(A\) is closed.