Skip to content
Part IA Michaelmas, Lent Term

Pairing and Cartesian Products

Ordered Pairs

Definition

An ordered pair (a,b)(a, b) is a mathematical structure that:

  1. Contains exactly two elements
  2. Has a specified order: first component aa, second component bb

Key Property

(a,b)=(c,d)  ⟺  a=c∧b=d(a, b) = (c, d) \iff a = c \land b = d

This distinguishes ordered pairs from sets: {a,b}={b,a}\{a, b\} = \{b, a\} but (a,b)≠(b,a)(a, b) \neq (b, a) (unless a=ba = b).

Kuratowski Definition (Encoding)

We can define ordered pairs purely in terms of sets:

(a,b)={{a},{a,b}}(a, b) = \{\{a\}, \{a, b\}\}

Verification: If (a,b)=(c,d)(a, b) = (c, d), then {{a},{a,b}}={{c},{c,d}}\{\{a\}, \{a, b\}\} = \{\{c\}, \{c, d\}\}.

  • If a=ba = b, then {{a},{a,b}}={{a}}\{\{a\}, \{a, b\}\} = \{\{a\}\}, so {c}={a}\{c\} = \{a\}, hence c=a=bc = a = b.
  • If a≠ba \neq b, then {a}∈{{c},{c,d}}\{a\} \in \{\{c\}, \{c, d\}\} requires {a}={c}\{a\} = \{c\}, so a=ca = c.
    • Then {a,b}={a,d}\{a, b\} = \{a, d\}, and since a≠ba \neq b, we have b=db = d.

Cartesian Product

Definition

The Cartesian product of sets AA and BB is:

A×B={(a,b):a∈A∧b∈B}A \times B = \{(a, b) : a \in A \land b \in B\}

Examples

  • {1,2}×{a,b}={(1,a),(1,b),(2,a),(2,b)}\{1, 2\} \times \{a, b\} = \{(1, a), (1, b), (2, a), (2, b)\}
  • R×R=R2\mathbb{R} \times \mathbb{R} = \mathbb{R}^2 (the Euclidean plane)
  • {x}×A={(x,a):a∈A}\{x\} \times A = \{(x, a) : a \in A\}

Cardinality

For finite sets:

∣A×B∣=∣A∣⋅∣B∣|A \times B| = |A| \cdot |B|

Properties of Cartesian Products

Non-commutativity

A×B≠B×A in generalA \times B \neq B \times A \text{ in general}

Unless A=BA = B or one of them is empty.

Distributivity over Union

A×(B∪C)=(A×B)∪(A×C)A \times (B \cup C) = (A \times B) \cup (A \times C) (A∪B)×C=(A×C)∪(B×C)(A \cup B) \times C = (A \times C) \cup (B \times C)

Distributivity over Intersection

A×(B∩C)=(A×B)∩(A×C)A \times (B \cap C) = (A \times B) \cap (A \times C) (A∩B)×C=(A×C)∩(B×C)(A \cap B) \times C = (A \times C) \cap (B \times C)

Interaction with Empty Set

A×∅=∅=∅×AA \times \emptyset = \emptyset = \emptyset \times A

n-tuples

Definition

An n-tuple (a1,a2,…,an)(a_1, a_2, \ldots, a_n) generalises ordered pairs.

We can encode n-tuples using nested pairs:

(a1,a2,…,an)=(a1,(a2,(…,(an−1,an)…)))(a_1, a_2, \ldots, a_n) = (a_1, (a_2, (\ldots, (a_{n-1}, a_n)\ldots)))

n-fold Cartesian Product

An=A×A×⋯×A⏟n times={(a1,…,an):ai∈A}A^n = \underbrace{A \times A \times \cdots \times A}_{n \text{ times}} = \{(a_1, \ldots, a_n) : a_i \in A\}

Examples

  • R2\mathbb{R}^2: the plane (2D coordinates)
  • R3\mathbb{R}^3: 3D space
  • Zn\mathbb{Z}^n: integer lattice in nn dimensions

Disjoint Union (Coproduct)

Motivation

The union A∪BA \cup B is not ideal for “combining” sets because:

  • If AA and BB overlap, we lose information about origin
  • We cannot distinguish a∈A∩Ba \in A \cap B from a∈Aa \in A vs a∈Ba \in B

Definition

The disjoint union (or coproduct, or sum) of AA and BB is:

A+B=({0}×A)∪({1}×B)A + B = (\{0\} \times A) \cup (\{1\} \times B)

Each element is “tagged” with its origin.

Examples

  • {a,b}+{b,c}={(0,a),(0,b)}∪{(1,b),(1,c)}\{a, b\} + \{b, c\} = \{(0, a), (0, b)\} \cup \{(1, b), (1, c)\}
  • Even though bb appears in both, (0,b)≠(1,b)(0, b) \neq (1, b)

Cardinality

∣A+B∣=∣A∣+∣B∣|A + B| = |A| + |B|

This holds without restriction (unlike union, where ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|).


Summary

  • Ordered pairs (a,b)(a, b) satisfy (a,b)=(c,d)  ⟺  a=c∧b=d(a, b) = (c, d) \iff a = c \land b = d
  • Cartesian product A×B={(a,b):a∈A,b∈B}A \times B = \{(a, b) : a \in A, b \in B\}
  • ∣A×B∣=∣A∣⋅∣B∣|A \times B| = |A| \cdot |B| and ∣A+B∣=∣A∣+∣B∣|A + B| = |A| + |B|
  • Disjoint union A+BA + B tags elements to preserve origin information