Products and Coproducts
Let’s consider the Cartesian product of two sets
and
. Classically we think of this as the set of all pairs
with
and
. But we can also characterize it just in terms of functions.
Specifically, comes with two projection functions
and
, defined by
and
. If we take any other set
with functions
and
we can define the function
by
. Then we see that
and
. Further, this function from
to
is the only such function.
Now let’s do away with those nasty elements altogether and draw this diagram:

What does this mean? Well, it’s like the diagram I drew for products of groups. The product of and
is a set
with functions
and
so that for any other set
with functions to
and
there exists a unique arrow to
making the diagram commute. Since we’ve written this definition without ever really referring to elements we can just pick it up and drop it into any other category. Many descriptions of categorical products stop here, but let’s push a bit further.
Let’s consider a category containing (among others) objects
and
. From this we’re going to build a new category. An object of our category will be a diagram that looks like
in
. A morphism from
to
will be a morphism
in
so that
and
.
Now what’s a product in ? It’s a terminal object of this category we’ve constructed! That is, it’s one of these diagrams so that every other diagram has a unique morphism (as defined above) to it. This definition makes sense in any category
, though the category we build from a given pair of objects may not have a terminal object, so a given pair of objects of
may not have a product in
. If every pair of objects of
has a product in
, we say that
“has products”.
So, the existence of Cartesian products of sets shows that has products. Similarly,
has products, as do
,
(groupoids),
(small categories), and pretty much all our familiar categories from algebra.
What about something like a preordered set , considered as a category? What would “product” mean, when written in this language? Well, given elements
and
the product
will have arrows to
and
, so
and
. Also, for any other element
with
and
we have
—
has an arrow to both
and
, so it has an arrow to
. That is,
is a greatest lower bound of
and
, and the category has products if and only if every pair of elements has such a greatest lower bound.
And it gets better. If we consider a category that has products, the product defines a functor
! If we have arrows
and
then I say we’ll have an arrow
. Indeed, if we consider
and
then we’ll get an arrow from
to
. And this construction preserves compositions and identities. For compositions, start with this diagram:

and draw in the induced arrows ,
, and
. Then use the uniqueness part of the universal property to show that the composite of the first two must be the same as the third. Do a similar thing to verify that identities are also preserved.
Finally, we can flip all the arrows in what we’ve said to get the dual notion: coproducts. Use this diagram:

and define the coproduct to be an initial object in a certain category of diagrams. Check that in this property is satisfied by disjoint unions. In
coproducts are free products. In a preorder, coproducts are least upper bounds. And, of course, the coproduct defines a functor from
to
.
There’s a fair bit to digest here, but it’s worth it. The next few ideas are really very similar. Alternatively, you could take this to mean that if you don’t completely get it now there are a few more examples in the pipe that may help.
