Confused about the open/closed set in metric space Let $(M,d)$ be a metric space. I understand well that $\emptyset$ and $\mathbb{R}$ are both open and closed sets. I read some notes that say, that $\emptyset$ and $M$ are both open and closed. So, doesn't it only hold if $M=\mathbb{R}$? Why is it necessary to define other than the set $\mathbb{R}$ (or $\mathbb{R}^{k}$) when we are learning about the metric space? For example $d:\mathbb{R}\times \mathbb{R}\to\mathbb{R}$ (or $d:\mathbb{R}^{k}\times\mathbb{R}^{k}\to\mathbb{R}$) instead of $d:M\times M\to\mathbb{R}$. I have seen some problems that don't let $M=\mathbb{R}$ which made me doubt.
 A: In general, if the space we're looking at is being viewed as a self-contained space, i.e., not a subspace of another space, then the entire space is trivially open. 
We know that $(\mathbb{R},d)$ is open as a metric space. Now here's the subtlety: 
Consider say $M=[0,1]$.  Then $M \subset \mathbb{R}$ is not an open set. That is, if $M$ is contained in the metric space $(\mathbb{R},d)$, it is closed. However, if we instead treat $[0,1]$ as its own metric space $([0,1],d_{[0,1]})$ where we use the induced metric from $(\mathbb{R},d)$, then the entire space is open.     
The space $([0,1], d_{[0,1]})$ is the entire space. It doesn't live in $\mathbb{R}$. It is its own space.  
In terms of a subspace topology, a set is open in the subspace $[0,1]$ if and only if there exists an open set $U \subset \mathbb{R}$ so that $U \cap [0,1]$ is open in $[0,1]$. It is thus trivial that $[0,1]$ is both open and closed in $[0,1]$.
Can you see why?  
Moreover, we have the property that if $Y$ is a subspace of $X$, and if $U$ is open in $Y$, and $Y$ is open in $X$, then $U$ is open in $X$, using the definition that a set is open in the subspace topology if there exists an open set $V \subset X$ so that $U = Y \cap V$.
