real analysis – (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.