---
tag: BM452N6A98
kind: proof
name: Proof of the rule of product
msc: [05A05]
proves: 0VPK4X73Q0
uses: [05099E1NMJ, 0C81YBVTWH, 0SNQEF7Z53, 0EE2V3CHFK, 01FPXMTBX1, 07EH4R3RVQ]
methods: [0ASJVEFA9J]
sources:
  - url: https://en.wikipedia.org/wiki/Rule_of_product
    locator: lead section
---

## Proof

We split the [[Cartesian product|0C81YBVTWH]] into disjoint copies of $A$, and then argue by induction on $k$.

1. Let $m = |A|$ and $n = |B|$. By the definition of [[cardinality|05099E1NMJ]], there are [[bijections|0SNQEF7Z53]] $f : \set{1, \dots, m} \to A$ and $g : \set{1, \dots, n} \to B$. Write $b_j = g(j)$.
2. If $n = 0$, then $B$ is empty, so $A \times B$ is empty and $|A \times B| = 0 = m \cdot 0$.
3. Let $n \ge 1$. Every pair $(a, b) \in A \times B$ has $b = b_j$ for exactly one $j$. So $A \times B$ is the union of the sets $A \times \set{b_j}$ for $j = 1, \dots, n$.
4. These sets are pairwise disjoint, because $b_j \ne b_{j'}$ for $j \ne j'$, as $g$ is injective.
5. For each $j$, the map $i \mapsto (f(i), b_j)$ from $\set{1, \dots, m}$ to $A \times \set{b_j}$ is a bijection, because $f$ is a bijection. So $|A \times \set{b_j}| = m$.
6. By the [[rule of sum|0EE2V3CHFK]], $A \times B$ is finite and $|A \times B| = m + \dots + m = n m = |A| \cdot |B|$, with $n$ terms.
7. Now let $A_1, \dots, A_k$ be finite sets, with $k \ge 1$. For $k = 1$ the claim $|A_1| = |A_1|$ holds.
8. Suppose the claim holds for $k$ sets. Put $P = A_1 \times \dots \times A_k$. By hypothesis $P$ is finite and $|P| = |A_1| \cdots |A_k|$.
9. The map $\phi : P \times A_{k+1} \to A_1 \times \dots \times A_{k+1}$ with $\phi((a_1, \dots, a_k), a_{k+1}) = (a_1, \dots, a_{k+1})$ is a bijection. Its inverse regroups the entries.
10. By steps 1 to 6, there is a bijection $h : \set{1, \dots, N} \to P \times A_{k+1}$ with $N = |P| \cdot |A_{k+1}|$.
11. A composite of bijections is a bijection, since [[injections compose|01FPXMTBX1]] and [[surjections compose|07EH4R3RVQ]]. So $\phi \circ h$ is a bijection from $\set{1, \dots, N}$ to $A_1 \times \dots \times A_{k+1}$.
12. Hence $|A_1 \times \dots \times A_{k+1}| = N = |A_1| \cdots |A_k| \cdot |A_{k+1}|$. This completes the induction.

## Idea

The pairs with a fixed second entry $b$ form a copy of $A$.
There are $|B|$ such copies and they do not overlap, so the rule of sum adds $|A|$ to itself $|B|$ times.
Longer products are built one factor at a time.
