# Coproducts in the category of Sets

As with products. Not every category has coproducts. However, $\textsc{Set}$ does. I claim that given two sets $A$ and $B$, their coproduct $A\coprod B$ is the disjoint union of $A$ and $B$. Since coproducts are unique, all we need to do is show that the disjoint union satisfies the properties of a coproduct. So we can let $A\coprod B$ denote the disjoint union, and then verify that it really is the coproduct.

#### Proof:

We have the natural injections $i_A:A\to A\coprod B$ and $i_B:B\to A\coprod B$. Suppose we have a set $C$ and $f_A:A\to C$ and $f_B:B\to C$. Define $g:A\coprod B\to C$ by $g(x)=f_A(x)$ if $x\in\mbox{im}\ i_A$, and $g(x)=f_B(x)$ if $x\in\mbox{im}\ i_B$. Notice that every $x\in A\coprod B$ is in the image of precisely one of the maps $i_A$ and $i_B$, so this map $g$ is well defined. Now we just need to check that the diagram

commutes. I’ll leave that as an exercise.

$\square$