# Help with proof of : $F(x)=(f_1(x),f_2(x))$ continuous iff $f_1,f_2$ continuous

First off, I am aware that there are many posts related to this theorem, but I believe my question is sufficiently different to warrant a seperate post.

Here is the problem.

Let $$X,Y$$ and $$Z$$ be metric spaces equipped with the "standard euclidean metric" (i.e. taking the square root of the metric squared and summed). Let $$F: X \to Y \times Z, \ f_1: X \to Y, \ f_2:X \to Z$$. Prove that $$F$$ is continuous iff $$f_1$$ and $$f_2$$ are continuous.

There is a simple proof that relies on $$X,Y$$ and $$Z$$ being metric spaces. However I wanted to find a proof that didn't use any metrics etc. . Here is what I have so far:

Assume $$f_1, f_2$$ are continuous on $$X$$. Let $$O \subset Y \times Z$$ be open. Then, for some indexing set $$I$$, we can write $$O = \cup_{i \in I} (U_i \times V_i)$$, where the $$U_i$$ and $$V_i$$ are open in $$Y$$ and $$Z$$, respectively. Noting that preimages and unions commute we have,

$$F^{-1}(O) = F^{-1}(\cup_{i \in I} (U_i \times V_i)) = \cup_{i \in I} F^{-1}(U_i \times V_i) = \cup_{i \in I} (f_1(U_i) \cap f_2(V_i))$$ , which is open, as the intersection of a finite number of open sets (here two) is open and the arbitrary union of open sets is open. This proves $$F$$ is continuous.

This covers the first direction. But this is where I get stuck with a purely topological argument. Please note that I am fairly new to topology and know practically nothing of product topologies etc. ( this question was asked in my course on metric spaces).

If anyone could help me with this final direction ( in simple terms) that would be great! Many thanks.

I think if we consider $$h : Y \times Z \to Y$$ where $$h(y,z) = y$$, then we can get that $$f_1$$ is continuous because $$f_1 (x) = h(F(x))$$ (the composition of two continuous functions). $$h$$ is continuous, because $$h^{-1} (U) = U \times Z$$ for any open $$U$$ in $$Y$$.
And we can do the same thing for the projection onto $$Z$$.