# Topology: Example of a compact set but its closure not compact

Can anyone gives me an example of a compact subset such that its closure is not compact please? Thank you.

• A compact set is closed in a Hausdorff space - so you are looking for a non-Hausdorff space? Nov 2, 2013 at 10:30
• you should look up generic points" Nov 2, 2013 at 10:31
• As @EldenElmanto points out, any irreducible non-quasicompact scheme satisfies this. Nov 2, 2013 at 10:31
• Try with a space with a dense point... Nov 2, 2013 at 10:32
• Dear @Elden, the only difficulty is to find a non quasi-compact space with a dense point. Nov 2, 2013 at 10:48

Write $\tau$ for the standard topology on $\Bbb R$. Consider now $\tau_0=\{U\cup\{0\}\mid U\in\tau\}\cup\{\varnothing\}$.

It's not hard to verify that $\tau_0$ is a topology on $\Bbb R$. It's also not hard to see that $\overline{\{0\}}=\Bbb R$. However one can easily engineer an open cover without a finite subcover.

I think the simplest example would probably be the "particular point topology" on an infinite set.

Let $X = \{p\} \cup \mathbb{N}$, topologized so that the nonempty open sets are the sets containing $p$.

The singleton $\{p\}$ is compact (finite sets are always are). However, $\overline{ \{p\}} =X$, and $X$ is not compact because the open cover $X = \bigcup_{n\in \mathbb{N} } \{p , n\}$ has no finite subcover.

Here is an example (using the formalism of affine schemes) illustrating Elden's excellent idea.

Let $k$ be a field and $\mathbb A^\infty_k$ be the affine scheme associated to the polynomial ring over $k$ in infinitely many variables: $$\mathbb A^\infty_k=\operatorname {Spec} (k[T_n|n\in \mathbb N])$$

For our example we will consider the open subspace $$X=\mathbb A^\infty_k\setminus \{\mathfrak m\}$$ where $\mathfrak m$ is the maximal ideal $\mathfrak m=(T_0 ,...,T_n,..)\subset k[T_n|n\in \mathbb N]$
That subspace $X$ has the point $\eta=(0)$ corresponding to the zero ideal as its generic point, meaning that the singleton set $\{\eta\}$ is dense in $X$ : $\overline{ \{\eta\}}=X$ .
Now $\{\eta\}$ is certainly compact but its closure $X$ is not quasi-compact:
Indeed, $X$ is covered by the family of principal open subsets $(D(T_n))_{n\in \mathbb N}$ but a finite union $\bigcup^N_{n=0} D(T_n)$ can never cover $X$ because for the prime ideal $(T_0,...,T_N)\in X$ we have $(T_0,...,T_N)\notin \bigcup^N_{n=0} D(T_n)$.

• All the other answers are beautiful and much more elementary but, believe it or not, I find mine quite natural. Just to warn you how twisted and perverted the mind of an algebraic geometer can be... Nov 2, 2013 at 21:48
• Thanks @Elden, but it is your idea! (Are you one of us twisted algebraic geometers?) Nov 2, 2013 at 21:58
• Hi @Georges, I have mostly looked at homotopy theory, so maybe you could say that I've bluffed through algebraic geometry. But I've been paying my dues through the mandatory "seminar of pain" called Harthshorne and quickly falling in love with it! It's such a rich subject and, as you might agree, the examples are the best part! Nov 3, 2013 at 2:32
• One can also consider $\operatorname{Proj}k[T_n:n\in\mathbb N]$ and note that $\operatorname{Proj}k[T_n:n\in\mathbb N]=\bigcup_n D_+(T_n)$. Jun 13, 2023 at 20:18

There are no Hausdorff examples; T$_0$ examples are trivial; the following T$_1$ example is only slightly less trivial.

Let $A,B$ be disjoint infinite sets, and let $X=A\cup B$ with the topology $$\tau=\{\emptyset\}\cup\{U\subseteq X:A\setminus U\text{ is finite}\}.$$ Then $X$ is a T$_1$-space, $A$ is a compact subspace of $X$, and $\overline A=X$ is not compact.

The other answers are fantastic. I present mine since I find it to be a useful "test case" to keep in mind in other situations, especially for statements about limits.

Consider $\mathbb{R}$ with the following topology: $U\in\tau$ if and only if $$U = (a,\infty),\hspace{2ex}a\in[-\infty,\infty],$$ where $(\infty,\infty)$ is understood to be the empty set and $(-\infty,\infty) = \mathbb{R}$.

Any singleton $\{x\}\subset \mathbb{R}$ is compact: given an open cover $\{U_\alpha\}_{\alpha\in A}$, take any one element of the cover; by definition it contains $\{x\}$, so there is a finite subcover consisting of just one set.

The closure of $\{x\}$ is $(-\infty, x]$. This set is not compact: the open cover consisting of all sets of the form $(a,\infty)$ for $a>-\infty$ has no finite subcover.

Consider $\Bbb R$ with topology generated by basis $B=\{(-\infty,a):a \in\Bbb R\}$ then the set $K=\{1/n : n \in\Bbb N\}$ is compact in this topology but its closure $[0, \infty)$ is not compact. Is this answer correct?