Why is the entire set X, on which the metric space is defined, is said to be open? I have just started a course in functional analysis, and when reading about open sets, I came across this. 
Let $(X,d)$ be a metric space. Then $X$ is an open set in $(X,d)$. 
Suppose my set is the interval $[1,2]$ and the distance function between 2 points $x$ and $y$ is defined as$d(x,y)= |x-y|$. Now, my query here is how my set here $[1,2]$ can be said to be open? 
For it to be open I must be able to define an open ball at all points in my set/interval but I cannot define an open ball at the end points $1$ and $2$.
 A: Let $x_0$ be an element of $[1,2]$. Then
$$[1,2] = \{x\in [1,2]: d(x, x_0) < 5\} = B_{[1,2]}(x_0, 5)$$
so $[1,2]$ is an open ball around $x_0$ with a radius of $5$ (this follows from the definition of open balls).

The thing is that an open ball in a metric space depends on the metric space. So, $[1,\frac32)$ is an open ball around $1$ in the metric space $[1,2]$ (and the standard metric). The very same set is not open in the metric space $\mathbb R$, but that's irrelevant.

To prove that $X$ is open whenever $(X, d)$ is an metric space, you have to prove that for every $x_0\in X$, there exists some open ball that is contained in $X$ and $x_0$ is it's center. But any open ball would do, so you can just take $B(x_0, 1)$ and be done with it.
A: The space  $X$ is always open in itself. For one thing it's the union of all the open sets. ..  Or, for any  $x_0\in X $, consider $B (x_0,r)=\{x\in X| d (x_0,x)\lt r\} $ for any  $r\gt 0$. Then  $x_0\in B (x_0,r) $ . And  $B (x_0,r)\subset X $ is an open ball...
$X$ itself has to be included in any topology on $X $.
