Let $X$ and $Y$ be topological spaces and suppose $f: X \to Y$ is continuous. If $f$ is continuous on $U \subset X$, will the restriction $f_U :U \to Y$ be continuous, if we consider $U$ to be a topological space of its own?
My second question is given open sets $U, V \subset \mathbb{R^n}$ and continuous functions $f_1 : U \to \mathbb{R^n}$ and $f_2 : V \to \mathbb{R^n}$ Will the function $f_{U \cup V}: U \cup V \to \mathbb{R^n}$ defined in the obvious way be continuous?