Countable vs Uncountable

See the rationals numbered in a single list. Then see the same attempt fail for the reals.

Countable means pairing off with the natural numbers. Fractions tile a grid, and a zigzag count numbers them all. Reals refuse. Every proposed list misses some real. Changing digits along the diagonal proves it.

For example, hand number tickets to every 🧑 classmate. However long the line, one ticket each means countable. If every roster still misses someone, the crowd cannot be counted.

Q={q1,q2,… }\mathbb{Q} = \{q_1, q_2, \dots\}
(0,1) is uncountable(0,1) \text{ is uncountable}

Part of these learning paths

Examples & Exercises

Prove Z\mathbb{Z} is countable via the explicit enumeration 0,1,−1,2,−2,…0, 1, -1, 2, -2, \dots.

a0=0,a2k−1=k,a2k=−k  (k≥1)a_0 = 0,\quad a_{2k-1} = k,\quad a_{2k} = -k\ \ (k \geq 1)
The same diagonal idea as the rationals — starting with the integers.
Show proof
  1. With a0=0a_0 = 0, a2k−1=ka_{2k-1} = k and a2k=−ka_{2k} = -k for k≥1k \geq 1, every integer appears (surjectivity): m=0m = 0 as a0a_0, m≥1m \geq 1 as a2m−1a_{2m-1}, and m<0m < 0 as a−2ma_{-2m}.

    Injectivity (exactly once) also needs an argument: the index classes {0}\{0\}, {2k−1:k≥1}\{2k-1 : k \geq 1\} (odd indices), and {2k:k≥1}\{2k : k \geq 1\} (even positive indices) are pairwise disjoint and cover all indices.

    Their value ranges {0}\{0\}, the positive integers, and the negative integers are likewise disjoint, and within each class kk is uniquely recovered from the value (k=mk = m or k=−mk = -m).

    Hence distinct indices give distinct values.

  2. Hence n↦ann \mapsto a_n is a bijection N→Z\mathbb{N} \to \mathbb{Z}, so Z\mathbb{Z} is countable.

Prove (0,1)(0,1) is uncountable by Cantor's diagonal argument.

dn={5rn’s nth digit≠56otherwise(dn is the nth digit of x)d_n = \begin{cases} 5 & r_n\text{'s }n\text{th digit} \ne 5 \\ 6 & \text{otherwise} \end{cases} \qquad (d_n \text{ is the } n\text{th digit of } x)
The flipped diagonal cannot be anywhere in the list.
Show proof
  1. Suppose the elements of (0,1)(0,1) could be fully enumerated as r1,r2,…r_1, r_2, \dots. Each rnr_n has a unique decimal expansion not ending in infinite 99s, so its nn-th digit is well defined.

  2. Define the nn-th digit dnd_n of xx to be 55 when rnr_n's nn-th digit is not 55, and 66 otherwise.

    Then x∈(0,1)x \in (0,1).

    To pass from a digit difference to x≠rnx \ne r_n the dual-expansion issue must be addressed: the expansion of xx uses only the digits 55 and 66, so it has no tail of 00s and no tail of 99s.

    But two decimal expansions of the same number are possible only when one ends in a tail of 00s and the other in a tail of 99s, so an expansion using only 5,65, 6 is the unique — canonical — expansion of xx.

    It differs from the canonical expansion of rnr_n at digit nn, hence x≠rnx \ne r_n for every nn — a contradiction.

  3. Hence no enumeration of (0,1)(0,1) exists: (0,1)(0,1) is uncountable.

Explain at idea level why a countable union of countable sets is countable, via diagonal enumeration.

(Idea level; full proof omitted.)

n=64n=64: the same diagonal sweep of the grid.
Show hint
  1. [Sketch] Arrange A1,A2,…A_1, A_2, \dots as the rows of a grid.

    Choose an enumeration of each AiA_i in advance (countable choice): skip rows with AiA_i empty.

    Pad each finite AiA_i to an infinite row by repeating one fixed element (padding — duplicates are removed afterwards, or the construction is read as a surjection from N×N\mathbb{N} \times \mathbb{N} rather than an injection).

    With every row now infinite, sweeping the grid in diagonal order — exactly as for the rationals — every element shows up at some finite diagonal position.

  2. [Sketch] This is an idea-level explanation; the full proof needs care with duplicate elements.

2. Number Systems