Universal property of the product

Just as we can define the empty set by means of a uni­ver­sal prop­erty (like this, in fact), so we can define the gen­eral no­tion of a “product” by refer­ring not to what is in the product, but in­stead to how the product in­ter­acts with other ob­jects.


The mo­ti­vat­ing ex­am­ple here is the product of two sets.

Re­mem­ber, the product of two sets \(A\) and \(B\) con­sists of all or­dered pairs, the first el­e­ment from \(A\) and the sec­ond el­e­ment from \(B\). Cat­e­gory the­ory likes to think about maps in­volv­ing an ob­ject rather than el­e­ments of an ob­ject, though, so we’d like a way of think­ing about the product us­ing only maps.

What maps can we find? Well, there’s an easy way to pro­duce an el­e­ment of \(A\) given an el­e­ment of \(A \times B\): namely, “take the first co­or­di­nate”. Con­cretely, if we are given \((a,b) \in A \times B\), we out­put \(a\). And similarly, we can take the sec­ond co­or­di­nate to get an el­e­ment of \(B\).

So we have two maps, one which we will de­note \(\pi_A: A \times B \to A\), and one de­noted \(\pi_B : A \times B \to B\). noteWe use the Greek let­ter \(\pi\) to stand for the word “pro­jec­tion”, be­cause the op­er­a­tion “take a co­or­di­nate” is of­ten called “pro­jec­tion”.

Now, this is cer­tainly not enough to char­ac­ter­ise the product. For one thing, there is a map from the empty set to ev­ery other set (proof), so if all we knew about the product was that it had a map to \(A\) and a map to \(B\), then we might de­duce that the empty set was a perfectly good product of \(A\) and \(B\). That’s definitely not some­thing we want our defi­ni­tion of “product” to mean: that the empty set is the product of ev­ery pair of sets! So we’re go­ing to have to find some­thing else to add to our pu­ta­tive defi­ni­tion.

What else do we know about the product? To try for a uni­ver­sal prop­erty, we’re go­ing to want to talk about all the maps in­volv­ing the product. It turns out that the cor­rect fact to note is that a map \(f\) from any set \(X\) to \(A \times B\) may be defined ex­actly by the first co­or­di­nate and the sec­ond co­or­di­nate of the re­sult. Con­cretely, if we know \(\pi_A(f(x))\) and \(\pi_B(f(x))\), then we know \(f(x)\): it’s just \(\langle \pi_A(f(x)), \pi_B(f(x)) \rangle\). noteI’ve used \(\langle \text{angled brackets}\rangle\) to in­di­cate the or­dered pair here, just be­cause oth­er­wise there are con­fus­ingly many round brack­ets.

Another way of stat­ing the uni­ver­sal prop­erty of the product is that maps \(h : A \to B \times C\) are nat­u­rally in bi­jec­tion with pairs of maps \(f : A \to B\), \(g : A \to C\). That is, a gen­er­al­ized el­e­ment (of shape \(A\)) of \(B \times C\) is a pair con­sist­ing of a gen­er­al­ized el­e­ment (of the same shape) of \(B\) and a gen­er­al­ized el­e­ment of \(C\); this is the same as the usual de­scrip­tion of the product in sets, but now since we use gen­er­al­ized el­e­ments in­stead of el­e­ments it makes sense in any cat­e­gory. Un­der this cor­re­spon­dence, \(h\) be­ing the iden­tity on \(B \times C\) cor­re­sponds to \(f\) be­ing the pro­jec­tion \(B \times C \to B\) and \(g\) be­ing the pro­jec­tion \(B \times C \to C\). On the other hand, if \(h\) cor­re­sponds to \(f\) and \(g\) via this bi­jec­tion, we have \(h = \langle f, g\rangle\). Nat­u­ral­ity of the iso­mor­phism turns out to im­ply that \(\pi_{B} \langle f, g \rangle = f\) and \(\pi_C \langle f, g \rangle = g\), as well as \(\langle \pi_{B}, \pi_{C} \rangle = \text{id}\).

I think this is pretty good mo­ti­va­tion, but it’s at the cost of in­tro­duc­ing the other ver­sion of the uni­ver­sal prop­erty. There’s a gen­eral yoga of go­ing be­tween a uni­ver­sal prop­erty as in “rep­re­sent­ing or corep­re­sent­ing a func­tor” and a uni­ver­sal prop­erty as in “be­ing an ini­tial or ter­mi­nal ob­ject in some cat­e­gory”, but I don’t know where is a good place to dis­cuss that.

The uni­ver­sal property

From the above, we can ex­tract the fol­low­ing uni­ver­sal prop­erty, which re­ally does define the product (up to iso­mor­phism):

Given ob­jects \(A\) and \(B\), we define the product to be the fol­low­ing col­lec­tion of three ob­jects, if it ex­ists: \($A \times B \\ \pi_A: A \times B \to A \\ \pi_B : A \times B \to B\)$ with the re­quire­ment that for ev­ery ob­ject \(X\) and ev­ery pair of maps \(f_A: X \to A, f_B: X \to B\), there is a unique map \(f: X \to A \times B\) such that \(\pi_A \circ f = f_A\) and \(\pi_B \circ f = f_B\).

If you’re any­thing like me, you’re prob­a­bly a bit lost at this point. Trust me that once you’ve set up the right struc­tures in your mind, the prop­erty is quite sim­ple. At the mo­ment it prob­a­bly feels more like I’ve given you a sen­tence in Swahili, and I’ve just told you it doesn’t mean any­thing difficult.

Cat­e­gory the­ory con­tains 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 prop­erly. noteIn this par­tic­u­lar in­stance, one un­avoid­able an­noy­ance is that the ob­ject \(X\) isn’t re­ally play­ing any in­ter­est­ing role other than “do­main of an ar­bi­trary func­tion”, but we have to in­clude the words “for ev­ery ob­ject \(X\)” be­cause oth­er­wise the defi­ni­tions of \(f_A\) and \(f_B\) don’t make sense. One learns cat­e­gory the­ory by grad­u­ally get­ting used to ex­am­ples and pic­tures; in par­tic­u­lar, the idea of the com­mu­ta­tive di­a­gram is an ex­tremely pow­er­ful tool for im­prov­ing un­der­stand­ing.

The fol­low­ing “com­mu­ta­tive di­a­gram” (re­ally just a pic­ture show­ing the ob­jects in­volved and how they in­ter­act) defines the product.

Product universal property

The dashed ar­row in­di­cates “the pres­ence of all the other ar­rows forces this ar­row to ex­ist uniquely”; and the di­a­gram is said to com­mute, which means that if we fol­low any chain of ar­rows round the di­a­gram, we’ll get the same an­swer. Here, “the di­a­gram com­mutes” noteThat is, “the di­a­gram is a com­mu­ta­tive di­a­gram”. is ex­actly ex­press­ing \(\pi_A \circ f = f_A\) (fol­low­ing one of the tri­an­gles round) and \(\pi_B \circ f = f_B\) (fol­low­ing the other tri­an­gle). And the dashed-ness of the line is ex­actly ex­press­ing the words “there is a unique map \(f: X \to A \times B\)”.

We’ll see sev­eral ex­am­ples now, some re­lated to each other and some not. Hope­fully in work­ing through these, you will pick up what the prop­erty means; and maybe you will start to get a feel for some un­der­ly­ing in­tu­itions.

Ex­am­ple: finite sets

(This dis­cus­sion works just as well in the cat­e­gory of all sets, not just the finite ones, but finite sets are much eas­ier to un­der­stand than gen­eral sets.)

The mo­ti­va­tion above took some prop­er­ties of the set-product, and turned them into a new gen­eral defi­ni­tion. So we should hope that when we take the new gen­eral defi­ni­tion and bring it back into the world of sets, we re­cover the origi­nal set-product we started with. That is in­deed the case.

Let \(A\) and \(B\) be finite sets; we want to see what \(A \otimes B\) noteBe­cause \(\times\) already has a mean­ing in set the­ory, we’ll use \(\otimes\) to dis­t­in­guish this new con­cept. Of course, the aim of this sec­tion is to show that \(\otimes\) is ac­tu­ally the same as our usual \(\times\). is (us­ing the uni­ver­sal-prop­erty defi­ni­tion), if it ex­ists.

Well, it would be the finite set \(A \otimes B\) (what­ever that might be), to­gether with two maps \(\pi_A: A \otimes B \to A\) and \(\pi_B: A \otimes B \to B\), such that:

For ev­ery finite set \(X\) and ev­ery pair of maps \(f_A: X \to A, f_B: X \to B\), there is a unique map \(f: X \to A \otimes B\) such that \(\pi_A \circ f = f_A\) and \(\pi_B \circ f = f_B\).

Let’s try and iden­tify what set this uni­ver­sal prop­erty de­scribes noteIf such a set ex­ists. (Spoiler: it does.). The prop­erty is very gen­eral, talk­ing about the en­tire “uni­verse” of finite sets, so to get a grasp of it, it should help to spe­cial­ise to some sim­ple sets \(X\).

You might like to work out for your­self why let­ting \(X = \emptyset\) doesn’t tell us any­thing about \(A \otimes B\).

But a much more en­light­en­ing choice of \(X\) arises if we take \(X = \{ 1 \}\). In that case, a map from \(X\) to \(A\) is just iden­ti­fy­ing a spe­cific el­e­ment of \(A\), so for ex­am­ple we may re­fer to \(f_A: X \to A\) as a “choice of el­e­ment of \(A\)”. In­deed, if \(g: \{1\} \to A\), then we have an el­e­ment \(g(1)\) in \(A\), be­cause there’s no choice about which el­e­ment of the do­main we use: there’s only the el­e­ment \(1\), so the only pos­si­ble out­put of \(g\) is the el­e­ment \(g(1)\) of \(A\).

Spe­cial­is­ing to this in­stance of \(X\), then, the uni­ver­sal prop­erty re­quires that:

For ev­ery pair of choices of el­e­ment, \(f_A: \{ 1 \} \to A\) and \(f_B : \{ 1 \} \to B\), there is a unique choice of el­e­ment \(f: \{1\} \to A \otimes B\) such that \(\pi_A \circ f = f_A\) and \(\pi_B \circ f = f_B\).

(What does it mean to com­pose a func­tion with a choice of el­e­ment? Well, \(\pi_A \circ f\) is a func­tion from \(\{1\}\) to \(A\), so it’s also just a choice of el­e­ment of \(A\); it’s ba­si­cally just \(\pi_A\) ap­plied to the choice-of-el­e­ment em­bod­ied by \(f\).)

More fa­mil­iarly stated:

For ev­ery pair of el­e­ments \(a \in A\) and \(b \in B\), there is a unique el­e­ment \(x \in A \otimes B\) such that \(\pi_A(x) = a\) and \(\pi_B(x) = b\).

That’s just say­ing “$A \otimes B$ con­sists of ob­jects which \(\pi_A\) and \(\pi_B\) al­low us to in­ter­pret as or­dered pairs”! Speci­fi­cally, it’s say­ing that for ev­ery or­dered pair of ob­jects in \(A \times B\), we can find a unique el­e­ment of \(A \otimes B\) which gets in­ter­preted by \(\pi_A\) and \(\pi_B\) as hav­ing the same com­po­nents as that or­dered pair.

Ex­am­ple: nat­u­ral numbers

To give you an idea of where we’re aiming for, in this sec­tion, we’re go­ing to use the fact that a par­tially or­dered set may be viewed as a cat­e­gory, by let­ting there be a sin­gle ar­row \(a \to b\) if and only if \(a \leq b\) in the poset. That is, in­stead of maps \(f: A \to B\), we have “facts that \(A \leq B\) in the poset” which we in­ter­pret as “ar­rows from \(A\) to \(B\)”; there is only ever at most one fact that \(A \leq B\), so there is only ever at most one ar­row from \(A\) to \(B\).

We’ll ex­am­ine what the cat­e­gory-the­o­retic product means in this cat­e­gory, and hope­fully this should help in­di­cate how ver­sa­tile the “uni­ver­sal prop­erty” idea is.

Spe­cific poset: “less than”

Let us work in a spe­cific poset: \(\mathbb{N}\) the nat­u­ral num­bers, or­dered by the usual “less than”. For ex­am­ple, \(1\) is less than or equal to ev­ery num­ber ex­cept \(0\), so there is an ar­row from \(1\) to ev­ery num­ber ex­cept \(0\). There is an ar­row from \(2\) to ev­ery num­ber big­ger than or equal to \(2\), and so on. There is an ar­row from \(0\) to ev­ery num­ber.

The uni­ver­sal prop­erty of the cat­e­gory-the­o­retic product noteI’ll em­pha­sise “cat­e­gory-the­o­retic” in this sec­tion, be­cause it will turn out that in this con­text, “product” doesn’t mean “usual product of nat­u­ral num­bers”. here is:

Given nat­u­ral num­bers \(m\) and \(n\), we define the cat­e­gory-the­o­retic product \(\otimes\) noteBe­cause \(\times\) already has a mean­ing in the nat­u­rals, we’ll use \(\otimes\) to dis­t­in­guish this new con­cept. to be the fol­low­ing col­lec­tion of three ob­jects, if it ex­ists:

  • \(m \otimes n\)

  • The fact that \(m \otimes n\) is less than or equal to \(m\) noteIn the sets case, this was the map \(\pi_A\); but here, we’re in a poset cat­e­gory, so in­stead of “a func­tion from \(A\) to \(B\)”, we have “the fact that \(A \leq B\)”.

  • The fact that \(m \otimes n\) is less than or equal to \(n\) noteThis is cor­re­spond­ing to what was the map \(\pi_B\)..

We also have the re­quire­ment that for ev­ery nat­u­ral num­ber \(x\) and ev­ery in­stance of the fact that \(x \leq m, x \leq n\) noteSuch an in­stance cor­re­sponds to the pair of maps \(f_A: X \to A\) and \(f_B: X \to B\)., there is a unique in­stance of the fact that \(x \leq m \otimes n\). noteThis cor­re­sponds to the map \(f: X \to A \times B\). In fact we can omit “unique”, be­cause in a poset, there is never more than one ar­row be­tween any two given ob­jects; in this con­text, there is only one way to ex­press \(x \leq m \otimes n\).

You might want to spend a lit­tle time con­vinc­ing your­self that the re­quire­ment in the posets case is the same as the re­quire­ment in the gen­eral cat­e­gory-the­o­retic case. In­deed, we can omit the “com­po­si­tions” part en­tirely. For ex­am­ple, half of the com­po­si­tions part reads “$\piA \circ f = fA$”; when trans­lated into poset lan­guage, that is “the in­stance of the fact that \(m \otimes n \leq m\), to­gether with the in­stance of the fact that \(x \leq m \otimes n\), yields the in­stance of the fact that \(x \leq m\)”. But this is im­me­di­ate any­way be­cause posets already let us de­duce that \(A \leq C\) from \(A \leq B\) and \(B \leq C\).

To sum­marise, then, we define \(m \otimes n\), if it ex­ists, to be the nat­u­ral num­ber which is less than or equal to \(m\) and to \(n\), such that for ev­ery nat­u­ral \(x\) with \(x \leq m, x \leq n\), we have \(x \leq m \otimes n\).

If you think about this for a few min­utes, you might work out that this is just refer­ring to the min­i­mum of \(m\) and \(n\). So we have defined the min­i­mum of two nat­u­ral num­bers in a cat­e­gory-the­o­retic “uni­ver­sal prop­er­ties” way: it’s the cat­e­gory-the­o­retic product in this par­tic­u­lar poset.

No­tice, by the way, that in this case, the cat­e­gory-the­o­retic product (i.e. the min­i­mum) does always ex­ist. Re­mem­ber, the uni­ver­sal prop­erty comes with a caveat: it defines the product to be a cer­tain triple of \((A \times B, \pi_A, \pi_B)\), if those three things ex­ist. It’s by no means a given that the triple always does ex­ist; but in this par­tic­u­lar in­stance, with the nat­u­ral num­bers un­der the “less than” re­la­tion, it so hap­pens that it does always ex­ist. For ev­ery pair \(m, n\) of nat­u­rals, there is a triple \((m \otimes n, \pi_m, \pi_n)\) satis­fy­ing the uni­ver­sal prop­erty: namely, let­ting \(m \otimes n\) be the min­i­mum of \(m\) and \(n\), and let­ting \(\pi_m\) and \(\pi_n\) be “in­stances of the facts that \(m \otimes n \leq m\) and \(m \otimes n \leq n\)” re­spec­tively.

Spe­cific ex­am­ple: divisibility

Let’s now use the poset which is given by the nonzero nat­u­rals \(\mathbb{N}^{\geq 1}\) but us­ing the or­der re­la­tion of di­visi­bil­ity: \(a \mid b\) if and only if \(a\) di­vides \(b\). For ex­am­ple, \(1\) di­vides ev­ery nonzero nat­u­ral so there is an ar­row \(1 \to n\) for ev­ery \(n\); there are ar­rows \(2 \to n\) for ev­ery even pos­i­tive nat­u­ral \(n\), and so on.

We’ll give the product defi­ni­tion again:

Given nat­u­ral num­bers \(m\) and \(n\), we define the cat­e­gory-the­o­retic product \(\otimes\) to be the fol­low­ing col­lec­tion of three ob­jects, if it ex­ists:

  • \(m \otimes n\)

  • The fact that \(m \otimes n\) di­vides \(m\) noteIn the sets case, this was the map \(\pi_A\); but here, we’re in a poset cat­e­gory, so in­stead of “a func­tion from \(A\) to \(B\)”, we have “the fact that \(A \mid B\)”.

  • The fact that \(m \otimes n\) di­vides \(n\).

We also have the re­quire­ment that for ev­ery nat­u­ral num­ber \(x\) such that \(x \mid m, x \mid n\), it is the case that \(x \mid m \otimes n\).

Again, a few min­utes of pon­der­ing might lead you to dis­cover that this is refer­ring to the great­est com­mon di­vi­sor, and again it so hap­pens that it always ex­ists.

Mo­ral things to no­tice about the above examples

Work­ing in a poset, the na­ture of the cat­e­gory-the­o­retic product as some kind of “op­ti­miser” is a bit clearer. It is the “op­ti­mal” ob­ject such that cer­tain con­di­tions hold.

  • In the first ex­am­ple, it is op­ti­mal in the sense that it is the biggest nat­u­ral \(a\) such that \(a \leq m\) and \(a\leq n\).

  • In the sec­ond ex­am­ple, it is op­ti­mal in the sense that it is the nat­u­ral \(a\) with the most fac­tors such that \(a \mid m\) and \(a \mid n\).

In fact this is true in gen­eral posets: the cat­e­gory-the­o­retic product of \(X\) and \(Y\) in a poset is the great­est lower bound of \(X\) and \(Y\) in the poset.

The prop­erty char­ac­ter­ises the product up to isomorphism

This is what makes our new defi­ni­tion re­ally make sense: this the­o­rem tells us that our con­struc­tion re­ally does pick out a spe­cific ob­ject. The proof ap­pears on a differ­ent page; it fol­lows a similar pat­tern to the “maps” way of prov­ing that the empty set is uniquely char­ac­ter­ised by its uni­ver­sal prop­erty.

If we can show that some easy-to-spec­ify prop­erty (such as the uni­ver­sal prop­erty of the product) char­ac­ter­ises things uniquely or up to iso­mor­phism, we can be pretty hope­ful that the prop­erty is worth think­ing more about. While the product’s uni­ver­sal prop­erty is wordy, it has a sim­ple di­a­gram which defines it; the prop­erty it­self is not very com­pli­cated, and the main difficulty is in un­der­stand­ing the back­ground.

Why is the product in­ter­est­ing?

Why should we care about hav­ing this ob­ject defined by the uni­ver­sal prop­erty? Well, if we stop defin­ing things by their in­ter­nal prop­er­ties (for in­stance, if we stop defin­ing the product of sets \(A\) and \(B\) as the col­lec­tion of or­dered pairs) and use a uni­ver­sal prop­erty in­stead, we get a defi­ni­tion which doesn’t care about in­ter­nal prop­er­ties. It’s im­me­di­ately ap­pli­ca­ble to other situ­a­tions. If we make sure that, in prov­ing things about the product, we only use the uni­ver­sal prop­erty (or things that can be de­rived from the uni­ver­sal prop­erty), we’ll in­stantly get the­o­rems that are true not just for set-prod­ucts but also for more gen­eral situ­a­tions. Cat­e­gory the­ory, and its be­gin­nings in the idea of the uni­ver­sal prop­erty, is in some ways the art of find­ing where in math­e­mat­ics we’re just do­ing the same things in a slightly differ­ent way, and see­ing if we can show why they’re ac­tu­ally the same rather than merely look­ing similar.

Ul­ti­mately, this view­point shows us that the fol­low­ing ideas are “ba­si­cally the same” (and it doesn’t mat­ter if you don’t know what some of these mean):

  • Product of nat­u­ral num­bers noteThe eas­iest way to ob­tain this is by in­ter­pret­ing a nat­u­ral num­ber as a cat­e­gory it­self. The product of nat­u­ral num­bers \(m\) and \(n\), in the col­lo­quial sense of “product”, is then given by the product cat­e­gory of the two cat­e­gories rep­re­sent­ing \(m\) and \(n\).

  • Product of sets noteWe showed in this very page that the set product is cap­tured by the cat­e­gory-the­o­retic product.

  • Product of topolog­i­cal spaces

  • Direct product of groups

  • Direct sum of abelian groups

  • Great­est lower bounds in posets noteWe showed two ex­am­ples of this above, look­ing at the min­i­mum and great­est com­mon di­vi­sor of two nat­u­rals.

  • Se­gre em­bed­ding of two pro­jec­tive va­ri­eties, in alge­braic ge­om­e­try. This is an ex­am­ple where the ex­is­tence of the product is de­cid­edly non-triv­ial.

I per­son­ally took alge­braic ge­om­e­try and didn’t un­der­stand a word of it, in­clud­ing about the Se­gre em­bed­ding. The lec­turer didn’t tell me at the time that the Se­gre em­bed­ding is a product, so I just went on think­ing it was in­com­pre­hen­si­ble. But now I know that the Se­gre em­bed­ding is “just” a product. That im­me­di­ately tells me that in some deep moral sense it’s “not too difficult”: even though alge­braic ge­om­e­try is fiendishly hard, the Se­gre em­bed­ding is not at its heart one of the re­ally difficult bits, and if I chose to learn it prop­erly, I wouldn’t need to do too much men­tal gym­nas­tics to un­der­stand it.


  • Product is unique up to isomorphism

    If some­thing satis­fies the uni­ver­sal prop­erty of the product, then it is uniquely speci­fied by that prop­erty, up to iso­mor­phism.


  • Product (Category Theory)

    How a product is char­ac­ter­ized rather than how it’s constructed

  • Universal property

    A uni­ver­sal prop­erty is a way of defin­ing an ob­ject based purely on how it in­ter­acts with other ob­jects, rather than by any in­ter­nal prop­erty of the ob­ject it­self.