S subset of E. S bounded and closed but not compact

I was reading through the Rosenlicht Analysis Text and I could not think of a subset $S$ of metric space $E$ where $S$ is bounded and closed but not compact. Could someone give me an example of this and why it's true? Thanks!

I was thinking that the subset $[0,1]$ of the metric space $R$ is closed and bounded however it is not compact.

• maybe the set of two distinct points? – Emilio Novati Feb 17 '15 at 19:34
• @EmilioNovati so like [0,1] right? – SilverCat Feb 17 '15 at 19:34
• No! this is not a set with only two distict points – Emilio Novati Feb 17 '15 at 19:35
• Isn't the set with the points from 0 to 1, [0,1] closed and bounded? How is [0,1] compact? – SilverCat Feb 17 '15 at 19:38
• @SilverCat It depends on the metric. We have a famous theorem (Heine Borel) that tells us in $\Bbb R^{n}$ with the Euclidean metric, a set is compact if and only if it is both closed and bounded. $[0,1]$ is closed and bounded, so by the theorem it must be compact. – layman Feb 17 '15 at 19:40

Equip $\Bbb R$ with the discrete metric, i.e., $d(x,y) = \begin{cases} 0 & x = y \\ 1 & x \neq y \end{cases}$.

Then the interval $[0,1]$ is a subset of $\Bbb R$ which is closed (since its complement is open), bounded since $[0,1] \subseteq B(\frac{1}{2}, 2)$ (where $B(x,\epsilon)$ is the ball around $x$ of radius $\epsilon$), but the set is not compact, since the collection of singletons $\{x \}$ for each $x \in [0,1]$ is an open cover with no finite subcover.

• Please don't accept this answer just yet. Wait a short while for others to answer because someone might have some valuable input, or may produce a better answer. – layman Feb 17 '15 at 19:41
• Awesome so this would be the subset that is closed and bounded but not compact. Could we define a metric space that is closed and bounded and not compact that has the above subspace that is closed and bounded and not compact? – SilverCat Feb 17 '15 at 19:42
• @SilverCat I mean, you could take the interval $[-5, 5]$ with the discrete metric. It has as a subspace the example above, and neither the subspace nor it are compact, but both are closed and bounded. – layman Feb 17 '15 at 19:43
• Thank you! Makes perfect sense! – SilverCat Feb 17 '15 at 19:46

$[0,1]\cap \mathbf Q$ is a bounded, closed subspace of the metric space $\mathbf Q$. However, it is not not compact since it is not complete.

• You mean it's closed as a subspace of $\Bbb Q$. – layman Feb 17 '15 at 20:02
• Well, it's a metric space. If you're in $\mathbf R^n$, a closed bounded subspace is compact. – Bernard Feb 17 '15 at 20:07
• I'm just filling in details that the OP may not know how to fill in, not questioning the validity of your answer. – layman Feb 17 '15 at 20:09
• @user46944: Oh! Sorry I misunderstood your comment. You're right, I'll add that. – Bernard Feb 17 '15 at 20:11