# (dis)prove: M compact if and only if every closed ball in M in compact.

I was wondering if my counter-example was ok:

Consider M=(0,1) with the standard metric on the real numbers. We have that M is not compact. Consider B, a closed ball with centre x and radius r in M. We know that B is compact iff B is closed and bounded. Now B is closed (I have proven this before) and certainly B is contained in the open ball with centre x and radius r+1. Thus shown that the statement is false.

If you have any feedback I would be grateful.

## 2 Answers

This doesn’t actually work, because in the space $$M$$ the closed ball of radius $$\frac12$$ centred at $$\frac12$$ is $$M$$ itself, which is not compact. Similarly, the closed ball of radius $$\frac14$$ centred at $$\frac18$$ is $$\left(0,\frac38\right]$$, which is not compact. If you replace $$M$$ by $$\Bbb R$$, however, you get a genuine example: now all of the closed balls are closed intervals in $$\Bbb R$$ and as such are compact, but $$\Bbb R$$ is not.

Take the set of real numbers, $$\Bbb{R}$$. Every closed interval in real line is closed and bounded even compact but $$\Bbb{R}$$ is not compact.