Showing that a mapping of a topological space into a product space is continuous. Let $(Y,T)$ and $(X_i,T_i)$, $i = 1,...,n$ be topological spaces.  Further for each $i$, let $f_i$ be a mapping of $(Y,T)$ into $(X_i, T_i)$.  Prove that the mapping $f: (Y,T) \rightarrow \prod (X_i,T_i)$, given by $f(y) = <f_1(y), f_2(y), ..., f_n(y)>$ is continuous iff each $f_i$ is continuous.
If $p_i$ is the projection mapping I know that $f_i = p_i \circ f$ is continuous because it is the composition of two continuous functions, but in the other direction I'm not sure if my answer is right.  I say:
Since $f_i = p_i \circ f$ then $p^{-1}_i \circ f_i = p^{-1}_i \circ (p_i \circ f) = f$, which is the composition of two continuous functions.  What I'm confused about is whether or not $p^{-1}_i \circ (p_i \circ f) =(p^{-1}_i \circ p_i) \circ f = f$.
 A: Let $U$ be an open set in $\prod(X_i, T_i)$. We want to show that $f^{-1}(U)$ is open. 
We know that the box topology is finer (i.e. has more open sets) than the product topology. This is because even in the box topology, every projection mapping $p_i$ is continuous, and because the product topology is defined to be the coarsest topology where this holds.
So $U$ is an open set in the box topology as well. Thus $U$ is the union of sets $V$ where each $V$ is the product of open sets $A_1 \times A_2 \times \cdots \times A_n$ ($A_k \in T_k$). Thus we have $$f^{-1}(V) = f_1^{-1}(A_1) \cap \cdots \cap f_n^{-1}(A_n)$$
So $f^{-1}(V)$ is open. Because $f^{-1}(U)$ is the union of those sets for every $V$, $f^{-1}(U)$ is open.
A: I would like to add some information about the categorical point of view of the product topology. What you are asked to prove is essentially the universal property of the product topology. If $X=\prod_i X_i$ and $p_i\colon X\to X_i$ the $i$-th projection, then for every topological space $Y$ and continuous functions $f_i\colon Y\to X_i$ there exists a unique continuous function $f\colon Y\to X$ such that the following diagram commutes:

