product and co-product in the Category of modules

I want to prove that in the category $\mathcal{M}$ of $R$-modules, the product and co-product of any finite family of objects are isomorphic.

What I tried is that if $A_1,\cdots,A_n$ are objects in $\mathcal{M}$, then $$A=\{(a_1,\cdots, a_n)\colon a_i\in A_i\}$$ with point-wise addition and multiplication by scalars from $R$, gives an object in $\mathcal{M}$. Also, if $\epsilon_i\colon A_i\rightarrow A$ are injections and $p_i:A\rightarrow A_i$ are projections, then the pair $(A,\epsilon_i)$ is a co-product and $(A,p_i)$ is a product of the given objects in $\mathcal{M}$.

Question Is this justification correct?

I mean, is it necessary to prove the assertion by explicitly constructing object $A$ in the category $\mathcal{M}$? What I was worrying here was that whether notions of injections and projections make sense in a category?

• To answer your question as asked: no, your justification is no justification at all so far, because you've done nothing to explain why these maps make your module satisfy the universal properties of the product and the coproduct. – Kevin Carlson Sep 24 '16 at 6:29

All you need to know about the category $\mathcal{M}$ is that it is preadditive; that is, the hom-sets $\hom(A,B)$ are abelian groups and composition is bilinear. In particular, there is a $0$ morphism between any two objects.
I'll show that every product is a coproduct; the other way around is similar. So suppose $p_i \colon A \to A_i (i \in I)$ is a product, where $I$ is a finite index set. For each $i,j\in I$ define $t_{ij} \colon A_j \to A_i$ by $$t_{ij} = \begin{cases} 1_{A_i} & i = j, \\ 0 & i \ne j. \end{cases}$$ By the universal property of product, there is a unique morphism $\epsilon_j \colon A_j \to A$ such that $t_{ij} = p_i \epsilon_j$. Also, note that if $u = \sum_j \epsilon_j p_j$, then $$p_i u = \sum_j p_i \epsilon_j p_j = \sum_j t_{ij} p_j = p_i = p_i 1_A$$ so $u = 1_A$ by uniqueness of the product.
To show that the $\epsilon_i$ give a coproduct: Given any object $B$ and morphisms $f_i \colon A_i \to B$, define $f \colon A \to B$ by $$f = \sum_i f_i p_i.$$ Then for all $j$, $$f \epsilon_j = \sum_i f_i p_i \epsilon_j = \sum_i f_i t_{ij} = f_j.$$ To show uniqueness, if $f' \colon A \to B$ also satisfies $f' \epsilon_j = f_j$, then $$f - f' = (f - f') \sum_j \epsilon_j p_j = \sum_j (f \epsilon_j - f' \epsilon_j) p_j = 0.$$