2 Sets and functions

2.5 Cartesian products

2.5.1 Ordered pairs

When we want to use coordinates to talk about points in the plane, we often do this with pairs of real numbers x,y. The first element x of the pair tells you how far across to go and the second element y how far up. The key properties of these pairs x,y is that x,y=z,w if and only if x=z and y=w. A construction with this property is called an ordered pair, and we can form ordered pairs with elements from any two sets — not just for real numbers.

The symbols and are just a kind of bracket. We don’t use ( and ) for our ordered pairs because the notation (x,y) is going to be used for something else later (in the part of this chapter on permutations).

We’ve defined ordered pairs by saying what they do, that is, by giving a defining property they satisfy. For MATH0005 that’s all we need, but if you are interested in how to actually construct sets with this property you can read about the Kuratowski definition at this link. Proving that the definition does what it is supposed to needs some formal set theory which is why we omit it here.

2.5.2 Cartesian products

Definition 2.5.1.

The Cartesian product of two sets A and B, written A×B, is the set of all ordered pairs in which the first element belongs to A and the second belongs to B:

A×B={a,b:aA,bB}.

Notice that the size of A×B is the size of A times the size of B, that is, |A×B|=|A||B|.

Example 2.5.1.

{1,2}×{2,3}={1,2,1,3,2,2,2,3}.

Of course we produce ordered triples (a,b,c) as well, and ordered quadruples, and so on.