# continuity and subspaces

Let $X = A \cup B$, where $A$ and $B$ are subspaces of $X$. let $f: X \to Y$; suppose that the restricted functions $f\upharpoonright A:A\to Y$ and $f\upharpoonright B:B\to Y$ are continuous. Show that if both $A$ and $B$ are closed in $X$, then $f$ is continuous.

How does using h and g, as arbitrary functions in the hint below work?

-
What is $X$? A metric space? A subset of $\mathbb{R}^n$? –  Zev Chonoles Nov 6 '11 at 9:47
If $X$ is a general topological space, $\epsilon-\delta$ arguments aren’t available: they require a metric. (They’re also unnecessarily complicated, unless the only definition of continuity that you have is for metric spaces.) –  Brian M. Scott Nov 6 '11 at 9:49
Use the fact that continuity can be equivalently defined as: the inverse image of a closed set is closed. –  Henno Brandsma Nov 6 '11 at 9:58

So... $X$ and $Y$ are topological spaces and you want to show that, for any closed subset $S$ of $Y$, $R=f^{-1}(S)$ is a closed subset of $X$.
Hints: obviously, $R=(R\cap A)\cup (R\cap B)$. Furthermore, $R\cap A=g^{-1}(S)$ and $R\cap B=h^{-1}(S)$ for some suitable functions $g$ and $h$. But you will need to define precisely the functions $g$ and $h$, in particular, the spaces $g$ and $h$ are defined on. A last hint: the union of two closed subsets is a closed subset.
Since $A$ and $B$ are closed, wouldn't checking whether inverse image of a closed set is closed give an easier proof? (As suggested in Henno's comment above.) –  Martin Sleziak Nov 6 '11 at 10:09
@Martin: I agree, even if the OP has to prove that characterization of continuity from some other one first. Showing that the open sets in $A$ and $B$ can be pieced together to get an open set in $X$ takes a bit more work. –  Brian M. Scott Nov 6 '11 at 10:17