← mapSet Theory

Ordered Pairs & Cartesian Products

⚗ Dr. Möbius, from the lab

Sets forget order — that's their whole personality, and it's usually a feature. But sometimes order is everything: the point (3,5)(3, 5) on a map is not the point (5,3)(5, 3), and "Alice loves Bob" is absolutely not "Bob loves Alice." So we're going to build a gadget that remembers which came first, out of nothing but sets, because we're the kind of people who build things out of nothing. Then Descartes shows up and turns geometry into algebra in one of the most violent intellectual moves of the seventeenth century. Buckle up.

THE BIG IDEA

The ordered pair (a,b) remembers order, and the Cartesian product A×B collects all such pairs — which is exactly what makes the plane ℝ² out of two copies of the line.

Sets forget order, so we engineer something that doesn't

From the membership lesson: {a,b}={b,a}\{a, b\} = \{b, a\}. A set is a bag, and a bag has no first or last. That's great for "the set of solutions" but useless when order carries information. The coordinates (3,5)(3, 5) and (5,3)(5, 3) are different locations; "33 divides 66" reads one way only.

So we build the ordered pair (a,b)(a, b) — a new object whose defining property is exactly that it remembers which came first. Its entire contract is one rule:

(a,b)=(c,d)    a=c  and  b=d.(a, b) = (c, d) \quad \iff \quad a = c \ \text{ and } \ b = d.

Two ordered pairs are equal iff their first coordinates match and their second coordinates match. That's the definition, and it's the only thing about ordered pairs you ever need. The immediate consequence: (a,b)=(b,a)(a, b) = (b, a) only when a=ba = b. Order is now remembered — baked in, inescapable, exactly as advertised. (For the curious: you can build (a,b)(a,b) purely from sets — Kuratowski's trick defines it as {{a},{a,b}}\{\{a\}, \{a, b\}\}, and you can check this satisfies the equality rule. We won't need the guts; the contract is what matters. But isn't it perversely beautiful that we can build this out of nothing but braces?)

The Cartesian product: every pair, assembled

Now collect them all. Given sets AA and BB, the Cartesian product A×BA \times B is the set of all ordered pairs with first coordinate from AA and second from BB:

A×B={(a,b)aA and bB}.A \times B = \{\, (a, b) \mid a \in A \ \text{and}\ b \in B \,\}.

So A×BA \times B is a set (good — sets are all we have), but its elements are ordered pairs. Concretely, if A={1,2}A = \{1, 2\} and B={x,y}B = \{x, y\}:

A×B={(1,x), (1,y), (2,x), (2,y)}.A \times B = \{\, (1, x),\ (1, y),\ (2, x),\ (2, y) \,\}.

Lay those out in a grid — rows indexed by AA, columns by BB — and every cell is one pair. That picture hands you the size formula for free:

A×B=AB.|A \times B| = |A| \cdot |B|.

Two choices for the first slot (A|A| of them) times the choices for the second (B|B|), independent — so 22=42 \cdot 2 = 4 pairs above. This is the same multiplication-by-independent-choices logic that gave 2n2^n subsets in the power-set argument; you're going to keep meeting it.

Order matters in the product too: A×BB×AA \times B \ne B \times A in general. Above, B×AB \times A contains (x,1)(x, 1), which isn't even the right shape to be in A×BA \times B. The product is not commutative — first sighting of a theme that dominates the matrix stratum.

Descartes' detonation: ℝ² is the plane

Here is one of the genuinely great moves in the history of human thought, and I will not forgive the Federation of Boring Textbook Authors for presenting it as "graph paper" and moving on. Take A=B=RA = B = \mathbb{R}, the real line. Then

R2=R×R={(x,y)xR, yR}\mathbb{R}^2 = \mathbb{R} \times \mathbb{R} = \{\, (x, y) \mid x \in \mathbb{R},\ y \in \mathbb{R} \,\}

is the set of all ordered pairs of reals. And every such pair (x,y)(x, y) is a point in the coordinate plane: xx tells you how far along, yy tells you how far up. The plane you've drawn on since grade school is literally the Cartesian product of two number lines. That's why we call it the Cartesian plane — after René Descartes, who fused algebra and geometry by declaring that a point is a pair of numbers.

Sit with how violent this is. Before Descartes, geometry (shapes, lines, circles) and algebra (equations, numbers) were separate disciplines that barely spoke to each other. After him, a circle is the equation x2+y2=1x^2 + y^2 = 1 — a set of pairs {(x,y)x2+y2=1}R2\{(x,y) \mid x^2 + y^2 = 1\} \subseteq \mathbb{R}^2. A line is a set of pairs. Geometry became algebra on sets of ordered pairs. Every graph you'll ever draw lives in some A×BA \times B. Remember when we built R\mathbb{R} from defects in N\mathbb{N}? Same fucking spirit — once you have the reals, products of them carry entire geometries.

More than two: ℝⁿ and the doorway to linear algebra

Nothing stops you at two. An ordered triple (a,b,c)(a, b, c) remembers three slots, with (a,b,c)=(d,e,f)    a=d,b=e,c=f(a,b,c) = (d,e,f) \iff a=d, b=e, c=f. The triple product is

A×B×C={(a,b,c)aA, bB, cC},A \times B \times C = \{\, (a, b, c) \mid a \in A,\ b \in B,\ c \in C \,\},

and its size is ABC|A|\cdot|B|\cdot|C|. Taking all three factors to be R\mathbb{R} gives R3\mathbb{R}^3 — the set of points in 33D space, where (x,y,z)(x, y, z) locates a point in the room you're sitting in.

Keep going. For any nn, an ordered nn-tuple (x1,x2,,xn)(x_1, x_2, \dots, x_n) has nn slots, and

Rn=R×R××R(n copies)\mathbb{R}^n = \mathbb{R} \times \mathbb{R} \times \cdots \times \mathbb{R} \quad (n \text{ copies})

is the set of all such tuples of reals. This Rn\mathbb{R}^n is the home address of all of linear algebra — vectors are tuples in Rn\mathbb{R}^n, matrices are machines that move them around, and the entire Spaces stratum is just Rn\mathbb{R}^n wearing a lab coat. You're building the floor that the rest of the building stands on. Right now. In this lesson. Every "vector" you ever meet is an element of a Cartesian product you just defined. File that away — it detonates the moment we reach vectors, and I want you to feel the satisfaction of knowing you built the floor before anyone else even told you the building existed.

🔬 SPECIMENS (worked examples)

Worked example 1 — listing a product and counting it

Let A={1,2,3}A = \{1, 2, 3\} and B={a,b}B = \{a, b\}. List A×BA \times B and verify A×B|A \times B|.

Pair every element of AA (first slot) with every element of BB (second slot). Go systematically — fix the first coordinate, sweep the second:

A×B={(1,a), (1,b), (2,a), (2,b), (3,a), (3,b)}.A \times B = \{\, (1,a),\ (1,b),\ (2,a),\ (2,b),\ (3,a),\ (3,b) \,\}.

Count: 66 pairs. The formula predicts A×B=AB=32=6|A \times B| = |A| \cdot |B| = 3 \cdot 2 = 6. Match.

The grid picture makes it obvious — 33 rows (one per element of AA), 22 columns (one per element of BB), and one pair in each of the 32=63 \cdot 2 = 6 cells. Notice we never wrote (a,1)(a, 1): that's the wrong order, and it would live in B×AB \times A, a different set.

Worked example 2 — cracking an ordered-pair equation (coordinate by coordinate, no shortcuts)

Find all real x,yx, y with (2x1, y+3)=(5, 4)(2x - 1,\ y + 3) = (5,\ 4).

Two ordered pairs are equal iff they agree coordinate-by-coordinate. So the single pair equation splits into two ordinary equations:

2x1=5andy+3=4.2x - 1 = 5 \quad \text{and} \quad y + 3 = 4.

Solve each: 2x1=5    2x=6    x=3,2x - 1 = 5 \implies 2x = 6 \implies x = 3, y+3=4    y=1.y + 3 = 4 \implies y = 1.

So x=3x = 3 and y=1y = 1, i.e. the pair is (5,4)(5, 4) when we plug back: (2(3)1,1+3)=(5,4)(2(3) - 1, 1 + 3) = (5, 4). ✓

This "split a pair equation into coordinate equations" trick is the entire reason ordered pairs are useful — and it's the same move that, in linear algebra, turns one vector equation into a system of scalar equations.

Worked example 3 — the non-commutativity trap and what happens when you multiply by the void

Let A={0,1}A = \{0, 1\} and B={1,2}B = \{1, 2\}. Is A×B=B×AA \times B = B \times A? Then compute A×A \times \emptyset.

Is A×B=B×AA \times B = B \times A? Write both out.

A×B={(0,1),(0,2),(1,1),(1,2)},A \times B = \{(0,1), (0,2), (1,1), (1,2)\}, B×A={(1,0),(1,1),(2,0),(2,1)}.B \times A = \{(1,0), (1,1), (2,0), (2,1)\}.

They share exactly one pair, (1,1)(1,1) (the only place the coordinates happen to be swappable), but otherwise differ: (0,1)A×B(0,1) \in A \times B while (0,1)B×A(0,1) \notin B \times A — the latter needs first coordinate in B={1,2}B = \{1,2\}, and 0B0 \notin B. So A×BB×AA \times B \ne B \times A. Order matters in products.

Now A×A \times \emptyset. We need all pairs (a,b)(a, b) with aAa \in A and bb \in \emptyset. But there's no bb \in \emptyset to fill the second slot — no pair can be formed. So

A×=.A \times \emptyset = \emptyset.

Consistent with the count: A×=A=20=0|A \times \emptyset| = |A| \cdot |\emptyset| = 2 \cdot 0 = 0. Multiplying by the empty set annihilates the product, exactly like multiplying a number by zero. The size formula never lies.

☠ KNOWN HAZARDS

  • Treating (a,b)(a,b) like {a,b}\{a,b\}. The pair remembers order; the set doesn't. (3,5)(5,3)(3,5) \ne (5,3), but {3,5}={5,3}\{3,5\} = \{5,3\}. Mixing the brackets is a silent disaster that propagates into every subsequent lesson.

  • Assuming A×B=B×AA \times B = B \times A. Only when A=BA = B (or one is empty). In general the pairs come out in the wrong order to match. Products are non-commutative — this is your first taste of a theme that matrices will beat to death.

  • Adding sizes instead of multiplying. A×B=AB|A \times B| = |A|\cdot|B|, not A+B|A| + |B|. Each first-coordinate choice pairs with every second-coordinate choice — that's a product. If you add, you're counting something that isn't the Cartesian product.

  • Thinking R2\mathbb{R}^2 is "two real numbers". It's the set of all ordered pairs of reals — an infinite set of points, the entire plane, not a single pair. Descartes would be upset. I'm upset on his behalf.

TL;DR

  • The ordered pair obeys one rule: (a,b)=(c,d)    a=c(a,b) = (c,d) \iff a=c and b=db=d. Unlike a set, it remembers order.

  • A×B={(a,b)aA,bB}A \times B = \{(a,b) \mid a \in A, b \in B\} collects all pairs, and A×B=AB|A \times B| = |A|\cdot|B| by the grid/independent-choices argument.

  • Products aren't commutative: A×BB×AA \times B \ne B \times A in general — the pairs have the wrong shape to match.

  • R2=R×R\mathbb{R}^2 = \mathbb{R} \times \mathbb{R} is the coordinate plane (Descartes): geometry becomes sets of ordered pairs of numbers.

  • Rn\mathbb{R}^n is the product of nn copies of R\mathbb{R} — the home of every vector in linear algebra.

unlocks