As is always the case with category-theoretic constructions, there is a construction exactly dual to that of the direct product of modules, called the direct sum of modules. It is characterized by the property dual to that of direct product. To reflect this duality, this note will be an entirely identical "dual" version of the note for direct products of modules.

Direct sum of two modules

First suppose ${M}_{1}$ and ${M}_{2}$ are two $R$-modules. Let ${M}_{1}\beta \xa8\x81{M}_{2}$ denote the $R$-module whose elements consist of all formal combinations of the form ${m}_{1}+{m}_{2}$, with "component-wise" addition and scaling.^{[1]} We have two "injection" module morphisms ${j}_{i}:{M}_{i}\beta \x86\x92{M}_{1}\beta \xa8\x81{M}_{2}$, which send an element ${m}_{i}\beta \x88\x88{M}_{i}$ to the element ${m}_{1}+{0}_{{M}_{2}}$ (for $i=1)$ or ${0}_{{M}_{1}}+{m}_{2}$ (for $i=2$).

These data satisfy the usual universal property for a coproduct, in that it is universal among all such modules equipped with morphisms from ${M}_{1}$ and ${M}_{2}$. More precisely, for each module $N$ and pair of module morphisms ${f}_{1}:{M}_{1}\beta \x86\x92N$ and ${f}_{2}:{M}_{2}\beta \x86\x92N$ there is a unique module morphism $h:{M}_{1}\beta \xa8\x81{M}_{2}\beta \x86\x92N$ such that the diagram below commutates:

Observe that, as an abelian group, ${M}_{1}\beta \xa8\x81{M}_{2}$ is the usual direct sum (i.e., coproduct) of abelian groups; however, as a set, ${M}_{1}\beta \xa8\x81{M}_{2}$ is not (bijective to) the usual disjoint union (i.e., coproduct) of sets.^{[2]}

Direct sum of a finite collection of modules

Analogous to the above construction, for any finite collection of $R$-modules ${M}_{1},\beta \x80\xa6,{M}_{n}$ their direct sum is an $R$-module, denoted $\underset{i=i}{\overset{n}{\beta \xa8\x81}}{M}_{i}$, together with module morphisms $j}_{i}:{M}_{i}\beta \x86\x92\underset{i=1}{\overset{n}{\beta \xa8\x81}}{M}_{i$, universal among all such data. As an abelian group, this is the usual direct sum of the corresponding abelian groups, with elements consisting of all formal sums of the form $\underset{i=1}{\overset{n}{\beta \x88\x91}}{m}_{i}$ with ${m}_{i}\beta \x88\x88{M}_{i}$. The additive structure is defined "component-wise", as is the action of $R$.

The universal property is encoded in the commutative diagram below:

Direct sum of an arbitrary family of modules

Finally, suppose $\{{M}_{s}\beta \x88\pounds s\beta \x88\x88S\}$ is a family of $R$-modules indexed by some set $S$. Following the pattern we've established, the direct sum of this family is an $R$-module, denoted $\underset{s\beta \x88\x88S}{\beta \xa8\x81}{M}_{s}$, together with module morphisms $j}_{t}:{M}_{t}\beta \x86\x92\underset{s\beta \x88\x88S}{\beta \xa8\x81}{M}_{s$ for every $t\beta \x88\x88S$, universal among all such data. As an abelian group, this is the usual direct sum of the corresponding abelian groups.

The only difference here between this general case (which includes infinite sets) and the finite case is that the elements of the set $\underset{s\beta \x88\x88S}{\beta \xa8\x81}{M}_{s}$ are finite formal sums of elements of the form $\underset{s\beta \x88\x88S}{\beta \x88\x91}{m}_{s}$, with ${m}_{s}\beta \x88\x88S$ (all but finitely many zero).