show that the interval of the form $[0,a)$ or $(a, 1]$ is open set in metric subspace $[0,1]$ but not open in $\mathbb R^1$ 
On the metric subspace $S = [0,1]$ of the Euclidean space $\mathbb R^1 $, every interval of the form $A = [0,a)$ or $(a, 1]$ where $0<a<1$ is open set in S. These sets are not open in $\mathbb R^1$

Here's what I attempted to show that $A$ is open in $S$. I have no idea how it is not open in $\mathbb R^1$.
Let $M = \mathbb R^1$, $x \in A  = [0,a)$ .
If $x = 0$, $ r \leq \min \{a, 1-a\}, \\\  B_S(0; r) = B_M(0,r)\cap[0,1] = (-r, r) \cap[0,1] = [0,r) \subseteq A $
If $x \neq 0, r \leq \min \{x,|a-x|, 1-x\},  \\B_S(x; r) = B_M(x,r)\cap[0,1] = (x-r, x+r) \cap[0,1] \subset (0,x) \text{ or } (x, 1) \subset A$

Hint: To show $(x,1]$ not open in $\mathbb R$ simply show that there is no open neighborhood of $1$ included in the half-closed interval.
