# Locally compact metric space having atleast one non-compact closed ball

Can we have a non-trivial example of a locally compact metric space in which atleast one non-trivial closed ball is not compact. I am considering that infinite set with discrete metric is a trivial example. More than one examples are appreciated.

The real numbers, usual topology, but metric $d(x,y) = \min\{1,|x-y|\}$. It is still locally compact, but $\overline{B}(0,1)$ is the whole space and is not compact.

Take $(-1,1)$, endowed with the usual distance. It is locally compact and, if $r>1$ and $x\in(-1,1)$, the closed ball centered at $x$ and with radious $r$ is non-compact. Note that, it some cases, it is not the whole space either (such as when $x=\frac45$ and $r=\frac32$).

• I forget to mention that closed ball required is distinct from the whole space. As these balls are obtained because of finite diameter of the space like in infinite discrete metric the ball behaving B(x, 1] of infinte discrete metric. . – Abdul Gaffar Khan Sep 19 '18 at 13:48
• @AbdulGaffarKhan I've edited my answer. What do you think now? – José Carlos Santos Sep 19 '18 at 13:51
• @AbdulGaffarKhan If you aren't satisfied with José's example for whatever reason, I suggest posting a new question, explicitly mentioning any extra criteria. – Theo Bendit Sep 19 '18 at 13:54

Let $(X,d)$ be any non-compact metric space.

Form the standard bounded metric $\bar{d}=\min\{d,1\}$ (note that $d$ and $\bar{d}$ generate the same topology).

If $r\geq 1$, the closed ball $\bar{B}(x,r)=X$ and is therefore not compact.

Note: The original question was edited to impose the condition that the closed ball also be non-trivial, so this answer now does not furnish an example.

Here is another example. Take $X=(0,1)\times S$ where $\# S\geq 2$, with the distance function $$d((t_1,s_1),(t_2,s_2))= \begin{cases} |t_1-t_2| & s_1=s_2\\ 2 & s_1\neq s_2 \end{cases}$$ i.e., you are taking $\#S$ disjoint copies of the interval and declaring the distance between two points to be the same as that on $(0,1)$ if they are on the same copy and $2$ otherwise (there is nothing special about $2$, any $M>1$ works). Then $\overline{B}_1((t,s))=(0,1)\times\{s\}$ is non-compact and not the whole space $X$.

Note that you could replace $(0,1)$ by any noncompact, locally compact metric space with diameter $\leq 1$.