Let $(X,\tau_X)$ and $(Y,\tau_Y)$ be topological spaces. Let $A \subset Y$, and equip $A$ with the [subspace topology](/page/Subspace%20Topology)
\begin{align*}
\tau_A := \{A \cap V : V \in \tau_Y\}.
\end{align*}
Let $f: X \to A$ be a function, and let $i: A \to Y$ be the inclusion map, defined by $i(a)=a$ for every $a \in A$. Then $f: (X,\tau_X) \to (A,\tau_A)$ is continuous if and only if $i \circ f: (X,\tau_X) \to (Y,\tau_Y)$ is continuous.