Metric topology on closed set I had a question on the following portion of lecture notes :

Let $(X, d)$ be a metric space. Then for any $\delta > 0$, we define
the open ball to be $B(x, \delta) := \{y \in X : d(x, y) < \delta\}$.
One way to define open sets of a metric space, i.e. to dene the
metric topology is to then just declare a set $U$ open if around any
point $x \in U$, we can find an open ball $B(x,\delta) \subseteq U$:
Lemma 2.4 (Metric topology). Let $(X, d)$ be a metric space. Define a
set of subsets $τ_d$ as follows: we declare $U \subseteq X$ to be open
(this is, we set $U$ to be in $τ_d$), if for every $x \in U$, we can
find some $\delta > 0$ such that $B(x, \delta) \subseteq U$. Then
$τ_d$ is a topology and is called the metric topology.

A topology on $X$ needs to contain X. What if the metric space is "closed" ? For example if $X=[0,1]$ and the usual distance on real numbers (absolute value), then for $U=X$ and $x=0$ we will not be able to find a $\delta > 0$ such that $B(x, \delta) \subseteq X$.

The main point is that in the definition of $B(x, \delta)$, you consider only points inside $X$. So for $X = [0,1]$, $B(0, \delta) = [0, \delta)$.
