On this page
Two sets have the same size when you can pair every element of one with exactly one element of the other. For infinite sets that pairing can be fiendish to write down, and the Cantor–Schröder–Bernstein theorem lets you skip it: two one-way maps are enough.
What does the Cantor–Schröder–Bernstein theorem say?
An injection (a one-one function) sends different inputs to different outputs; a bijection is a function that is both one-one and onto. If these words feel rusty, our key terms for relations and functions post covers them.
The theorem: if f: A → B and g: B → A are both injective, then there is a bijection h: A → B, as stated in the Schröder–Bernstein theorem article. In the language of sizes, |A| ≤ |B| and |B| ≤ |A| together give |A| = |B|.
According to the same article's history section, Cantor published the theorem without proof in 1887. Richard Dedekind proved it that year but never published his proof. Felix Bernstein, a 19-year-old student in Cantor's seminar, presented a proof in 1897; Ernst Schröder's proof from the same time turned out to be flawed. The proof below does not need the axiom of choice.
How does the chain-following proof work?
This version is attributed to Julius König (1906), as the theorem's article explains. Treat A and B as separate sets, even if they overlap.
Pick any element. Walk forward: apply f if you are in A, g if you are in B.
Walk backward: apply g⁻¹ if you are in A, f⁻¹ if you are in B, for as long as a preimage exists.
Because f and g are injective, each element lies on exactly one chain, so the chains split A and B into separate pieces.
Every chain is one of four kinds:
A-stopper: walking backward ends at an element of A that g never hits. Pair along the chain with h = f.
B-stopper: walking backward ends at an element of B that f never hits. Pair with h = g⁻¹.
Doubly infinite: the chain never ends in either direction. Either rule works.
Cyclic: the chain loops back on itself. Either rule works.
Do this on every chain and glue the pieces together: that is h.
Worked example: a bijection between [0,1] and [0,1)
Take A = [0,1] and B = [0,1). Two injections are easy:
f(x) = x/2 sends [0,1] into [0,1/2], which sits inside [0,1).
g(y) = y sends [0,1) into [0,1].
Neither is onto. Now follow the chains.
What does g miss in A? Only the point 1. Its chain is 1 → 1/2 → 1/2 → 1/4 → 1/4 → ..., alternating between A and B. It starts in A, so it is an A-stopper and h = f: h(1) = 1/2, h(1/2) = 1/4, h(1/4) = 1/8, and so on.
What does f miss in B? Everything in (1/2, 1). For any other x > 0 that is not a power of 1/2, walking backward means doubling: x, 2x, 4x, .... The values land in (1/2, 1) without hitting exactly 1, so this is a B-stopper and h = g⁻¹, which means h(x) = x.
The point 0 gives the cyclic chain 0 → 0 → 0, so h(0) = 0.
So the bijection is: h(x) = x/2 when x is 1, 1/2, 1/4, 1/8, ..., and h(x) = x otherwise. Check it: 1/2, 1/4, 1/8, ... are each hit exactly once, every other point of [0,1) is hit by itself, and 1 is never needed.
How does the theorem prove |R| = |P(N)|?
The cardinality of the continuum article proves that the reals and the subsets of N have the same size by giving one-to-one maps in both directions and applying this theorem. Here are the two maps, taking N = {1, 2, 3, ...}.
P(N) into R. Send a set S to the decimal 0.d₁d₂d₃... with dₙ = 1 if n is in S and 0 otherwise. The even numbers go to 0.0101... = 1/99. Decimals made only of 0s and 1s have no trailing 9s, so two different sets give two different numbers.
R into P(N). Send x to the set of rationals below it. Between two different reals lies a rational, so different reals give different sets. List the rationals as q₁, q₂, q₃, ... and replace each qₙ by its index n to get a set of natural numbers.
Two injections, so |R| = |P(N)|. An explicit bijection is messy because some reals have two binary expansions, such as 0.1000... and 0.0111... (both equal 1/2); the theorem skips that bookkeeping. The same uncountable size turns up in the Cantor set, which has uncountably many points.
A checklist for using the theorem
Write an injection f: A → B and check that f(a) = f(a') forces a = a'.
Do the same for an injection g: B → A. Neither needs to be onto.
If you must exhibit h, list what g misses in A and what f misses in B, then follow the chains.
For pairing arguments in counting problems, see how to count using a bijection. If one-one, onto or countable sets still feel shaky, the Fermi Concept Library covers every concept in mathematics, and the Fermi Problem Library has a step-by-step solver that explains the reasoning.
![Two number lines pairing [0,1] with [0,1) by halving powers of one half](https://news.fermi.ai/media/images/2026/11/two-number-lines-pairing-0-1-with-0-1-by-halving-powers-of-o-3283d6af-1600x900.webp)


