# Example of a compact subset that is not closed

What would be an example of a compact subset A of a $T_1$ such that A is not closed?

My attempt: $T_1$ is a space such that if we take any two points $x,y\in X$ then $\exists$ open set containing x but not y and vice-versa.

One example of $T_1$ space is an $\mathbb{R}$ with cofinite topology. Closed sets in the finite complement topology are the finite subsets of $\mathbb{R}$ as well as $\mathbb{R}$. So if we take any open interval then it is compact however it is not closed since the complement is not finite. Is it true?

• The empty set is always open and closed – Hagen von Eitzen Jun 2 '18 at 16:38
• Sorry i wanted to write in a different way, can you have a look now ? – user557550 Jun 2 '18 at 16:43

But note that any subset of $\mathbb{R}$ in the cofinite topology is compact. The same argument that shows the whole space is compact also works for any subset.
But the only closed subsets are the finite ones, so take $A = \mathbb{N}$ as an example of a compact non-closed subspace. Your open interval is fine too.