An example showing subspace of compact space is not compact.

compactnessgeneral-topology

I had to give an example showing subspace of compact space is not compact.
For this I first picked example of compact space from the book Topology by James R. Munkres section 26, solved example 2.

$X= \{0\}\cup\{\frac{1}{n} | n\in \mathbb N \}$.
This space $X$ is compact space as subspace of $\mathbb R$. Now Let,
$Y= \{\frac{1}{n}\mid n\in \mathbb N\}$
I claim that $Y$ is not compact as subspace of $X$. To show this I used the fact that if $Y$ is subspace of $X$ then $Y$ is compact iff every covering of $Y$ by sets open in $X$ contains a finite subcollection covering $Y$.
First I showed that each singleton set $\{\frac{1}{k} \}$ is open in $X$.
Then, $Y=\bigcup_{k=1}^{\infty} \{\frac{1}{k} \}$
So, this collection is open cover of $Y$ by sets open in $X$.
Hence, by above fact if $Y$ is compact then there exist a finite subcollection of above singleton sets. But, this is not possible because, if such finite subcollection exist then $Y$ would be finite but, $Y$ is infact infinite set.
So, we conclude that $Y$ is not compact set.

Is my solution is correct? If not, then please tell me corrections.

Best Answer

This is a correct solution.

In general, as long as you pick a closed and bounded subset of $\mathbb{R}^n$ (such as a closed ball), and take a non-closed subset (e.g open ball), it satisfies the requirements of the question. Your example is similar.