The whole space is an open set in a metric space

If $(X,d)$ is a metric space, then as far as closed and open sets in $X$ go, $X$ is the universe. There is nothing outside of $X$. There is nothing which $X$ is a part of. There is no intrinsic notion of a "boundary" of an arbitrary metric space.

Here is why $X$ is an open subset of $X$. Let $x \in X$. To show $X$ is open in $X$, we need to show there is at least one $\epsilon > 0$ such that the ball $B(x,\epsilon)$ with center $x$ and radius $\epsilon$ is contained in $X$. Note that by definition,

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

so $B(x,\epsilon)$ is always a subset of $X$, for any choice of $\epsilon$ whatsoever. This is why $X$ is open in $X$.

Example: Let $X = \{ (x,y) \in \mathbb{R}^2 : x^2 + y^2 \leq 1 \}$ be the closed disc in $\mathbb{R}^2$. Give $X$ the Euclidean metric. If you consider $X$ as a subset of the metric space $\mathbb{R}^2$ (with the same metric), it is obviously not open. But if you consider $X$ as a subset of the metric space $X$, it is open.

If you are confused, think about the fact that open balls (and more generally open sets) in $X$ are in general not open when you consider them as subsets of $\mathbb{R}^2$. take the point $(1,0)$ in $X$ and consider the ball in $X$ of radius $\frac{1}{2}$ and center $(1,0)$. Draw it. By definition, it is an open set in the metric space $X$. But it's not going to be an open circle. And it will not be open when considered as a subset of $\mathbb{R}^2$.

enter image description here


If $x \in X$ is any point and $\epsilon > 0$ any positive real number, then the open ball of radius $\epsilon$ centered at $x$, $\{ y\in X \mid d(x,y) < \epsilon)\}$, is by definition contained in $X$. Note that there is nothing wrong with a subset being simultaneously closed and open in a space (despite the terminology).

For example, consider the boundary point $(1,0)$ of the closed disk $$D = \{(x,y) \in \mathbb{R}^2\mid x^2 + y^2 \leq 1\}.$$ By definition, the open ball with respect to the metric of the closed disk centered around $(1,0)$ of radius $\epsilon > 0$ is the set of points in $D$ that are at distance $< \epsilon$ from $(1,0)$. (This is the red subset of the disk in the picture. The line has length $\epsilon$.) ball

For instance, if $\epsilon = 1000$, then this ball is the whole disk $D$. But no matter the choice of $\epsilon$, the ball will always be a subset of the disk $D$.

On the other hand, if we consider open balls with respect to the metric of the plane, then any open ball around $(1,0)$ won't be contained inside $D$.