Just as we can define the empty set by means of a universal property (like this, in fact), so we can define the general notion of a "product" by referring not to what is in the product, but instead to how the product interacts with other objects.
The motivating example here is the product of two sets.
Remember, the product of two sets and consists of all ordered pairs, the first element from and the second element from . Category theory likes to think about maps involving an object rather than elements of an object, though, so we'd like a way of thinking about the product using only maps.
What maps can we find? Well, there's an easy way to produce an element of given an element of : namely, "take the first coordinate". Concretely, if we are given , we output . And similarly, we can take the second coordinate to get an element of .
So we have two maps, one which we will denote , and one denoted . [1]
Now, this is certainly not enough to characterise the product. For one thing, there is a map from the empty set to every other set (proof), so if all we knew about the product was that it had a map to and a map to , then we might deduce that the empty set was a perfectly good product of and . That's definitely not something we want our definition of "product" to mean: that the empty set is the product of every pair of sets! So we're going to have to find something else to add to our putative definition.
What else do we know about the product? To try for a universal property, we're going to want to talk about all the maps involving the product. It turns out that the correct fact to note is that a map from any set to may be defined exactly by the first coordinate and the second coordinate of the result. Concretely, if we know and , then we know : it's just . [2]
Another way of stating the universal property of the product is that maps are naturally in bijection with pairs of maps , . That is, a generalized element (of shape ) of is a pair consisting of a generalized element (of the same shape) of and a generalized element of ; this is the same as the usual description of the product in sets, but now since we use generalized elements instead of elements it makes sense in any category. Under this correspondence, being the identity on corresponds to being the projection and being the projection . On the other hand, if corresponds to and via this bijection, we have . Naturality of the isomorphism turns out to imply that and , as well as .
From the above, we can extract the following universal property, which really does define the product (up to isomorphism):
Given objects and , we define the product to be the following collection of three objects, if it exists: with the requirement that for every object and every pair of maps , there is a unique map such that and .
If you're anything like me, you're probably a bit lost at this point. Trust me that once you've set up the right structures in your mind, the property is quite simple. At the moment it probably feels more like I've given you a sentence in Swahili, and I've just told you it doesn't mean anything difficult.
Category theory contains lots of things like this, where it takes a lot of words to write them out and some time to get your head around them properly. [3] One learns category theory by gradually getting used to examples and pictures; in particular, the idea of the commutative diagram is an extremely powerful tool for improving understanding.
The following "commutative diagram" (really just a picture showing the objects involved and how they interact) defines the product.
The dashed arrow indicates "the presence of all the other arrows forces this arrow to exist uniquely"; and the diagram is said to commute, which means that if we follow any chain of arrows round the diagram, we'll get the same answer. Here, "the diagram commutes" [4] is exactly expressing (following one of the triangles round) and (following the other triangle). And the dashed-ness of the line is exactly expressing the words "there is a unique map ".
We'll see several examples now, some related to each other and some not. Hopefully in working through these, you will pick up what the property means; and maybe you will start to get a feel for some underlying intuitions.
(This discussion works just as well in the category of all sets, not just the finite ones, but finite sets are much easier to understand than general sets.)
The motivation above took some properties of the set-product, and turned them into a new general definition. So we should hope that when we take the new general definition and bring it back into the world of sets, we recover the original set-product we started with. That is indeed the case.
Let and be finite sets; we want to see what [5] is (using the universal-property definition), if it exists.
Well, it would be the finite set (whatever that might be), together with two maps and , such that:
For every finite set and every pair of maps , there is a unique map such that and .
Let's try and identify what set this universal property describes [6]. The property is very general, talking about the entire "universe" of finite sets, so to get a grasp of it, it should help to specialise to some simple sets .
You might like to work out for yourself why letting doesn't tell us anything about .
But a much more enlightening choice of arises if we take . In that case, a map from to is just identifying a specific element of , so for example we may refer to as a "choice of element of ". Indeed, if , then we have an element in , because there's no choice about which element of the domain we use: there's only the element , so the only possible output of is the element of .
Specialising to this instance of , then, the universal property requires that:
For every pair of choices of element, and , there is a unique choice of element such that and .
(What does it mean to compose a function with a choice of element? Well, is a function from to , so it's also just a choice of element of ; it's basically just applied to the choice-of-element embodied by .)
More familiarly stated:
For every pair of elements and , there is a unique element such that and .
That's just saying " consists of objects which and allow us to interpret as ordered pairs"! Specifically, it's saying that for every ordered pair of objects in , we can find a unique element of which gets interpreted by and as having the same components as that ordered pair.
To give you an idea of where we're aiming for, in this section, we're going to use the fact that a partially ordered set may be viewed as a category, by letting there be a single arrow if and only if in the poset. That is, instead of maps , we have "facts that in the poset" which we interpret as "arrows from to "; there is only ever at most one fact that , so there is only ever at most one arrow from to .
We'll examine what the category-theoretic product means in this category, and hopefully this should help indicate how versatile the "universal property" idea is.
Let us work in a specific poset: the natural numbers, ordered by the usual "less than". For example, is less than or equal to every number except , so there is an arrow from to every number except . There is an arrow from to every number bigger than or equal to , and so on. There is an arrow from to every number.
The universal property of the category-theoretic product [7] here is:
Given natural numbers and , we define the category-theoretic product [8] to be the following collection of three objects, if it exists:
We also have the requirement that for every natural number and every instance of the fact that [11], there is a unique instance of the fact that . [12]
You might want to spend a little time convincing yourself that the requirement in the posets case is the same as the requirement in the general category-theoretic case. Indeed, we can omit the "compositions" part entirely. For example, half of the compositions part reads ""; when translated into poset language, that is "the instance of the fact that , together with the instance of the fact that , yields the instance of the fact that ". But this is immediate anyway because posets already let us deduce that from and .
To summarise, then, we define , if it exists, to be the natural number which is less than or equal to and to , such that for every natural with , we have .
If you think about this for a few minutes, you might work out that this is just referring to the minimum of and . So we have defined the minimum of two natural numbers in a category-theoretic "universal properties" way: it's the category-theoretic product in this particular poset.
Notice, by the way, that in this case, the category-theoretic product (i.e. the minimum) does always exist. Remember, the universal property comes with a caveat: it defines the product to be a certain triple of , if those three things exist. It's by no means a given that the triple always does exist; but in this particular instance, with the natural numbers under the "less than" relation, it so happens that it does always exist. For every pair of naturals, there is a triple satisfying the universal property: namely, letting be the minimum of and , and letting and be "instances of the facts that and " respectively.
Let's now use the poset which is given by the nonzero naturals but using the order relation of divisibility: if and only if divides . For example, divides every nonzero natural so there is an arrow for every ; there are arrows for every even positive natural , and so on.
We'll give the product definition again:
Given natural numbers and , we define the category-theoretic product to be the following collection of three objects, if it exists:
- The fact that divides [13]
- The fact that divides .
We also have the requirement that for every natural number such that , it is the case that .
Again, a few minutes of pondering might lead you to discover that this is referring to the greatest common divisor, and again it so happens that it always exists.
Working in a poset, the nature of the category-theoretic product as some kind of "optimiser" is a bit clearer. It is the "optimal" object such that certain conditions hold.
In fact this is true in general posets: the category-theoretic product of and in a poset is the greatest_lower_bound of and in the poset.
This is what makes our new definition really make sense: this theorem tells us that our construction really does pick out a specific object. The proof appears on a different page; it follows a similar pattern to the "maps" way of proving that the empty set is uniquely characterised by its universal property.
If we can show that some easy-to-specify property (such as the universal property of the product) characterises things uniquely or up to isomorphism, we can be pretty hopeful that the property is worth thinking more about. While the product's universal property is wordy, it has a simple diagram which defines it; the property itself is not very complicated, and the main difficulty is in understanding the background.
Why should we care about having this object defined by the universal property? Well, if we stop defining things by their internal properties (for instance, if we stop defining the product of sets and as the collection of ordered pairs) and use a universal property instead, we get a definition which doesn't care about internal properties. It's immediately applicable to other situations. If we make sure that, in proving things about the product, we only use the universal property (or things that can be derived from the universal property), we'll instantly get theorems that are true not just for set-products but also for more general situations. Category theory, and its beginnings in the idea of the universal property, is in some ways the art of finding where in mathematics we're just doing the same things in a slightly different way, and seeing if we can show why they're actually the same rather than merely looking similar.
Ultimately, this viewpoint shows us that the following ideas are "basically the same" (and it doesn't matter if you don't know what some of these mean):
I personally took algebraic geometry and didn't understand a word of it, including about the Segre embedding. The lecturer didn't tell me at the time that the Segre embedding is a product, so I just went on thinking it was incomprehensible. But now I know that the Segre embedding is "just" a product. That immediately tells me that in some deep moral sense it's "not too difficult": even though algebraic geometry is fiendishly hard, the Segre embedding is not at its heart one of the really difficult bits, and if I chose to learn it properly, I wouldn't need to do too much mental gymnastics to understand it.
We use the Greek letter to stand for the word "projection", because the operation "take a coordinate" is often called "projection".
I've used to indicate the ordered pair here, just because otherwise there are confusingly many round brackets.
In this particular instance, one unavoidable annoyance is that the object isn't really playing any interesting role other than "domain of an arbitrary function", but we have to include the words "for every object " because otherwise the definitions of and don't make sense.
That is, "the diagram is a commutative diagram".
Because already has a meaning in set theory, we'll use to distinguish this new concept. Of course, the aim of this section is to show that is actually the same as our usual .
If such a set exists. (Spoiler: it does.)
I'll emphasise "category-theoretic" in this section, because it will turn out that in this context, "product" doesn't mean "usual product of natural numbers".
Because already has a meaning in the naturals, we'll use to distinguish this new concept.
In the sets case, this was the map ; but here, we're in a poset category, so instead of "a function from to ", we have "the fact that ".
This is corresponding to what was the map .
Such an instance corresponds to the pair of maps and .
This corresponds to the map . In fact we can omit "unique", because in a poset, there is never more than one arrow between any two given objects; in this context, there is only one way to express .
In the sets case, this was the map ; but here, we're in a poset category, so instead of "a function from to ", we have "the fact that ".
The easiest way to obtain this is by interpreting a natural number as a category itself. The product of natural numbers and , in the colloquial sense of "product", is then given by the product_category of the two categories representing and .
We showed in this very page that the set product is captured by the category-theoretic product.
We showed two examples of this above, looking at the minimum and greatest common divisor of two naturals.