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.