Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: learning: questions

Topic: AxB vs BxA


view this post on Zulip Stephane Bersier (Jun 09 2025 at 13:16):

When I look at the definition of a categorical product, it seems fully symmetric—so much so that I’ve always thought of A × B and B × A as just two notations for the same object, like writing 3 vs III, or {1, 2} vs {2, 1}.

But I was just rewatching @Steve Awodey’s great lectures on category theory, specifically lecture 2, where he says:

Then, we can always make a product of two objects A and B like this (A × B), and we can make a product of two objects like this (B × A), the other way around. And now it's easy to show that these two objects are always going to be isomorphic.

This really threw me off. I thought you could always just replace B × A with A × B in any statement about products—so the idea of proving they're isomorphic (as if they're different) sounds nonsensical to me. Isn’t that like proving A × B is isomorphic to A × B? What am I missing?

view this post on Zulip Ralph Sarkis (Jun 09 2025 at 13:39):

The notation A×BA \times B only defines an object up to isomorphism, so saying that A×BA \times B and B×AB \times A are the same object is correct only because you consider them up to isomorphism. Their definition do not coincide exactly, although they are fully symmetric.

Consider the Cartesian product in Set\mathbf{Set}. If you give a specific construction for the product of AA and BB, say A×CartB={(a,b)aA,bB}A \times_{\text{Cart}} B = \{(a,b) \mid a \in A, b \in B\}, then you clearly don't have that A×CartBA \times_{\text{Cart}} B and B×CartAB \times_{\text{Cart}} A are the same set (even though the definitions are fully symmetric). However, they both represent the categorical product A×BA\times B, as you can show by coming up with the evident projections.

view this post on Zulip Morgan Rogers (he/him) (Jun 09 2025 at 13:45):

Consider in particular the case A×AA \times A. The two maps to AA are clearly different, respectively mapping (a1,a2)(a_1,a_2) to a1a_1 and a2a_2. Swapping them yields a non-trivial isomorphism A×AA×AA \times A \to A \times A, sending (a1,a2)(a_1,a_2) to (a2,a1)(a_2,a_1).

view this post on Zulip সায়ন্তন রায় (Jun 09 2025 at 13:48):

The idea of replacing one object in place of the other and has nothing to do with the objects being isomorphic. Strictly speaking, the objects A×BA\times B and B×AB\times A (in the category of sets for example) are different. So, it does make sense to ask whether there exists a bijection between them.

view this post on Zulip Alex Kreitzberg (Jun 09 2025 at 14:58):

This attempt at an answer is half for my benefit.

I've been understanding this stuff as a higher dimensional analog to equations. I wouldn't mind feedback on this interpretation from the pros.

Syntactically 1/21/2 and 2/42/4 are different in terms of what's actually written down, but after removing common factors from 2/42/4 via a definite process, we can certify they're "equal".

Determining whether a×b=b×aa\times b = b\times a imo, is very similar.

Here, they either are or aren't equal, there are two possibilities. The trick of replacing any occurrence of one with the other, is only possible after we've established their equality.

With unique isomorphisms the situation is very similar. You have two widgets that are different syntactically, but you believe they are "the same". However, your job here is harder, because before you've proven anything - there can be lots of different sorts of arrows between two objects. Unlike equality, there are more than two possible situations.

When you've finally established that there is exactly one arrow, then you can replace A×BA \times B by B×AB \times A in an expression. There's no ambiguity because implicitly it's clear you applied the one unique isomorphism between the two gadgets.

Without this computation, the reader should expect to be given a morphism to know what to do.

I guess my follow up question for pros: I'm interpreting this question as conflating "definitional equality" with "whatever the notion of arrow your category uses", is that right?

Edit: Instead of unique isomorphisms, Baez has helped me see I should say they're the same up to unique natural isomorphism.

view this post on Zulip John Baez (Jun 09 2025 at 15:20):

When you've finally established that there is exactly one arrow, then you can replace A×BA \times B by B×AB \times A in an expression. There's no ambiguity because implicitly it's clear you applied the one unique isomorphism between the two gadgets.

That will work when it works, but usually there is not just one isomorphism between A×BA \times B and B×AB \times A. For example if AA and BB are sets with 5 elements there are 15511210043330985984000000 isomorphisms between A×BA \times B and B×AB \times A.

So, a more common situation is that you pick an isomorphism between A×BA \times B and B×AB \times A. This then gives a way to replace any commutative diagram (or other expression) involving A×BA \times B with one involving B×AB \times A.

More generally: given two objects xx and yy in a category, if you choose an isomorphism f:xyf : x \stackrel{\sim} y you can replace xx with yy in anything you've been doing with xx.

view this post on Zulip Alex Kreitzberg (Jun 09 2025 at 15:45):

In the proof that there is one product up to unique isomorphism, can't you think of the product as a natural isomorphism between A×BA\times B and B×AB \times A, with AA and BB varying over the objects in CC? So therefore when we say "there's only one" we mean there's just one converting isomorphism?

So in Set it would be the map (a,b)(b,a)(a, b) \mapsto (b, a)?

Or am I glossing over a key subtlety still?

edit: For future readers, I should've said "Unique up to natural isomorphism"

view this post on Zulip Stephane Bersier (Jun 09 2025 at 15:48):

Whoa, that's a lot of answers. Thank you! Before I address aspects of some of them, I want to share my current understanding.

The product has two projections, and they need to be labeled (e.g. left & right, or 1 & 2), otherwise, as the case A×AA \times A makes plain, we don't know which map to follow. This is what distinguishes the two versions.

view this post on Zulip John Baez (Jun 09 2025 at 15:52):

Alex Kreitzberg said:

In the proof that there is one product up to unique isomorphism, can't you think of the product as a natural isomorphism between A×BA\times B and B×AB \times A, with AA and BB varying over the objects in CC? So therefore when we say "there's only one" we mean there's just one converting isomorphism?

Yes, there is just one natural isomorphism from the functor

F:Set×SetSet F: \mathsf{Set} \times \mathsf{Set} \to \mathsf{Set}

with

F(A,B)=A×B F(A,B) = A \times B

to the functor

G:Set×SetSet G: \mathsf{Set} \times \mathsf{Set} \to \mathsf{Set}

with

G(A,B)=B×A G(A,B) = B \times A

It is fun to actually prove this!

view this post on Zulip Stephane Bersier (Jun 09 2025 at 15:53):

Ralph Sarkis said:

Consider the Cartesian product in Set\mathbf{Set}. If you give a specific construction for the product of AA and BB, say A×CartB={(a,b)aA,bB}A \times_{\text{Cart}} B = \{(a,b) \mid a \in A, b \in B\}, then you clearly don't have that A×CartBA \times_{\text{Cart}} B and B×CartAB \times_{\text{Cart}} A are the same set (even though the definitions are fully symmetric). However, they both represent the categorical product A×BA\times B, as you can show by coming up with the evident projections.

The cartesian product for sets is not defined up to isomorphism, so it corresponds only to one particular instance of the categorical product. That is why it is asymmetric. But that asymmetry does not have to translate to the categorical product. In fact, there is no reason to associate A×CartBA \times_{\text{Cart}} B more closely with A×BA \times B than with B×CartAB \times_{\text{Cart}} A.

view this post on Zulip John Baez (Jun 09 2025 at 15:54):

The cartesian product for sets is not defined up to isomorphism,

What does that mean, and why is it true?

view this post on Zulip Stephane Bersier (Jun 09 2025 at 15:57):

Morgan Rogers (he/him) said:

Consider in particular the case A×AA \times A. The two maps to AA are clearly different, respectively mapping (a1,a2)(a_1,a_2) to a1a_1 and a2a_2. Swapping them yields a non-trivial isomorphism A×AA×AA \times A \to A \times A, sending (a1,a2)(a_1,a_2) to (a2,a1)(a_2,a_1).

What does (a1,a2)(a_1,a_2) stand for in category theory? Generalized elements (i.e. morphisms from a terminal object) of the product?

view this post on Zulip James Deikun (Jun 09 2025 at 16:00):

There are two meanings, one of them is global elements of the product, but there's also the meaning of "ordered pair of elements of AA". What (a1,a2)(a_1,a_2) exactly stands for in that sense depends on what foundations and surrounding conventions you're using.

view this post on Zulip Stephane Bersier (Jun 09 2025 at 16:00):

John Baez said:

The cartesian product for sets is not defined up to isomorphism,

What does that mean, and why is it true?

{(a,b)aA,bB}\{(a,b) \mid a \in A, b \in B\} is not necessarily the same set as {(b,a)aA,bB}\{(b,a) \mid a \in A, b \in B\}, no? But they are isomorphic.

view this post on Zulip Stephane Bersier (Jun 09 2025 at 16:05):

সায়ন্তন রায় said:

The idea of replacing one object in place of the other and has nothing to do with the objects being isomorphic. Strictly speaking, the objects A×BA\times B and B×AB\times A (in the category of sets for example) are different. So, it does make sense to ask whether there exists a bijection between them.

I think the objects are defined in exactly the same way, but the definition for the full product is order-dependent, because a product is not just an object, but also two labeled projections.

view this post on Zulip James Deikun (Jun 09 2025 at 16:06):

If you're using ZFC + Global Choice, or if you're using ZFC and secretly working over a skeleton of the category of sets, you can actually arrange a product functor so that A×B=B×AA \times B = B \times A as sets, by always making the element of the smaller set in the global ordering on sets/cardinals go first. So you can't absolutely say they are different objects either, only that they are not necessarily the same, other than up to isomorphism.

view this post on Zulip John Baez (Jun 09 2025 at 16:07):

Stephane Bersier said:

John Baez said:

The cartesian product for sets is not defined up to isomorphism,

What does that mean, and why is it true?

{(a,b)aA,bB}\{(a,b) \mid a \in A, b \in B\} is not necessarily the same set as {(b,a)aA,bB}\{(b,a) \mid a \in A, b \in B\}, no? But they are isomorphic.

They are isomorphic, so we say they are the same up to isomorphism. But you said something is not defined up to isomorphism. Usually we say the cartesian product of sets is defined up to isomorphism. (In fact it's even better than that, but at the very least it's that.) You didn't give an example of how the cartesian product of sets is not defined up to isomorphism - at least, not in my use of those words.

view this post on Zulip Stephane Bersier (Jun 09 2025 at 16:10):

John Baez said:

Stephane Bersier said:

John Baez said:

The cartesian product for sets is not defined up to isomorphism,

What does that mean, and why is it true?

{(a,b)aA,bB}\{(a,b) \mid a \in A, b \in B\} is not necessarily the same set as {(b,a)aA,bB}\{(b,a) \mid a \in A, b \in B\}, no? But they are isomorphic.

They are isomorphic, so we say they are the same up to isomorphism. But you said something is not defined up to isomorphism. Usually we say the cartesian product of sets is defined up to isomorphism. (In fact it's even better than that, but at the very least it's that.)

That makes sense. I was answering in the context of

Ralph Sarkis said:

then you clearly don't have that A×CartBA \times_{\text{Cart}} B and B×CartAB \times_{\text{Cart}} A are the same set (even though the definitions are fully symmetric).

See also Wikipedia's definition, where the cartesian product of sets is not defined up to isomorphism.

view this post on Zulip John Baez (Jun 09 2025 at 16:14):

Okay. I'd say they're not equal, given your definition earlier of ×Cart\times_{\text{Cart}}. I'd say they're the same up to natural isomorphism.

view this post on Zulip সায়ন্তন রায় (Jun 10 2025 at 02:58):

@James Deikun Indeed. I should have said "Strictly speaking, the objects A×BA\times B and B×AB\times A (in the category of sets for example) are, in general different."

view this post on Zulip Stephane Bersier (Jun 10 2025 at 12:24):

সায়ন্তন রায় said:

James Deikun Indeed. I should have said "Strictly speaking, the objects A×BA\times B and B×AB\times A (in the category of sets for example) are, in general different."

How are (the definitions for) the objects themselves different? Also, doesn't A×BA\times B refer to many objects, all isomorphic? And B×AB\times A refer to exactly the same objects, by definition?

Below is a (hopefully correct) definition of the categorical product. The only asymmetry I see is the assignement of different labels to the projections.

Let C\mathcal{C} be a category, and let A,BOb(C)A, B \in \text{Ob}(\mathcal{C}). A product of AA and BB is an object POb(C)P \in \text{Ob}(\mathcal{C}), together with morphisms

π1:PAandπ2:PB\pi_1 : P \to A \quad \text{and} \quad \pi_2 : P \to B

satisfying the following universal property:

For every object XOb(C)X \in \text{Ob}(\mathcal{C}), and every pair of morphisms

f:XA,g:XBf : X \to A, \quad g : X \to B,

there exists a unique morphism

f,g:XP\langle f, g \rangle : X \to P

such that

π1f,g=fandπ2f,g=g\pi_1 \circ \langle f, g \rangle = f \quad \text{and} \quad \pi_2 \circ \langle f, g \rangle = g.

view this post on Zulip সায়ন্তন রায় (Jun 10 2025 at 13:37):

@Stephane Bersier I am not sure what you mean. But usually for any sets XX and YY, X×YX\times Y is defined to be the set {(x,y):xX,yY}\{(x,y):x\in X, y\in Y\}. According to this definition A×BA\times B and B×AB\times A are in general not equal.

view this post on Zulip Stephane Bersier (Jun 10 2025 at 14:07):

সায়ন্তন রায় said:

Stephane Bersier I am not sure what you mean. But usually for any sets XX and YY, X×YX\times Y is defined to be the set {(x,y):xX,yY}\{(x,y):x\in X, y\in Y\}. According to this definition A×BA\times B and B×AB\times A are in general not equal.

Yes! The cartesian product for sets, as typically defined in set theory, is order-dependent. But the categorical product is different (see the definition in my previous post), and, in Set\mathbf{Set}, there is no reason to preferentially associate the object {(x,y):xX,yY}\{(x,y):x\in X, y\in Y\} with X×YX\times Y rather than the set {(y,x):xX,yY}\{(y, x):x\in X, y\in Y\}. Both are equally valid X×YX\times Y product objects, with neither following less directly from the definition than the other.

Now, of course, if we decide to pick a representing object, then the natural convention might be to associate {(x,y):xX,yY}\{(x,y):x\in X, y\in Y\} with X×YX\times Y and {(y,x):xX,yY}\{(y,x):x\in X, y\in Y\} with Y×XY\times X. But this is just a convention, completely separate from the math. The category-theoretic definition, due to being fully abstract, has no such preference.

Note also that the categorical product is more than just an object, contrarily to the set-theoretical product. And I still think that is where the actual distinction between X×YX\times Y and Y×XY\times X comes from. If {(y,x):xX,yY}\{(y,x):x\in X, y\in Y\} is chosen as the representative object for X×YX\times Y, then π1\pi_1 has to pick the second coordinate of each pair, which is less natural, but only in terms of human notation.

view this post on Zulip Ralph Sarkis (Jun 10 2025 at 14:16):

Your definition above is also 'order-dependent'. The data of the product contains the ordered tuple (π1,π2)(\pi_1,\pi_2). Swapping the order yields the definition of Y×XY \times X, so strictly speaking, you have two different definitions.

You can definitely come up with a definition that does not care about the order, and I bet it would look very similar to the arbitrary (not necessarily binary) product instantiated for two elements. At that point I would agree with you that saying the product ΠiIAi\Pi_{i \in I} A_i is commutative (or associative) makes no sense because this is inherent to the definition that uses an indexing unordered set II.

view this post on Zulip Stephane Bersier (Jun 10 2025 at 14:22):

Ralph Sarkis said:

Your definition above is also 'order-dependent'. The data of the product contains the ordered tuple (π1,π2)(\pi_1,\pi_2). Swapping the order yields the definition of Y×XY \times X, so strictly speaking, you have two different definitions.

Yes. But it's order-dependent only in the projection labels (and a product object doesn't "see" these labels). That's the part I was missing when I started this thread. But thanks to @Morgan Rogers (he/him) 's answer, I realized the importance of the labels.

view this post on Zulip Ralph Sarkis (Jun 10 2025 at 14:43):

So X×YX \times Y represents any object OO that can be equipped with the tuple (π1:OX,π2:OY)(\pi_1:O \to X, \pi_2:O \to Y) that satisfies the universal property while Y×XY \times X represents any object that can be equipped with the tuple (π1:OY,π2:OX)(\pi_1: O \to Y, \pi_2: O \to X) that satisfies the universal property.

Showing that X×YY×XX \times Y \cong Y \times X then amounts to constructing an isomorphism between any two objects represented by X×YX \times Y and Y×XY \times X respectively. One usually shows this by proving that if OO can be equipped with a tuple satisfying the universal property of X×YX \times Y, then it can also be equipped with a tuple satisfying the universal property of Y×XY \times X, then relying on the fact that a universal property defines an object up to isomorphism.

view this post on Zulip Stephane Bersier (Jun 10 2025 at 15:23):

  1. X×YX \times Y represents any object OO that can be equipped with the tuple (π1:OX,π2:OY)(\pi_1:O \to X, \pi_2:O \to Y) that satisfies the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with the tuple (π1:OY,π2:OX)(\pi_1: O \to Y, \pi_2: O \to X) that satisfies the universal property.

Those two definitions are exactly the same, since neither order in the tuples nor the projection names are relevant to the definition of the object, and the universal property is symmetric. If you translated these into some "abstract syntax" of mathematics, they would be indistinguishable.

Let's rewrite each definition step-by-step. First, let's replace the tuples by conjunctions:

  1. X×YX \times Y represents any object OO that can be equipped with two morphisms, π1:OX\pi_1:O \to X and π2:OY\pi_2:O \to Y, that satisfy the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with two morphisms, π1:OY\pi_1:O \to Y and π2:OX\pi_2:O \to X, that satisfy the universal property.

Now, by "alpha equivalence", we can rename the morphisms in the definition:

  1. X×YX \times Y represents any object OO that can be equipped with two morphisms, π1:OX\pi_1:O \to X and π2:OY\pi_2:O \to Y, that satisfy the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with two morphisms, π2:OY\pi_2:O \to Y and π1:OX\pi_1:O \to X, that satisfy the universal property.

By commutativity of "and", we can rewrite them as

  1. X×YX \times Y represents any object OO that can be equipped with two morphisms, π1:OX\pi_1:O \to X and π2:OY\pi_2:O \to Y, that satisfy the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with two morphisms, π1:OX\pi_1:O \to X and π2:OY\pi_2:O \to Y, that satisfy the universal property.

And now we can see they are really the same definition. We don't need any categorical arguments to come to this conclusion. But again, I do not think that X×YX \times Y is the same as Y×XY \times X, because a product is not just an object, but also two labeled projections.

view this post on Zulip Morgan Rogers (he/him) (Jun 10 2025 at 16:38):

@Stephane Bersier I'm not quite sure what you're still trying to figure out, but it might help to point out the indefinite article "a" in the definition. There can be multiple structures in a given category that satisfy the definition. Any category-theoretic notion that is invariant under equivalence will be unable to distinguish between different choices, but the notion of object itself is not equivalence-invariant, so it is coherent not to identify different choices, and sometimes genuinely desirable not to.

view this post on Zulip Alex Kreitzberg (Jun 10 2025 at 16:39):

I guess to clarify my understanding of your thoughts further, in Set do you think there are two different notions of product?

The usual one ×Set\times_{\text{Set}} and the categorical one ×\times?

So we have A×SetBB×SetAA\times_{\text{Set}}B \neq B\times_{\text{Set}} A but A×B=B×AA \times B = B \times A?

view this post on Zulip Stephane Bersier (Jun 10 2025 at 16:52):

Alex Kreitzberg said:

I guess to clarify my understanding of your thoughts further, in Set do you think there are two different notions of product?

The category Set\mathbf{Set} only has one notion of product, as given by category theory (see the definition I gave above). However, in set theory, there are multiple ways to define the cartesian product of two sets. They each correspond to particular objects of Set\mathbf{Set}, and are all isomorphic to each other, and each satisfies the universal property of the categorical product.

Does that make sense?

view this post on Zulip Stephane Bersier (Jun 10 2025 at 17:04):

Morgan Rogers (he/him) said:

Stephane Bersier I'm not quite sure what you're still trying to figure out

My initial understanding of the definition of the categorical product was off. This is what lead me to start this thread. Early answers like yours helped me correct my understanding, I believe. Since then, I have been engaged in several sub-conversations related to this topic. I think my current understanding is correct, but who knows? I'm open to being proven wrong. So I'm not really trying to figure anything out anymore, but rather hoping to ideally converge towards a shared understanding with those I am conversing.

There can be multiple structures in a given category that satisfy the definition. Any category-theoretic notion that is invariant under equivalence will be unable to distinguish between different choices, but the notion of object itself is not equivalence-invariant, so it is coherent not to identify different choices, and sometimes genuinely desirable not to.

Yes, I understand this part. I also understand that the categoric definition of product does not make any choice for us.

view this post on Zulip Mike Shulman (Jun 10 2025 at 17:17):

Stephane Bersier said:

  1. X×YX\times Y represents any object OO that can be equipped with the tuple (π1:OX,π2:OY)(\pi_1:O \to X, \pi_2:O \to Y) that satisfies the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with the tuple (π1:OY,π2:OX)(\pi_1: O \to Y, \pi_2: O \to X) that satisfies the universal property.

No, I think that is wrong. I would say that X×YX\times Y represents any object that has been equipped with such a tuple, and similarly. In other words, when we use the notation X×YX\times Y we have implicitly chosen two such projections. And having chosen projections in one order is different from having chosen projections in the other order.

view this post on Zulip Stephane Bersier (Jun 10 2025 at 17:38):

Mike Shulman said:

Stephane Bersier said:

  1. X×YX\times Y represents any object OO that can be equipped with the tuple (π1:OX,π2:OY)(\pi_1:O \to X, \pi_2:O \to Y) that satisfies the universal property.
  2. Y×XY \times X represents any object OO that can be equipped with the tuple (π1:OY,π2:OX)(\pi_1: O \to Y, \pi_2: O \to X) that satisfies the universal property.

No, I think that is wrong. I would say that X×YX\times Y represents any object that has been equipped with such a tuple, and similarly. In other words, when we use the notation X×YX\times Y we have implicitly chosen two such projections. And having chosen projections in one order is different from having chosen projections in the other order.

Yes, I agree (see what I wrote at the bottom of that post)! I was replying to @Ralph Sarkis , and only focusing on the object part of the definition.