Subsets of continuous functions are also continuous Let $X$ bet a subset of $R$, and let $f : X \rightarrow R$ be a continuous function. If $Y$ is a subset of $X$, show that the restriction $f|_Y : Y \rightarrow R$ of $f$ to $Y$ is also a continuous function.
My attempt
The definition of continuity is, let $X$ be a subset of $R$ and let $*F*$ : $X \rightarrow \mathbb{R}$ be a function. Let $x_0$ be an element of $X$. We say that $F$ is continuous at $x_0$ iff $\lim_{x \to x_0;x \in X}$. After this, I'm not sure how to continue with the proof.
 A: Take any open set $V \in \mathbb R$ then $$(f|_Y)^{-1}(V) = Y \,\cap f^{-1}(V)  $$
as $f$ is continuous then $f^{-1}(V)$ is open. Thus $(f|_Y)^{-1}(V)$ is open in $X$ showing that $f|_Y$ is continuous. 
A: Let $a\in Y$ and take $V=(f(a)-\epsilon,f(a)+\epsilon)$. Since $f$ is continuous, there is an open interval $U=(a-\delta,a+\delta)\subseteq X$ s.t. $f(U)\subseteq V.$ Now, $U'=U\cap Y$ is open in $Y$ (by definition of the subspace topology), contains $a$ and is s.t. $f(U')\subseteq V$, which is what it means for $f|_Y$ to be continuous at $a$.
It may be easier though just to use the basic definitions:Let $i:Y\to X$ be the inclusion map. Then, by definition of the subspace topology, $i$ is continuous: if $V$ is open in $X$, then $i^{-1}(V)=V\cap Y$. To finish, observe that $f|_Y=f\circ i$.
Remark: Actually, the subspace topology on $Y$ is $defined$ to be the coarsest one for which $i$ is continuous.
A: For any $x_0\in Y$, $f|_Y$ is continuous at $x_0$ means $\forall \varepsilon>0\exists\delta>0$ s.t. $\forall x\in B(x_0,\delta)\cap Y$, we have $|f(x)-f(x_0)|<\varepsilon$. You have already known that $\forall \varepsilon>0\exists\delta>0$ s.t. $\forall x\in B(x_0,\delta)\cap X$, $|f(x)-f(x_0)|<\varepsilon$. Note that $Y\subset X$.
But you should be aware that in an abstract space, limit does not have such good properties and the absolute value is not a good definition. So the methods of Aaron Maroja and Chilango is more universal.
