LightMySky
En anglais

Countable and Uncountable Sets

Compare infinite sets by pairing their elements. The rationals pair with the naturals; the reals do not, and the diagonal argument shows why.

No account needed. Progress saves in this browser.

What a learner can do afterwards

  • Build an explicit bijection showing a set is countable
  • Present the diagonal argument for the reals
  • Explain why a finite set cannot pair with a proper subset, and why the power set of N is uncountable

1 · Read

Use N={1,2,3,...}. Here, countable means finite or admitting a sequence that covers every member. Countably infinite means having a bijection with N. A bijection is both injective, so distinct inputs have distinct outputs, and surjective, so every target is reached. A finite set is countable but cannot have a bijection with the infinite set N.

Let E={2,4,6,...}. The function f(n)=2n pairs N with E. Equal outputs 2a=2b force a=b, proving injectivity. Every e in E has the natural-number preimage e/2, proving surjectivity. Thus f is a bijection. For example, 6 maps to 12. Dividing by 2 gives the inverse pairing.

1 -> 22 -> 43 -> 64 -> 8...
These are the first four pairs. The formula n -> 2n defines the pairing for every n in N.

List the integers as 0,1,-1,2,-2,3,-3,... . Position 1 holds 0. For positive k, position 2k holds k and position 2k+1 holds -k. This reaches every integer exactly once, so the integers are countably infinite.

01-12-23-3...

For positive rationals, scan p/q with positive integers p,q by increasing p+q, then increasing p within each total. Skip values already listed. Each total has finitely many pairs, so every fraction is reached. For instance, 4/2 is skipped once 2 has appeared. Put 0 first, then each retained positive value followed by its negative, to list all rationals.

p+q = 2p+q = 3p+q = 4...

A proper subset leaves out at least one member of its whole set. If a finite set has m members, its proper subset has fewer than m. A bijection cannot pair these unequal finite counts. Infinite sets can behave differently: E is a proper subset of N, yet doubling pairs E with all of N.

This finite example illustrates the counting argument; the argument applies to every finite size m.

Imagine a full hotel with rooms 1,2,3,... . Moving every guest from room n to n+1 frees room 1. There is no last room. To take countably many newcomers, instead move current guest n to room 2n and newcomer k to room 2k-1. Even and odd rooms never overlap. For odd room r, its newcomer number is (r+1)/2. A full finite hotel cannot add a guest without sharing or removing someone.

current n -> room 2nnewcomer k -> room 2k-1

The interval (0,1) contains the reals strictly between 0 and 1. Decimal expansions need care: 0.3999... equals 0.4000... . Different digit strings can name the same number. For each listed real, use its expansion without an endless tail of 9s.

0.3999...= 0.4000...

Given rows r1,r2,r3,..., construct d=0.d1d2d3... . For digit dn, inspect digit n of row rn. Write 2 if that digit is 1; otherwise write 1. For rows beginning 0.414..., 0.381..., 0.671..., the diagonal is 4,8,1, so d begins 0.112... . Later rows determine later digits.

r1: 0.414...r2: 0.381...r3: 0.671...diagonal: 4,8,1new digits: 1,1,2

Suppose the rows list every real in (0,1), using the decimal convention above. The constructed d uses only 1s and 2s, so it lies in (0,1) and has no alternate terminating expansion. For every n, d differs from rn at position n. Thus the list misses d. This works for every proposed list, so no surjection from N onto (0,1) exists. The interval, and hence the reals, is uncountable.

choose any row ndigit n differsd != r_n

Apply the same digit rule to a complete list of rationals in (0,1), again using expansions without a tail of 9s. It constructs a real d in the interval that is absent from the list. Since every rational there is listed, d must be irrational. Constructing decimal digits does not guarantee a rational result.

The power set P(A) contains all subsets of A, including the empty set and A itself. For finite A with m members, each member can be included or excluded, giving 2^m subsets. Requiring one specified member to be included leaves m-1 choices, giving 2^(m-1) subsets. For {u,v,w}, requiring u leaves two choices each for v and w.

u: includedv: in or outw: in or out2 x 2 = 4 subsets

For any function f:N -> P(N), define D={n in N: n is not in f(n)}. This is a subset of N. For every k, membership of k in D is opposite to membership of k in f(k). Thus D differs from every output f(k). No function from N can reach every subset of N, so P(N) is uncountable.

k in f(k): k not in Dk not in f(k): k in D

A proposed list can miss subsets even when its outputs keep growing. The function f(n)={1,2,...,n} reaches every nonempty finite initial segment of N. Every output contains 1, so it misses the subset {3}. One missed target disproves surjectivity.

f(1) = {1}f(2) = {1,2}every output contains 1{3} excludes 1

Every infinite subset of N is countably infinite. Repeatedly choose its least unused member to list it increasingly. The process never runs out. Any member a has at most a-1 smaller naturals, so only finitely many members can come before it. It is therefore reached. No member is repeated or missed.

least unused memberrepeat in increasing ordereach member is reached

Countable sets are finite or listable. Bijections compare sizes. A safe decimal diagonal defeats real-number listings; opposite membership defeats listings of all subsets of N.

This lesson, its questions and its flashcards were written for this dataset.

These readings, extra questions and flashcards were written for this dataset.

More to read

Checking that a listing covers its set

An infinite sequence is not automatically a complete listing of a proposed set. Each member must occur at a finite position. Under the convention used here, finite sets are also countable. A countably infinite set has a listing without repeats whose positions pair with N={1,2,3,...}.

For integers, alternate signs after zero: 0,1,-1,2,-2,... . Positive k has position 2k; negative -k has position 2k+1.

For positive rationals, process fractions p/q in groups with a fixed total p+q. Increase the total one at a time, and increase p within each group. Every group is finite. A particular fraction therefore cannot be postponed forever. Retain each numerical value only at its first appearance, so equivalent fractions do not receive separate positions.

Including zero and following each positive value with its negative then covers all rationals.

Why the decimal diagonal proof works

Suppose a sequence claims to contain every real strictly between zero and one. Write its entries as decimal rows. Choose expansions without an endless tail of 9s, because 0.3999... and 0.4000... name the same number despite having different digits.

Construct a new decimal using only the digits 1 and 2. At position n, inspect the nth digit of the nth row. If it is 1, write 2. Otherwise write 1. The resulting decimal represents a real in the required interval and has no alternate terminating expansion.

Choose any row index n. At position n, that row and the constructed decimal disagree. They therefore represent different numbers. Since this reasoning applies to every row index, the new real is absent from the sequence.

Showing three rows explains the calculation but does not complete the proof. The conclusion depends on the comparison for every positive n, and it applies to every proposed complete listing.

Comparing a set with its subsets

A finite proper subset has fewer members than its whole set, preventing a bijection between them. Infinite sets need separate reasoning. Doubling pairs the positive naturals with the positive evens, even though every positive odd number is omitted from the target.

The power set P(A) is the set of all subsets of A. For a finite set, decide separately whether each member is included. With m members, these choices give 2^m subsets.

For P(N), suppose f assigns a subset of N to each natural number. Form D by including n exactly when n is absent from f(n). At each index k, D and f(k) disagree about membership of k. Thus D is a subset that f never reaches.

The argument rules out every proposed surjection from N onto P(N). The missing subset is constructed by deciding, for each n, whether n belongs to f(n) and reversing that answer.

2 · Watch

En anglais

Take it off screen

Print a worksheetA4 with an answer key page for grown-ups. No screen, no internet.

Where it sits

Where this leads

Jobs that lean on this skill. Follow one to see everything it is built on.

Then practise

18 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.

Spotted a problem on this page? Tell us
Countable and Uncountable Sets · Mathematics, ages 18 to 19 · LightMySky