Relatively open / Relatively closed sets I have the following problem:
It is given the interval $[0,2)$.
And the following intervals:
$[0,1], (0,1], [1,2), [0,1)$.
For each of them I should find if it is closed, open or neither relative to $[0,2)$. Now, I have tried to solve the problem in the following way:


*

*$[0,1]$ is closed relative to $[0,2)$ since it contains $0$ and $1$ or equivalently it contains its limit points.

*$[1,2)$ is closed relative to $[0,2)$ since it contains $0$ and after the intersection with $[0,2)$ it turns out that it also contains all its limit points relative to this interval.

*$(0,1]$ is neither open nor closed since it contains the limit point $1$ but from the other side it is open.

*$[0,1)$ seems to be neither, but taking its complement $[1,2)$ it turns out the complement itself is closed relative to $[0,2)$, so it turns out that $[0,1)$ should be open relative to $[0,2)$.
My question is are these correct since I do not use the general definition of openness of some subset relative to another one. Which is if we have a metric space $(X,d)$ and $A \subset D$ then $A$ is open relatively to $D$ iff $\forall x \in A$, $\exists \epsilon > 0$ s.t.  $D \cap B_\epsilon ^d (x)$ is open. How to use the definition to solve this problem? 
 A: (1).Your answers are correct and your reasoning has no flaws.
(2).The usual notation for an open ball, of radius $e$, centered at $x$, in a metric space $(X,d)$, is $B_d(x,e)$. When only one metric ($d$) is under consideration the subscript "$d$" is often omitted : $B(x,e)$. (Caution: In general we can have $B_d(x_1,e_1)=B_d(x_2,e_2)$ with $x_1\ne x_2$ or $e_1\ne e_2 $ or both.)
(3).Your def'n of relatively open (your last paragraph) is flawed: For metric space $(X,d)$ and $A\subset D\subset X,$ the set $A$ is relatively open in $D$ iff $$\forall x\in A \;\exists e>0\;(B_d(x,e)\cap D\subset A).$$
(4).  A general approach: Let $T$ be a topology (the set of open sets) on a set $X.$ (Look up, if necessary, the general def'n of a topology). Closed sets are defined as the complements of open sets.
(5).In a metric space, the topology defined by (generated by ) the metric is:  A set is open iff it is the union of a set of open balls. We can deduce that in a metric space a set is closed iff it contains all its metric limit points.
(6).Let $T$ be any topology on a set $X.$ Let $Y \subset X.$ The subspace topology on $Y,$ with respect to the topology $T,$ is  $$\{t\cap Y: t\in T\}.$$ From this it is immediate that if $Z\subset Y$ then $Z$ is relatively open in $Y $ iff $Z=t\cap Y$ for some $t$ that is open in $X.$ (In particular if $Z\subset Y$ and $Z$ is open in $X$ then $Z$ is relatively open in $Y$.)
Deduce that for a metric space, this def'n of relatively open is equivalent to the def'n of relatively open in (3).
(7). For $S\subset X,$ the closure of $S$ in $X,$ sometimes denoted $Cl_X(S)$, is defined as the intersection of all closed subsets of $X$ that have $S$ as a subset. Equivalently, $X$ \ $Cl_X(S)$ is the union of all open subsets of $X$ that are disjoint from $S$.
And $S$ is closed in $X$ iff $S=Cl_X(S)$.
For $S\subset Y\subset X,$ the closure of $S$ in $Y$, denoted $Cl_Y(S)$ is the intersection of all subsets of $Y$ that are relatively closed in $Y$ and contain  S as a subset. And if $S \subset Y$ then $S$ is closed in $Y$ iff $S=Cl_Y(S).$
An important, useful deduction  is  $$Cl_Y(S)=Y\cap Cl_X(S) \;\text {for all }\; S\subset Y.$$ In particular, if $Y\supset S=Cl_X(S)$ then $S$ is relatively closed in $Y$.
(8). Finally, with $X=\mathbb R$ and $Y=[0,2)$ we have:
(i)...$[0,1]$ is closed in $X$ so it is closed in $Y$. If $t$ is an open subset of $X$ and $t\supset [0,1]$ then $t\supset [1,1+r)$ for some $r\in (0,1).$ So $t\cap Y\supset [1,1+r)$ so $t\cap Y\ne [0,1].$ So $[0,1]$ is not open in $Y.$
Or we may observe that $Cl_Y(Y$ \ $[0,1])=Y\cap Cl_X((1,2))=Y\cap [1,2]=[1,2)\ne Y$ \ $[0,1]$, so therefore $Y$ \ $[0,1]$ is not closed in $Y$.
(ii)...The same argument that shows that $[0,1]$ is not open in $Y$ will also show that $(0,1]$ is not open in $Y.$ And $Cl_Y((0,1])=Y\cap Cl_X((0,1]=Y\cap [0,1]=[0,1]\ne (0,1]$ so $(0,1]$ is not closed in $Y.$
(iii)...$(-1,1)$ is open in $X$ so $(-1,1)\cap Y=[0,1)$ is open in $Y$. And $Cl_Y([0,1))=Y\cap Cl_X([0,1))=Y\cap [0,1]=[0,1]\ne [0,1)$ so $[0,1)$ is not closed in $Y.$
(iv). Since $[0,1)$ is open but not closed in $Y ,$ its complement in $Y,$ which is $[1,2),$ is closed but not open in $Y$. 
