In category theory, the coproduct, or categorical sum, is a construction which includes as examples the disjoint union of sets and of topological spaces, the free product of groups, and the direct sum of modules and vector spaces. The coproduct of a family of objects is essentially the "least specific" object to which each object in the family admits a morphism. It is the category-theoretic dual notion to the categorical product, which means the definition is the same as the product but with all arrows reversed. Despite this seemingly innocuous change in the name and notation, coproducts can be and typically are dramatically different from products within a given category.
Let
C
X1
X2
C.
X1
X2,
X1\sqcupX2,
X1 ⊕ X2,
X1+X2,
i1:X1\toX1\sqcupX2
i2:X2\toX1\sqcupX2
Y
f1:X1\toY
f2:X2\toY,
f:X1\sqcupX2\toY
f1=f\circi1
f2=f\circi2.
The unique arrow
f
f1\sqcupf2,
f1 ⊕ f2,
f1+f2,
\left[f1,f2\right].
i1
i2
The definition of a coproduct can be extended to an arbitrary family of objects indexed by a set
J.
\left\{Xj:j\inJ\right\}
X
ij:Xj\toX
Y
fj:Xj\toY
f:X\toY
fj=f\circij.
j\inJ
The coproduct
X
\left\{Xj\right\}
\coprodj\inXj
oplusjXj.
Sometimes the morphism
f:X\toY
\coprodjfj
fj
The coproduct in the category of sets is simply the disjoint union with the maps ij being the inclusion maps. Unlike direct products, coproducts in other categories are not all obviously based on the notion for sets, because unions don't behave well with respect to preserving operations (e.g. the union of two groups need not be a group), and so coproducts in different categories can be dramatically different from each other. For example, the coproduct in the category of groups, called the free product, is quite complicated. On the other hand, in the category of abelian groups (and equally for vector spaces), the coproduct, called the direct sum, consists of the elements of the direct product which have only finitely many nonzero terms. (It therefore coincides exactly with the direct product in the case of finitely many factors.)
Given a commutative ring R, the coproduct in the category of commutative R-algebras is the tensor product. In the category of (noncommutative) R-algebras, the coproduct is a quotient of the tensor algebra (see free product of associative algebras).
In the case of topological spaces, coproducts are disjoint unions with their disjoint union topologies. That is, it is a disjoint union of the underlying sets, and the open sets are sets open in each of the spaces, in a rather evident sense. In the category of pointed spaces, fundamental in homotopy theory, the coproduct is the wedge sum (which amounts to joining a collection of spaces with base points at a common base point).
The concept of disjoint union secretly underlies the above examples: the direct sum of abelian groups is the group generated by the "almost" disjoint union (disjoint union of all nonzero elements, together with a common zero), similarly for vector spaces: the space spanned by the "almost" disjoint union; the free product for groups is generated by the set of all letters from a similar "almost disjoint" union where no two elements from different sets are allowed to commute. This pattern holds for any variety in the sense of universal algebra.
The coproduct in the category of Banach spaces with short maps is the sum, which cannot be so easily conceptualized as an "almost disjoint" sum, but does have a unit ball almost-disjointly generated by the unit ball is the cofactors.[1]
The coproduct of a poset category is the join operation.
The coproduct construction given above is actually a special case of a colimit in category theory. The coproduct in a category
C
J
C
\lbraceXj\rbrace
ij:Xj → X
kj:Xj → Y
\lbraceXj\rbrace
f:X → Y
f\circij=kj
j\inJ
As with any universal property, the coproduct can be understood as a universal morphism. Let
\Delta:C → C x C
X
\left(X,X\right)
f:X → Y
\left(f,f\right)
X+Y
C
\Delta
\left(X,Y\right)
C x C
The coproduct indexed by the empty set (that is, an empty coproduct) is the same as an initial object in
C
If
J
J
CJ → C
\lbraceXj\rbrace
\coprodj\inXj
ij
Letting
\operatorname{Hom}C\left(\coprodj\inXj,Y\right)\cong\prodj\in\operatorname{Hom}C(Xj,Y)
(fj)j\in\in\prodj\operatorname{Hom}(Xj,Y)
\coprodj\infj\in\operatorname{Hom}\left(\coprodj\inXj,Y\right).
f
(f\circij)j.
C\operatorname{op}
C
C\operatorname{op}
If
J
J=\lbrace1,\ldots,n\rbrace
X1,\ldots,Xn
X1 ⊕ \ldots ⊕ Xn
X ⊕ (Y ⊕ Z)\cong(X ⊕ Y) ⊕ Z\congX ⊕ Y ⊕ Z
X ⊕ 0\cong0 ⊕ X\congX
X ⊕ Y\congY ⊕ X.
Z
X → Z
Z
X ⊕ Y → Z ⊕ Y
Z
Z ⊕ Y\congY
X ⊕ Y → X
X ⊕ Y → Y
X ⊕ Y → X x Y
If all families of objects indexed by
J
C
CJ → C