# Definition of open and closed sets for metric spaces

For metric spaces, the definition of an open set $U\subset X$ is that it is a set which for any point $u\in U$ in the set there exists some $\epsilon>0$ such that the open ball $B_\epsilon(u)\subset U$. So far so good.

1) Let $X=[0,1]$ and $U=[0,1]$. I know then that $U$ is said to be both open and closed. But how does this fit the definition of it being open? Esp. consider the end point $1$. How is the open ball defined for that?

2) Similarly, $X=(0,1)$ and $U=(0,1)$ is said to be closed (in fact both open and closed)...?

Thanks for clarifying.

-

What you need to remember is that the open ball $B_{\epsilon}(u)$ is defined as: $$B_{\epsilon}(u) = \{x \in X \mid d(x,u)\lt \epsilon\}.$$ That is, the open ball is the collection of all points of $X$ that are less than $\epsilon$ away from $u$.

If $X=[0,1]$, and $U=[0,1]$, then for any $a\in [0,1]$ we have $$B_{2}(a) = \{ x\in [0,1] \mid d(a,1)\lt 1\} = [0,1]\subseteq U$$ Since $B_2(a)\subseteq U$ for all $a\in U$, then $U$ is open according to the definition.

The reason $U$ is closed is that the complement, the empty set, is open.

Same thing with your second example.

That is: you are looking completely inside of $X$; you need to "forget" the fact that $X$ is sitting inside a larger metric space. That does not matter when discussing the topology of $X$, any more than the fact that $\mathbb{R}$ is sitting inside of the plane matters when discussing open sets of $\mathbb{R}$.

-

The open balls only contains points in $X$. When you say $X=[0,1]$, that's the set you are working in. So, for example, the open ball in $X=[0,1]$ of radius 1/2 centered at 1/4 would be the set $[0,3/4)$, not the set $(-1/4,3/4)$.

In the definition of the open ball: $B_\epsilon(x)=\{ y\in X : d(x,y)<\epsilon\}$, note that we require "$y\in X$".

-

In a topological space $X$, if you set $U = X$ you always obtain an open and closed set, because $X$ and $\varnothing$ always need to be in your topology. How does this fit into metric spaces topologies?

Well, it's simple : choose any point in $U$ and any $\varepsilon > 0$ : the ball $B_{\varepsilon}(x)$ is a subset of your topological space by construction, hence a subset of $U$, hence is open. The complement of $U$ is empty, thus open (either by definition of topologies or because it is vacuously true : there's a condition $\forall x \in U$, blablabla, and there's no $x$ to verify this, so it's true.)

Note that the topology depends on the metric. You have chosen sets which are always open and closed under any topology, but that's just because you chose those.

-