How can an isolated point be an open set?

I have the following definition:

In a metric space $(X,d)$ an element $x \in X$ is called isolated if $\{x\}\subset$ X is an open subset

But how can $\{x\}$ be an open subset? There has to exist an open ball with positive radius centered at $x$ and at the same time this open ball has to be a subset of $\{x\}$ but how can this be if there is only one element?

I'm trying to wrap my head around this, but I can't figure it out. It doesn't make sense for metrics on $\mathbb{R}^n$ since each open ball with some positive radius has to contain other members of $\mathbb{R}^n$.

The only thing I could think of was that we have some $x$ with 'nothing' around it and an open ball that contains only $x$ and 'nothing' (even though a positive radius doesn't make sense since there is nothing), so therefore the open ball is contained in $\{x\}$. But I'm not even sure we can define such a metric space, let alone define an open ball with positive radius containing only $x$ and 'nothing'.


Suppose your metric space is $\mathbb{Z}$. Then you can take a ball around the element $4 \in \mathbb{Z}$ of radius $\frac{1}{2}$. The only element of your metric space in that ball is $4$, so the ball is just the set $\{4\}$, so $\{4\}$ is open.


Let $X$ be any non-empty set, and define a function $d:X\times X\to\Bbb R$ as follows: for $x,y\in X$,

$$d(x,y)=\begin{cases} 0,&\text{if }x=y\\ 1,&\text{if }x\ne y\;. \end{cases}$$

You can easily check that this function $d$ is a metric on $X$; it is commonly called the discrete metric on $X$. Now observe that for if $x\in X$ and $0<r\le 1$, then

$$B(x,r)=\{y\in X:d(x,y)<r\}=\{x\}\;:$$

the set $\{x\}$ is the open $r$-ball centred at $x$ provided that $0<r\le 1$.

For a less trivial example, consider the set

$$Y=\{0\}\cup\left\{\frac1n:n\in\Bbb Z^+\right\}$$

with the metric that it inherits from the usual metric on $\Bbb R$. You can check that for each $n\in\Bbb Z^+$ we have

$$B\left(\frac1n,r\right)=\left\{\frac1n\right\}$$

provided that $0<r\le\frac1{n(n+1)}$; this is because the point of $Y$ closest to $\frac1n$ is $\frac1{n+1}$, and the distance between them is

$$\frac1n-\frac1{n+1}=\frac1{n(n+1)}\;.$$


Take, for instance, your set to be the integers, with the metric inherited from the metric on $\mathbb{R}^1$. Then any singleton is open, and so every point is isolated. This is because, as you said, these points have 'nothing' around them (if you look close enough).