Maths WorkshopMaths problems with full solutions
Exercise 823Logic, sets and proofs › Countability and cardinalityL1Added 3 Nov 2026

Countable product

#product#countable#product rule

Statement

Show that if AA and BB are countable, then A×BA\times B is countable.

Hint

If f:A→Nf:A\to\mathbb{N} and g:B→Ng:B\to\mathbb{N} are injections, then (a,b)↦π(f(a),g(b))(a,b)\mapsto\pi(f(a),g(b)) is injective.

Show solutionHide solution

Solution

Injection. Using the pairing function π:N2→N\pi:\mathbb{N}^2\to\mathbb{N}, (a,b)↦π(f(a),g(b))(a,b)\mapsto\pi(f(a),g(b)) is injective.

Conclusion. A×BA\times B is countable.

Remark. Finite products of countable sets are countable; infinite countable products need not be.