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

Solution 1:

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.

Solution 2:

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.

Solution 3:

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)$.