continuity of a function $f = (f_1,f_2)$ in a product topology if $f_1$ and $f_2$ are continous

Say $X$, $Y_1$ and $Y_2$ are topological spaces. Let $f_1 \; X \to Y_1$ and $f_2 \; X \to Y_2$.

If $f\; X \to Y_1 \times Y_2$ $f(x) = (f_1(x), f_2(x))$

$Y_1 \times Y_2$ is a topological space with the product topology.

How do I prove that $f$ is continuous in $x$ if and only if $f_1$ and $f_2$ are continuous in $x$ ?

Hints: (1) If $f$ is continuous, note that the projections $\pi_i \colon Y_1\times Y_2 \to Y_i$ are continuous.
(2) If the $f_i$ are continuous, note that the sets $U_1 \times U_2$, where $U_i\subseteq Y_i$ are open, form a base of the product topology. What is $f^{-1}[U_1 \times U_2]$?
• $x \in f^{-1}[U_1 \times U_2] \iff f(x) \in U_1 \times U_2 \iff f_1(x) \in U_1 \land f_2(x) \in U_2$. Does this help? Jun 11 '14 at 7:04
• I don't know does that mean that $x \in f_1^{-1}(U_1) \cap f_2^{-1}(U_2)$ ? Jun 11 '14 at 7:13
• Yes, it does, so $f^{-1}[U_1 \times U_2] = f_1^{-1}[U_1]\cap f_2^{-1}[U_2]$. Jun 11 '14 at 7:53