# Smoothness of a map to a cartesian product

Let $$M_1$$, $$M_2$$, and N be manifolds of dimensions $$m_1$$, $$m_2$$, and $$n$$ respectively. Prove that a map $$(f_1,f_2)$$: $$N$$ -> $$M_1\times M_2$$ is smooth ($$C^\infty$$) if and only if $$f_i$$: $$N$$ ->$$M_i$$ i=1,2 are both smooth.

Attempted answer in the -> direction:

Let $$p\in N$$ and $$(U,\phi)$$ be a chart around $$p$$ in $$N$$. Let $$(V,\psi)$$ be a chart around of $$(f_1,f_2)(p)$$ in $$M_1\times M_2$$ and $$(V_i,\psi_i)$$ be a chart around of $$f_i(p)$$ in $$M_i$$. We know $$\pi_i \circ \psi \circ (f_1,f_2) \circ \phi^{-1}$$ is smooth because the projection is smooth and by hypothesis $$\psi \circ (f_1,f_2) \circ \phi^{-1}$$ is smooth.

(This is the part that doesn't convince me)

$$\pi_i \circ \psi \circ (f_1,f_2) \circ \phi^{-1} = \psi_i \circ \pi_i \circ (f_1,f_2) \circ \phi^{-1}$$. Therefore, $$\pi_i \circ (f_1,f_2) = f_i$$ is smooth.

I would like to know if this attempted answer in the -> direction is correct and how does the other direction goes.

If the map $$f_1\times f_2:N\to M_1\times M_2$$ is smooth,you just notice that $$f_i=\pi_i\circ (f_1\times f_2)$$ which is smooth since $$\pi_i$$ is smooth.(The composition of smooth map also smooth,you should to know and prove which is easy by definition).
For the other side,if $$f_i$$ are smooth.For each $$p\in N$$ and $$f(p)=(p_1,p_2)\in M_1\times M_2$$,there exists the local coordinate $$(U_1\times U_2,\varphi_1\times \varphi_2)$$ where $$(U_1,\varphi_1)$$ and $$(U_2,\varphi_2)$$ are the local coordinates of $$M_1$$ and $$M_2$$ respectively s.t. $$p_1\in M_1,p_2\in M_2$$ and the local coordinate $$(V,\psi)$$ of $$N$$ s.t. $$p\in V$$.In this local coordinate we have $$\varphi_i\circ f_i\circ \psi^{-1}:\psi(V)\to \varphi_i(U_i)$$ are smooth(you should think how can we take $$V$$ by definition).Then we have $$(\varphi_1\times \varphi_2)\circ (f_1\times f_2)\circ \psi^{-1}:\psi(V)\to \varphi_1\times \varphi_2(U_1\times U_2)$$ s.t. $$(\varphi_1\times \varphi_2)\circ (f_1\times f_2)\circ \psi^{-1}(x)=(\varphi_1\circ {f_1}\circ \psi^{-1}(x),\varphi_2\circ{f_2}\circ\psi^{-1}(x))$$ is smooth.Since for all $$p\in N$$ hold,then the proposion has proved.