6

My question is about the cartesian product. There are several definitions out there that do not seem to describe the same object, a cartesian product.

The most general definition according to wikipedia is this one: $$ \prod_{i \in I} A_i := \biggl\{ f: I \to \bigcup_{i \in I} A_i \;\bigg|\; \forall i \in I: f(i) \in A_i \biggr\}. $$

Let's apply it to $\{1,2\} \times \{1,2\} = \{1,2\}^2$ and let us use $I = \{a,b\}$ as the index set. Applying the definition gives us $$ \bigl\{ \{(a,1),(b,1)\}, \{(a,1),(b,2)\}, \{(a,2),(b,1)\}, \{(a,2),(b,2)\} \bigr\}. $$

Now let us look at another definition which is more popular: $$ \prod_{i=1}^n A_i = \bigl\{ (a_1, \dots, a_n) \;\big|\; a_i \in A_i \text{ for } i = 1, \dots, n\}. $$ In this case our example gives us $$ \bigl\{(1,1), (1,2), (2,1), (2,2) \bigr\}. $$

So for $\{1,2\}^2$ we get two different sets, depending on the definition we use. Why is that no problem? So what is the cartesian product of $\{1,2\}^2$? Maybe this is a general misunderstanding of me on how definitions work?

Sammy Black
  • 25,273
God
  • 95
  • 1
    They are equivalent. The set ${(a,1),(b,2)}$ is unordered, so without the $a$ and $b$ indexes appearing, there would be no way to know that ${(a,1),(b,2)}$ corresponds to $(1,2)$ rather than $(2,1)$. Note that the second definition also only makes sense if the indexing set is finite, but products are defined for arbitrary indexing sets. – pancini Jan 18 '24 at 21:55
  • 2
    Well, identify $(a_1,...,a_n)$ with the function $f: {1,...,n} \to \bigcup_{i=1}^n A_i, \ f(i) = a_i$. Then the definitions are equivalent. – psl2Z Jan 18 '24 at 21:58
  • Perhaps my answer to https://math.stackexchange.com/q/4107118 is helpful. You will see that the "same" question occurs almost everywhere in mathematics when a new concept is introduced. In fact, often there are many distinct, but equivalent, constructions ("models") of an object. For practical purposes this is irrelevant. – Paul Frost Jan 19 '24 at 00:39
  • 1
    It is also worth mentioning that the concept of a function presupposes the concept of the Cartesian product $A \times B$ of two sets $A,.B$. In fact, a function $f : A \to B$ is formally introduced as a subset of $A \times B$ with suitable properties. – Paul Frost Jan 19 '24 at 00:46

3 Answers3

11

Aside: There is actually a further issue: we define ordered pairs, usually via something like the Kuratowski definition, $$(a,b) = \{\{a\},\{a,b\}\}$$ or some other similar construction. But what is an ordered $n$-tuple like $(a_1,\ldots,a_n)$? The most common definition is that it is a function with domain $\{1,\ldots,n\}$ and where $a_i=f(a_i)$, so that we get back to functions, and you would then need to decide whether you are talking about "ordered pairs" in their "original" meaning, or as "ordered $2$-tuples", which would be different constructions... So for example, it is entirely possible that your second example should "really" consist of ordered $2$-tuples, so that when you write $(1,1)$, that really "means" $\{(1,1),(2,1)\}$, where the first $(1,1)$ is an "ordered $2$-tuple" and the elements in the set $\{(1,1),(2,1)\}$ are "ordered pairs"...


Aside 2. Note also that your second definition can only be used when $I$ is a finite initial subset of the natural numbers (or a set with a given bijection to such a subset), unless you take a more general definition of $I$-tuple... which just drops you back to the question of how to define elements of a product with an arbitrary index set, rather than a set of the form $\{1,\ldots,n\}$. But let us assume we are only talking about index sets $I$ of the form $I=\{1,2,\ldots,n\}$ for some $n\in\mathbb{N}$.


So the answer to your question is that... in the end it doesn't matter.

And the reason it doesn't matter is the same reason that the precise definition of "ordered pair" does not matter. (There are other definitions besides Kuratowski's). In the end, what we want of this "product" is its properties, not its precise construction.

For the ordered pair, to bring it back to that as a way to explain, the property we want an "ordered pair", whatever it may be, to have is $$(a,b)=(c,d)\iff a=c\text{ and }b=d.$$ How we achieve this is not really important. What is important is that we achieve it in some way, and once we do, we just use the ordered pairs and use this property of them. So long as this is all we use (and not properties of the precise and specific reification of the ordered pair) we are on safe ground.

Likewise with products. The two properties we want the product of $\{A_i\}_{i\in I}$, denoted $$\prod_{i\in I}A_i,$$ to have is the following:

  1. For each $j\in I$, there exists a function $\pi_j\colon \prod A_i\to A_j$;
  2. For every set $S$, if for every $j\in I$ there is a function $f_j\colon S\to A_j$, then there exists a unique function $F\colon S\to\prod A_i$ such that $f_j=\pi_j\circ F$ for all $j\in J$.

(This is the so-called "universal property of the product.") We often actually add the family of functions to the definition of the product, so that we can describe this property using only item 2.

Both of the constructions you describe have these two properties:

  • For the construction where $\prod A_i$ is the set of all function $f\colon I\to \cup A_j$ with $f(i)\in A_i$ for all $i\in I$, the function $\pi_j\colon\prod A_i\to A_j$ take the element $f$ of the product and define $\pi_j(f) = f(j)$. Given $S$ and the function $f_j$, we define $F\colon S\to \prod_{i\in I}A_i$ by letting $F(s)$ be the function with $F(s)(j)=f_j(s)$. It is now straightforward to show that $F$ satisfies the relevant composition identity and is the only function that has this property.

  • For the contruction with "tuples", we define $\pi_j\colon \prod A_i\to A_j$ by $\pi_j(a_1,\ldots,a_n) = a_j$; and given a set $S$ and functions $f_j\colon S\to A_j$, we define $F\colon S\to \prod A_i$ by $F(s) = (f_1(s),f_2(s),\ldots,f_n(s))$. Again, it is straightforward to show that this $F$ satisfies the relevant compositional identities and is the unique function with this property.

And the key reason why these properties are "enough" is the following:

Theorem. let $\{A_i\}_{i\in I}$ be a family of sets. Let $P$ and $Q$ be sets, and let $\{p_i\colon P\to A_i\}_{i\in I}$ and $\{q_i\colon Q\to A_i\}_{i\in I}$ be two families of functions such that $P$ and $Q$ each satisfies properties 1 and 2 above relative to the family $\{A_i\}_{i\in i}$. Then there exists a unique bijection $\Phi\colon P\to Q$ such that for each $i\in I$ we have $p_i = q_i\circ\Phi$. Therefore, $(P,\{p_i\})$ and $(Q,\{q_i\})$ are isomorphic up to unique isomorphism.

Proof. Because $q_i\colon Q\to A_i$ is a family of functions and $P$ has property $2$, there exists a unique $\Psi\colon Q\to P$ such that $q_i = p_i\circ\Psi$. Because $p_i\colon P\to A_i$ is a family of functions and $Q$ has property $2$, there exists a unique $\Phi\colon P\to Q$ such that $p_i = q_i\circ\Phi$. We want to show that $\Phi=\Psi^{-1}$.

The uniqueness clause of property 2 applied to $P$ itself with the functions $p_i$ shows that the unique function $g\colon P\to P$ such that $p_i=p_i\circ g$ is $g=\mathrm{id}_P$. Symmetrically, the unique function $h\colon Q\to Q$ such that $q_i=q_i\circ h$ is $h=\mathrm{id}_Q$. Now note that for all $i$, $$p_i = q_i\circ\Phi = (p_i\circ\Psi)\circ \Phi = p_i\circ(\Psi\circ\Phi).$$ That tells us that $\Psi\circ\Phi=\mathrm{id}_P$. Symmetrically, $$q_i = p_i\circ\Psi = (q_i\circ\Phi)\circ\Psi = q_i\circ(\Phi\circ\Psi),$$ so this tells us that $\Phi\circ\Psi=\mathrm{id}_Q$.

Since $\Phi\circ\Psi=\mathrm{id}_Q$ and $\Psi\circ\Phi=\mathrm{id}_P$, we conclude that $\Phi=\Psi^{-1}$, so $\Phi$ is a bijection. Uniqueness follows from property 2. $\Box$

(The above is a typical argument from Category Theory, applied to sets.)

This tells us that it doesn't matter how I realize the product construction, vs. how you realize the product construction. As long as the thing we are interested in is that it satisfies properties 1 and 2 above, my construction and your construction will be isomorphic up to a unique isomorphism, and therefore we don't actually care how they are instantiated, so long as they are somehow instantiated. Because there will be a unique way to translate from any one instantiation to any other instantiation.

So you can just pick your favorite construction that achieves properties 1 and 2, and after you establish it does... forget what the construction actually was and just use the properties it has. Just like we do with ordered pairs.

(As a quibble I will say that with the (imho correct) viewpoint of the matter, what you describe are not two "definitions" of the cartesian product, but rather two constructions of the cartesian product...)

Arturo Magidin
  • 398,050
  • The question is if both definitions lead to sets that are (in the realm of cartesian products) equivalent like 2+2 is equivalent to 4 (in the realm of natural numbers and its operations) or if they are just structurally equal like e.g. all sets with two elements. Because only with the general definition you can show the empty product is {$\emptyset$}, with the other definition it needs to be postulated. In any way it would look misleading to define some object X with abc and then state it can also be defined more generally with xyz but xyz does not really lead to X, just to something similiar. – God Jan 19 '24 at 09:13
  • Nice answer! It has the spirit of this quote: " When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck." – Kritiker der Elche Jan 19 '24 at 12:44
  • 3
    @God I do not understand your comment. I answered: they are both equivalent, explained why, and showed that was the case. Frankly, your comments reads rambling and confused to me. One definition is extremely restricted (only works for certain kinds of index sets), and I said so. For those index sets, the two constructions lead to sets that are not just isomorphic, but uniquely so. – Arturo Magidin Jan 19 '24 at 15:37
  • So could I say this: The real precise definition of a cartesian product is $$ \prod_{i \in I} A_i := \biggl{ f: I \to \bigcup_{i \in I} A_i ;\bigg|; \forall i \in I: f(i) \in A_i \biggr}. $$ All the other definitions are rather short-cuts for convenience. Like in everyday life you also do not use the biological definition of a plant, but a rather an handy one that lacks precision but has the benefit of simplicity. – God Jan 19 '24 at 17:38
  • 2
    @God The whole point is that there is no such thing as "the real and precise definition", just like there is no such thing as "the real and precise definition of ordered pair". There is a standard construction (which you describe) which has the *properties* we want the "product" to have. And what we care about are the properties. When you want to drive somewhere, you don't care how the engine is put together; you only care that the car goes and behaves as you expect it to behave. – Arturo Magidin Jan 19 '24 at 17:44
  • But only with the standard construction you can see that the empty product must be a singleton because of vacuous truth in the implication. The other definitions seem not fine-tuned enough. If you just define A x B := {(a,b)|a $\in$ A, b $\in$ B} you cannot see what to do with an empty product, it is actually not defined there at all. Therefore I got the notion that there is some standard definition and then some more practical definitions that lack precision for more practicability. – God Jan 19 '24 at 18:33
  • 2
    @God It is not correct that "only with the standard construction you can see that the empty product must be a singleton". In fact, the conclusion that the empty product must be a singleton follows from properties 1 and 2 that I list above, regardless of how you construct the object. To verify this, assume you have some set $P$ with properties 1 and 2 relative to the empty product. Then there must exist a unique map from any set $X$ to $P$ (by vacuity). The only sets with the property that there is a unique map from each set to them are the singletons. Ergo, empty products are singletons. – Arturo Magidin Jan 19 '24 at 18:40
  • 2
    @God: So, again, no. Note that just because you are not aware of something doesn't mean it doesn't exist (so it's not "only with the standard construction", but rather, "of the two ways I know, only one seems to work"). And you continue to be fixated on "how do you construct the engine?", but what you should really care about is "does this car go?" There is a way of constructing it (even a standard way), but you should not care about the guts that make it work, you should only care about what it does. – Arturo Magidin Jan 19 '24 at 18:42
  • 2
    @God: And I repeat that we have a chicken-and-egg problem with $A\times B$. We construct "ordered pairs" in a particular way (there are multiple ways of doing it). Then we construct the binary cartesian product $A\times B$ relative to that particular construction. Then, we define functions in terms of that object's properties. Then we construct products using functions. But now we have the notion of "ordered pair" and "ordered 2-tuple"; of "binary cartesian product" and "product of two sets". They need not be identical sets. But they have the same properties; that's what matters. – Arturo Magidin Jan 19 '24 at 18:45
  • But my point is you cannot prove the empty product with the definition A x B := {(a,b)|a ∈ A, b ∈ B}. Because the definition is the starting point. So obviously this definition is not precise enough to see some things. And then you develop more fine-tuned definitions till you reach a standard definition that establishes all the properties you want. But that means you must assume all the simpler definitions to be short-cuts (subsets if you will) of the standard one, else you get problems if you prove something from the standard definitions to apply it for the simpler definitions as well. – God Jan 19 '24 at 18:49
  • 1
    @God Again, they are not definitions, they are constructions. And that construction can only be used for index sets that are nonempty initial segments of the natural numbers. Therefore, that construction is not even applicable in the case where the index set is empty, so you cannot "prove" something about objects for which the construction is not applicable. You continue to assert a "point" that I have already told you is incorrect. No, it is not true that "you must assume all the simple definition to be short-cuts (subsets if you will) of the standard one." What you say is just not true. – Arturo Magidin Jan 19 '24 at 18:53
  • 1
    @God You do not need to assume the constructions are compatible in the sense of subsets. You only need to ensure that whatever construction you use in any particular instance satisfies properties 1 and 2; that is the *definition* of "product of a family of sets". And if it satisfies those properties, then any other instantiation of the product will be uniquely and canonically bijectable with any other particular instantiation. – Arturo Magidin Jan 19 '24 at 18:55
  • @God: Another way to see Arturo's point is to recall that there are many different axioms for set theory, and so we generally don't get to work with sets up to equality. We have to relax and be satisfied with sets up to equivalence instead. I strongly recommend "Rethinking Set Theory", Leinster 2012 as a rigorous introduction to structural set theory, focused on the properties of sets instead of their elements. – Corbin Jan 19 '24 at 19:16
4

Strictly they are not the same but as many have pointed out, there is an isomorphism between:

$$\biggl\{ f: I \to \bigcup_{i \in I} A_i \;\bigg|\; \forall i \in I: f(i) \in A_i \biggr\}$$

and

$$ \bigl\{ (a_1, \dots, a_n) \;\big|\; a_i \in A_i \text{ for } i = 1, \dots, n\}$$

the isomorphism is the one that psl2Z mentioned in his comment:

$(a_1,a_2,\ldots,a_n) \mapsto f$, where $f : \{1,\ldots,n\} \to \bigcup_{i \in I} A_i$ and such that $f(1) = a_1$, $f(2) = a_2$ $\ldots$ $f(n) = a_n$.

Viceversa, if you have a function $f : \{1,\ldots,n\} \to \bigcup_{i \in I} A_i$ such that $f(i) \in A_i$ forall $i \in \{1,\ldots,n\}$, then you identify $f \mapsto (f(1),f(2),\ldots,f(n))$.

Notice that we use $I = \{1,\ldots,n\}$, but we can use an arbitrary set, in your example $I = \{a,b\}$ and $A_1 = A_2 = \{1,2\}$, so you get

\begin{align} \{1,2\} \times \{1,2\} & := \{f : \{a,b\} \to \cup_{i \in \{a,b\}} A_i | f(i) \in A_i\} = \{f_1,f_2,f_3,f_4\}\tag{1} \end{align}

where

$f_1 : \{a,b\} \to \{1,2\}$ where $f_1(a) = 1$, $f_1(b) = 1$,

$f_2 : \{a,b\} \to \{1,2\}$ where $f_2(a) = 2$, $f_1(b) = 2$

$f_3 : \{a,b\} \to \{1,2\}$ where $f_3(a) = 1$, $f_1(b) = 2$,

$f_4 : \{a,b\} \to \{1,2\}$ where $f_2(a) = 2$, $f_1(b) = 1$,

we identify these four functions with the previous said isomorphism:

$f_1 \mapsto (1,1)$

$f_2 \mapsto (2,2)$

$f_3 \mapsto (1,2)$

$f_4 \mapsto (2,1)$

So we can use both definitions.

César VB
  • 447
  • So are the sets occuring out of those different definitions equivalent like 2 = II or 2+2 = 4? So in the context of cartesian products could I always plug in {(1,1),(1,2),(2,1),(2,2)} for {{(a,1),(b,1)},{(a,1),(b,2)},{(a,2),(b,1)},{(a,2),(b,2)}} ? I think not, so both definitions lead to different concepts/sets of a cartesian product that are not equivalent but „just“ structurally similiar enough to share the intended properties kind of like {1,2} and {a,b} are not equivalent but share the same structure. Is that a correct assessment in your opinion? – God Jan 19 '24 at 08:49
  • @God, isomorphisms and equality is not the same in mathematics, isomorphism is a bijective function that preserves some kind of order/relation. Equality by definition is $A = B$ iff every element of $A$ is in $B$ and viceversa. Isomorphisms are a tool that help us see things more clear between two sets. This is all for pure utilitarian reasons, I know this may conflict a lot of people But, for example the functional definition, it's extremely usefull because we can define an infinite cartesian product and we now exactly what we mean by an infinite "coordinate": $(a_1,\ldots,a_n,\ldots $ – César VB Jan 19 '24 at 21:26
  • @God also, while answering your comment I thought about this quote from Henri Poincaré (I think it's very related to your concerns): "Mathematics is the art of giving the same name to different things". – César VB Jan 19 '24 at 21:39
1

These are clearly equivalent, in fact canonically isomorphic, which is the best we can hope for in a definition like this. Whether we write a pair as $(a_1, a_2)$ or $\bigl( f(1), f(2) \bigr)$ or $\bigl\{ (1, f(1)), (2, f(2)) \bigr\}$ is immaterial.

Here, I've chosen to use the same index set $I = \{1, 2\}$ to compare the two definitions, so as not to have to put in another isomorphism $\{1, 2\} \leftrightarrow \{a, b\}$.

Sammy Black
  • 25,273