MATH 308 — Lec 18 — Cardinality: Countable
Math 308 · November 14, 2026
Lecture 18 — Cardinality: Finite and Countable Sets
MATH 308 Bridge to Advanced Mathematics Chartrand §11.1–11.2
Goals for today. By the end of this lecture you should be able to:
-
say precisely what it means for two sets to have the same cardinality — a bijection between them — and connect this to Lecture 16;
-
distinguish finite, denumerable (countably infinite), countable, and uncountable sets;
-
prove a set is denumerable by listing its elements a1,a2,a3,… with no repeats;
-
show that Z, N×N, and Q are countable, using the pairing and zig-zag arguments.
When do two sets have the same size? (§11.1)
For a finite set we already have a notion of size: recall from Lecture 1 that ∣A∣ is the number of elements of A. The sets A={a,b,c} and B={x,y,z} “have the same size” because each has three elements. But there is a second way to see this that never counts: we can pair off their elements,
a↔x,b↔y,c↔z.This pairing is exactly a bijective function f:A→B (Lecture 16): one that is injective (no two elements of A are sent to the same place) and surjective (nothing in B is missed). The counting method needs finiteness; the pairing method does not. That is the whole idea of this chapter.
Definition 1 (Same cardinality). Two sets A and B (finite or infinite) have the same cardinality, written ∣A∣=∣B∣, if either both are empty or there exists a bijection f:A→B. In this case we call A and B numerically equivalent.
A bijection f:A→B pairs off elements one-to-one, with none left over on either side. This — not counting — is our definition of “same size.”
Example 1. ∣{a,b,c}∣=∣{x,y,z}∣, witnessed by f={(a,x),(b,y),(c,z)}. Two finite sets are numerically equivalent precisely when they have the same number of elements; for finite sets the new definition agrees with plain counting.
Remark 1. Numerical equivalence is an equivalence relation (Lecture 14) on any collection of sets: ∣A∣=∣A∣ via the identity (reflexive); a bijection f:A→B has a bijective inverse f−1:B→A (Lecture 17), giving symmetry; and a composition of bijections is a bijection (Lecture 17), giving transitivity. So “same cardinality” genuinely sorts sets into size-classes.
Definition 2 (Finite and infinite). A set S is finite if S=∅ or ∣S∣=n for some n∈N. A set is infinite if it is not finite. We are about to give “∣S∣” a meaning even when S is infinite — and the surprise is that not all infinities are the same size (Lecture 19).
Countably infinite (denumerable) sets (§11.2)
The simplest infinite set is N={1,2,3,…}. We take it as the yardstick for the smallest kind of infinity.
Definition 3 (Denumerable, countable). A set A is denumerable (or countably infinite) if ∣A∣=∣N∣, i.e. there is a bijection f:N→A. A set is countable if it is finite or denumerable, and uncountable otherwise.
A bijection f:N→A does something concrete: it hands us a list. Writing an=f(n), we get A={a1,a2,a3,…} in which every element of A appears exactly once. Conversely, any such repetition-free list a1,a2,a3,… defines a bijection g(n)=an. This gives our working test.
Proposition 1 (The listing test). *A set A is denumerable if and only if its elements can be arranged in a list
A={a1,a2,a3,…}in which every element of A occurs once and only once.*
Certainly N itself is denumerable (list it as 1,2,3,…; the bijection is the identity). The first real surprise is that a strictly larger-looking set is no bigger.
Theorem 2. The set Z of integers is denumerable.
Proof. List the integers by alternating outward from 0:
0, 1, −1, 2, −2, 3, −3, …Every integer appears exactly once, so by the listing test Z is denumerable. Explicitly, the bijection f:N→Z is
f(n)=⎩⎨⎧2n,−2n−1,n even,n odd,f(1)=0, f(2)=1, f(3)=−1, f(4)=2, f(5)=−2, …◻
The bijection f:N→Z: sweep outward from 0 so each integer is caught exactly once. Here N⊊Z yet ∣N∣=∣Z∣.
Remark 2 (Galileo’s paradox). Note N⊊Z, yet ∣N∣=∣Z∣: a set can be numerically equivalent to a proper subset of itself. This can never happen for finite sets — and it is essentially the defining feature of an infinite set. We revisit it in the framed box below.
A convenient tool (which we will not prove in full) records that “N is the smallest infinity”:
Lemma 3 (Subsets of countable sets). Every subset of a countable set is countable. In particular, an infinite subset of a denumerable set is again denumerable.
Idea: if A={a1,a2,a3,…} and B⊆A is infinite, walk down the list of A and record the elements that land in B; the Well-Ordering Principle (Lecture 12) guarantees this produces a repetition-free list b1,b2,b3,… of all of B. For example, the even integers 2Z⊆Z are denumerable, since 2Z is an infinite subset of the denumerable set Z.
Products and Q: the zig-zag (§11.2)
To reach Q we first handle a grid. The key move — Cantor’s zig-zag — is to sweep a two-dimensional array along its finite diagonals.
Theorem 4. N×N is denumerable.
Proof. Arrange the pairs (i,j) in an infinite grid, with (i,j) in row i and column j. Each anti-diagonal {(i,j):i+j=k} is finite. Traverse diagonal k=2, then k=3, then k=4, and so on, listing the finitely many pairs on each before moving to the next:
(1,1), (1,2),(2,1), (1,3),(2,2),(3,1), (1,4),(2,3),(3,2),(4,1), …Every pair (i,j) sits on exactly one diagonal and so is reached exactly once. By the listing test, N×N is denumerable. ◻
Cantor’s zig-zag through N×N: each anti-diagonal (i+j constant) holds finitely many pairs, so sweeping diagonal by diagonal lists every pair exactly once.
Corollary 5. The set Q of rational numbers is denumerable.
Proof. First take the positive rationals Q+. Every q∈Q+ is q=j/i for some i,j∈N, so the map (i,j)↦j/i sends N×N onto Q+. Walk the zig-zag list of N×N from Theorem 4 and write down each value j/i the first time it appears, skipping any fraction already listed (e.g. skip 2/2 since 1/1 came first). This produces a repetition-free list of all of Q+:
11, 12, 21, 13, 31, 14, 23, 32, 41, …So Q+ is denumerable (it is infinite, and we have listed it). Now list all of Q by interleaving, exactly as we did for Z: put 0 first, then alternate each positive rational with its negative,
0, q1, −q1, q2, −q2, q3, −q3, …,where q1,q2,q3,… is the list of Q+. Every rational appears exactly once, so Q is denumerable. ◻
This is genuinely startling. The rationals are dense — between any two of them lies another (Lecture 8) — so on the number line they seem to leave no gaps. Yet as a set they can be lined up q1,q2,q3,… just like N. Density and cardinality are different questions. In Lecture 19 we prove that R cannot be listed this way: R is uncountable, a strictly larger infinity.
Homework problems
-
Exhibit an explicit bijection N→{2,4,6,8,…} and one N→{5,6,7,8,…}. Conclude each set is denumerable.
-
Using the formula f(n) from Theorem 2.2, compute f(6), f(7), and f(8). Which integer maps to −4?
-
Write out the first ten terms of the zig-zag list of N×N. On which diagonal (i+j=?) does the pair (3,4) first appear?
-
List the first eight distinct values in the Q+ enumeration, being careful to skip repeats (e.g. 2/2, 2/4).
-
True or false, with a one-line reason: (a) every subset of Q is countable; (b) N×N×N is denumerable; (c) if A is uncountable and A⊆B, then B is uncountable.
-
Explain in one or two sentences why the “list all fractions” idea does not immediately list R. (What goes wrong that Lecture 19 will make precise?)
Suggested textbook exercises (Chartrand §11.1–11.2): 11.2, 11.4, 11.8, 11.10, 11.14, 11.18.