TITLE: Why is a metric space an open subset of itself?
QUESTION [11 upvotes]: I've been reading about topology, and I've come across the following:
Given a metric space $X$, the entire space $X$ is an open subset of $X$.
I'm having some trouble thinking about this. I have a counterexample in mind. Suppose we consider the closed subset of $\mathbb{R}$ called $A = [a, b] \in \mathbb{R}$. Isn't $A$ also a metric space? As far as I know, the answer is yes. So, based on the above, $A$ is an open subset of $A$. But, since $a$ and $b$ aren't interior points of $A$, how is $A$ an open subset?
What is wrong with my line of thinking?

REPLY [2 votes]: Given a non-empty set $A$ endowed with a metric $d$, we define the metric space as $X:=(A,d)$.
For each $p\in A$, the open ball centred at point $p$ with radius $r$ is given by $N_p(r):=\{ q\in A:d(p,q)<r,r\in\mathbb{R}_{>0} \}\subset A$, implying that $A$ is open relative to itself.