The Schroeder-Bernstein Theorem

Can two sets each fit inside one another without being the same size? Suppose AA injects into BB and BB injects into AA. Is ∣A∣=∣B∣|A|=|B| forced? This is exactly what happens for finite numbers, where m≤nm\le n and n≤mn\le m imply m=nm=n. This question sits at the foundation of Comparing Cardinalities. Without an answer, the relation "≤\le" on cardinal numbers would not even be a legitimate order. It would only be a preorder. The entire arithmetic of infinite sizes would collapse into ambiguity. The Schröder–Bernstein theorem answers this with a resounding yes. It does so constructively: from two injections f:A→Bf:A\to B and g:B→Ag:B\to A, it produces an explicit bijection between AA and BB. This is remarkable because the theorem requires no appeal to the Axiom of Choice. It also needs no comparison of "how many" elements are involved. It is a purely combinatorial argument about tracing chains of preimages back through ff and gg. The result matters because it converts a mere existence of injections in both directions into genuine equality of cardinality. This gives the antisymmetry law for cardinal comparison. Without it, statements like "∣N∣=∣Z∣|\mathbb{N}|=|\mathbb{Z}|" or "∣(0,1)∣=∣R∣|(0,1)|=|\mathbb{R}|" would need hand-crafted bijections every time. This is instead of the much easier task of exhibiting injections in each direction. This is precisely the technique used pervasively when working with Uncountable Sets and Cantor's Diagonal Argument. There, injections are cheap to construct but explicit bijections are often awkward. This article gives the precise statement and a complete rigorous proof. The proof uses the classical partition-into-chains method. It includes two fully worked examples with genuinely asymmetric maps. It also gives a counterexample showing why injectivity cannot be dropped. Finally, it discusses where the theorem sits in the broader landscape. That landscape leads toward Cardinal Arithmetic and the Power Set.

Key takeaways
  • If f:A→Bf:A\to B and g:B→Ag:B\to A are both injections, there is a bijection h:A→Bh:A\to B.
  • The proof is constructive: no Axiom of Choice is needed, unlike many other cardinality facts.
  • The classical proof partitions A⊔BA\sqcup B into "chains" traced backward through f,gf,g, and picks ff or g−1g^{-1} chain by chain.
  • This gives antisymmetry for the cardinal order ≤\le, turning it into a genuine partial order.
  • It is the standard tool for proving ∣A∣=∣B∣|A|=|B| by exhibiting two injections instead of one bijection.
  • Key idea: decompose the domain into disjoint trajectories under the two injections, and each trajectory tells you unambiguously which map to use.

Where this lives today

The theorem is the standard tool throughout mathematics whenever one wants to show two sets have the same cardinality but a direct bijection is inconvenient to write down. In real analysis, it is the cleanest route to showing ∣(0,1)∣=∣[0,1]∣=∣R∣|(0,1)| = |[0,1]| = |\mathbb{R}| and more generally that all nondegenerate intervals of R\mathbb{R} are equinumerous, feeding directly into discussions of Uncountable Sets and Cantor's Diagonal Argument where one needs to know the continuum has a single well-defined cardinality c\mathfrak{c} regardless of which interval or interval-type representative is used. In set theory and logic, Schröder–Bernstein is precisely what upgrades the preorder ⪯\preceq on cardinalities into the partial order underlying Cardinal Arithmetic and the Power Set, where facts like 2∣A∣=∣P(A)∣2^{|A|} = |\mathcal{P}(A)| and Cantor's theorem ∣A∣<∣P(A)∣|A| < |\mathcal{P}(A)| rely on having a clean, antisymmetric notion of cardinal comparison to state strict inequality meaningfully. In computer science, the theorem underlies arguments about the equivalence of data representations: showing two encodings of the same information (say, two different ways of serializing trees, or two numbering schemes for pairs of naturals as in the first worked example) have "the same information content" often reduces to producing injections each way rather than a single clean bijection, especially when the encodings are structurally very different. In descriptive set theory and computability theory, Borel and computable equivalents of Schröder–Bernstein (with "injection" replaced by "Borel injection" or "computable injection") are active tools for comparing the complexity of classification problems. In combinatorics, the theorem justifies "bijective-style" cardinality arguments even when only injections are visible, for instance comparing the sizes of two families of combinatorial objects (partitions, lattice paths, tilings) by exhibiting injections in both directions when a direct bijection is elusive — a technique sometimes called the "Schröder–Bernstein trick" in enumerative proofs.

Ask the tutor: Can you walk through why the backward-chain construction never gets stuck in a contradiction — that is, why every element really does fall into exactly one of the three types?

The Schröder–Bernstein Theorem

DefinitionCardinal comparison and the Schröder–Bernstein setup

Let AA and BB be sets. Write A⪯BA \preceq B ("AA has cardinality at most that of BB") if there exists an injection f:A→Bf:A\to B. Write A≈BA\approx B ("AA and BB are equinumerous," or ∣A∣=∣B∣|A|=|B|) if there exists a bijection h:A→Bh:A\to B. The Schröder–Bernstein Theorem states: if A⪯BA\preceq B and B⪯AB\preceq A, then A≈BA\approx B. Equivalently, in terms of maps: given injections f:A→Bf:A\to B and g:B→Ag:B\to A, there exists a bijection h:A→Bh:A\to B.

Intuition

Think of ff as embedding a copy of AA inside BB, and gg as embedding a copy of BB inside AA. Composing gives an injection g∘f:A→Ag\circ f: A\to A that embeds AA into itself, possibly missing some points of AA (those never hit by gg). The same happens on the BB side. Naively one might hope ff itself is already a bijection, but there is no reason for that — ff may miss huge parts of BB, with those gaps only reachable via g−1g^{-1}. The resolution is to sort every point of AA and every point of BB into one of three types of infinite (or finite) backward trajectories, obtained by alternately undoing gg and ff: keep pulling a point back along g−1g^{-1} then f−1f^{-1} then g−1g^{-1}, etc., as long as those preimages exist.

  • Trajectories that terminate in AA (an element of AA with no gg-preimage in BB, or rather whose chain traced backward dies at a point in AA not in the image of gg): call these AA-stoppers.
  • Trajectories that terminate in BB: call these BB-stoppers.
  • Trajectories that never terminate (they extend infinitely backward, or loop): call these infinite/cyclic chains.

On AA-stopper chains, ff turns out to biject the AA-part onto the BB-part of the chain. On BB-stopper chains and infinite chains, g−1g^{-1} (equivalently gg restricted the other way) does the job. Gluing these three pieces together yields a single bijection A→BA\to B.

Figure
Chains traced backward through f and g, sorted into three types
A-stopper chain: a₀ ∈ A has no g-preimage a₀ f(a₀) g(f(a₀)) blue = elements of A red = elements of B B-stopper chain: b₀ ∈ B has no f-preimage b₀ g(b₀) f(g(b₀)) Infinite chain: extends forever backward …never stops in either direction…

The central theorem

TheoremSchröder–Bernstein

Let AA and BB be sets. Suppose there exist injections

f:A→B,g:B→A.f: A \to B, \qquad g: B \to A.

Then there exists a bijection h:A→Bh: A \to B. Consequently A≈BA \approx B, i.e. ∣A∣=∣B∣|A| = |B|.

Proof

Proof technique: partition AA into three classes by tracing backward orbits under ff and gg, and define hh piecewise using ff on two classes and g−1g^{-1} on the third. We verify the partition is well-defined, the pieces are disjoint and exhaustive, and the resulting piecewise map is a well-defined bijection.

Step 1: Define backward chains. For a∈Aa\in A, define a (possibly infinite, possibly terminating) sequence of ancestors by alternately applying ff, then asking whether the result has a gg-preimage, and so on. Formally, we build a maximal sequence

…, a−2∈B, a−1∈A, a0=a,\dots,\ a_{-2}\in B,\ a_{-1}\in A,\ a_0 = a,

where a0=aa_0=a, and inductively, having defined a0,a−1,…,a−ka_0,a_{-1},\dots,a_{-k}:

  • if kk is even (so a−k∈Aa_{-k}\in A) and a−k=g(b)a_{-k} = g(b) for some b∈Bb\in B, set a−k−1:=ba_{-k-1}:=b (this bb is unique since gg is injective);
  • if kk is odd (so a−k∈Ba_{-k}\in B) and a−k=f(a′)a_{-k}=f(a') for some a′∈Aa'\in A, set a−k−1:=a′a_{-k-1}:=a' (unique since ff is injective);
  • otherwise (no such preimage exists), the sequence terminates at a−ka_{-k}.

Because f,gf,g are injective, at each stage the required preimage, if it exists, is unique, so this backward sequence is well-defined once aa is fixed — there is no ambiguity in how far back it goes or what the terms are. The sequence either terminates after finitely many steps at an element of AA with no gg-preimage (an "AA-stopper"), terminates at an element of BB with no ff-preimage (a "BB-stopper"), or continues indefinitely backward forever (an "infinite chain"). The same construction, started at b∈Bb\in B, is defined symmetrically and traces the same underlying bi-infinite (or terminating) sequence — every element of A∪BA\cup B occurring in it has the same backward chain regardless of which element of the chain we start from, since the recursion is deterministic in both directions where preimages exist.

Step 2: Classify elements by the type of their chain. Define, for a∈Aa\in A: aa is of type AA if its backward chain terminates at an element of AA (an AA-stopper); of type BB if its chain terminates at an element of BB (a BB-stopper); of type ∞\infty if its chain never terminates in either direction. Every element in the same backward chain gets the same type, because the type is a property of the whole chain, not of the particular starting point — the chain is a single object traced through all of …,a−2,a−1,a0\dots,a_{-2},a_{-1},a_0, and "where it stops" (if it stops) is intrinsic to it. Define the same three types for elements b∈Bb \in B, using the identical chain-tracing rule. Thus we obtain a partition

A=AA⊔AB⊔A∞,B=BA⊔BB⊔B∞,A = A_A \sqcup A_B \sqcup A_\infty, \qquad B = B_A \sqcup B_B \sqcup B_\infty,

where AAA_A = elements of AA of type AA, and similarly for the other five pieces. These are genuinely disjoint and exhaustive because "type" is a well-defined trichotomy: a chain terminates in AA, terminates in BB, or never terminates — exactly one of these three holds for any given chain, since termination point (if any) is unique by the uniqueness of preimages noted in Step 1.

Step 3: ff restricts to a bijection AA→BAA_A \to B_A. (ff maps AAA_A into BAB_A.) Let a∈AAa \in A_A. The chain of aa terminates at some a∗∈Aa^* \in A (with no gg-preimage). Consider f(a)∈Bf(a) \in B. The backward chain of f(a)f(a) is obtained by prepending f(a)f(a) to the chain of aa (since applying the chain-tracing rule to f(a)∈Bf(a)\in B asks for an ff-preimage, and aa is exactly that preimage, unique by injectivity of ff) — so the chain of f(a)f(a) is the same chain as that of aa, only shifted by one step, and it terminates at the very same a∗a^*. Hence f(a)f(a) has type AA, i.e. f(a)∈BAf(a)\in B_A. (Injective.) ff is injective on all of AA, hence in particular on AAA_A. (Surjective onto BAB_A.) Let b∈BAb\in B_A. Its chain terminates at some a∗∈Aa^*\in A with no gg-preimage. Since the chain does not terminate at bb itself unless bb has no ff-preimage — but if bb had no ff-preimage, the chain would terminate at b∈Bb\in B, contradicting b∈BAb \in B_A (type AA means it terminates in AA, not in BB; termination point is unique, so it cannot terminate at both). Hence bb does have an ff-preimage a∈Aa\in A with f(a)=bf(a) = b. By the argument above (chain of f(a)f(a) = chain of aa shifted), aa has the same chain type as bb, namely type AA, so a∈AAa \in A_A. Thus b=f(a)b = f(a) for some a∈AAa \in A_A, proving surjectivity. Hence f∣AA:AA→BAf|_{A_A} : A_A \to B_A is a bijection.

Step 4: gg restricts to a bijection BB→ABB_B \to A_B, hence g−1g^{-1} is a bijection AB→BBA_B \to B_B. This is symmetric to Step 3 with the roles of (A,f)(A,f) and (B,g)(B,g) interchanged. Concretely: for b∈BBb \in B_B, the chain terminates at some b∗∈Bb^*\in B with no ff-preimage; then g(b)∈Ag(b)\in A has the same chain (shifted), so g(b)∈ABg(b) \in A_B; gg is injective everywhere hence on BBB_B; and surjectivity onto ABA_B follows because any a∈ABa \in A_B must have a gg-preimage in BB (else its chain would terminate at a∈Aa\in A, contradicting type BB), and that preimage lies in BBB_B by the shift argument. Hence g∣BB:BB→ABg|_{B_B}: B_B \to A_B is a bijection, so its inverse

(g∣BB)−1:AB→BB(g|_{B_B})^{-1} : A_B \to B_B

is also a bijection.

Step 5: ff restricts to a bijection A∞→B∞A_\infty \to B_\infty. Let a∈A∞a \in A_\infty; its chain never terminates in either direction. As in Step 3, the chain of f(a)∈Bf(a) \in B is the same chain shifted by one, hence also never terminates, so f(a)∈B∞f(a) \in B_\infty. Thus f(A∞)⊆B∞f(A_\infty) \subseteq B_\infty, and ff is injective there since it is injective on all of AA. For surjectivity onto B∞B_\infty: let b∈B∞b \in B_\infty; since its chain never terminates, in particular it does not terminate at bb, so bb has an ff-preimage a∈Aa \in A (if it had none, the chain would stop at b∈Bb\in B). By the shift argument, aa's chain is the same infinite chain, so a∈A∞a \in A_\infty and f(a)=bf(a)=b. Hence f∣A∞:A∞→B∞f|_{A_\infty}: A_\infty \to B_\infty is a bijection.

Step 6: Assemble the global bijection. Define h:A→Bh: A \to B by

h(a)={f(a)if a∈AA,f(a)if a∈A∞,(g∣BB)−1(a)if a∈AB.h(a) = \begin{cases} f(a) & \text{if } a \in A_A, \\ f(a) & \text{if } a \in A_\infty, \\ (g|_{B_B})^{-1}(a) & \text{if } a \in A_B. \end{cases}

This is well-defined since AA,A∞,ABA_A, A_\infty, A_B partition AA (Step 2), so every a∈Aa\in A falls into exactly one case, with no conflict. Injectivity of hh. Suppose h(a1)=h(a2)h(a_1) = h(a_2). By Step 3 and Step 5, ff is injective on AA∪A∞A_A \cup A_\infty (indeed injective on all of AA), and by Step 4, (g∣BB)−1(g|_{B_B})^{-1} is injective on ABA_B being an actual function inverse. It remains to check no collision across the pieces: if a1∈AA∪A∞a_1 \in A_A \cup A_\infty and a2∈ABa_2 \in A_B with f(a1)=(g∣BB)−1(a2)f(a_1) = (g|_{B_B})^{-1}(a_2), then since f(a1)∈BA∪B∞f(a_1) \in B_A \cup B_\infty (images under Steps 3, 5) while (g∣BB)−1(a2)∈BB(g|_{B_B})^{-1}(a_2) \in B_B (Step 4), and BA,BB,B∞B_A, B_B, B_\infty are pairwise disjoint (Step 2), this is impossible unless no such pair exists — so equality across pieces cannot occur, and a1=a2a_1 = a_2 must come from the same piece, forcing a1=a2a_1=a_2 by injectivity within that piece. Surjectivity of hh. Given b∈Bb \in B, by Step 2, bb lies in exactly one of BA,BB,B∞B_A, B_B, B_\infty. If b∈BAb \in B_A, Step 3 gives a∈AAa \in A_A with f(a)=bf(a) = b, and then h(a)=f(a)=bh(a) = f(a) = b. If b∈B∞b \in B_\infty, Step 5 gives a∈A∞a \in A_\infty with f(a)=bf(a) = b, so h(a)=bh(a) = b. If b∈BBb \in B_B, then g(b)∈ABg(b) \in A_B by Step 4 (since g∣BBg|_{B_B} maps into ABA_B), and h(g(b))=(g∣BB)−1(g(b))=bh(g(b)) = (g|_{B_B})^{-1}(g(b)) = b. In every case bb is hit, so hh is surjective. Hence h:A→Bh: A \to B is a bijection, and A≈BA \approx B. ■\blacksquare

∎
CorollaryAntisymmetry of cardinal comparison

For all sets A,BA, B: if A⪯BA \preceq B and B⪯AB \preceq A, then A≈BA \approx B. Equivalently, the relation ∣A∣≤∣B∣|A| \le |B| (meaning A⪯BA\preceq B) is antisymmetric up to equinumerosity, making ≤\le a genuine partial order on cardinal numbers (once cardinals are taken as equivalence classes under ≈\approx).

Proof

Immediate restatement of the theorem: A⪯BA \preceq B means an injection f:A→Bf:A\to B exists, and B⪯AB\preceq A means an injection g:B→Ag:B\to A exists; the theorem produces a bijection h:A→Bh:A\to B, i.e. A≈BA\approx B. ■\blacksquare

∎

Worked examples

Example 1: ∣N∣=∣N×N∣|\mathbb{N}| = |\mathbb{N}\times\mathbb{N}| via two asymmetric injections, no explicit pairing function needed. Let A=N={0,1,2,… }A=\mathbb{N} = \{0,1,2,\dots\} and B=N×NB = \mathbb{N}\times\mathbb{N}. We build two injections that are not mirror images of each other, then apply Schröder–Bernstein rather than writing down the classical Cantor pairing bijection directly. Define f:N→N×Nf: \mathbb{N} \to \mathbb{N}\times\mathbb{N} by

f(n)=(n,0).f(n) = (n, 0).

This is injective: if f(n1)=f(n2)f(n_1)=f(n_2) then (n1,0)=(n2,0)(n_1,0)=(n_2,0) forces n1=n2n_1=n_2. Define g:N×N→Ng: \mathbb{N}\times\mathbb{N} \to \mathbb{N} by

g(m,n)=2m3n.g(m,n) = 2^m 3^n.

This is injective by uniqueness of prime factorization: if 2m13n1=2m23n22^{m_1}3^{n_1} = 2^{m_2}3^{n_2}, comparing exponents of the primes 22 and 33 in each factorization forces m1=m2m_1=m_2 and n1=n2n_1=n_2. Both ff and gg are highly asymmetric — ff hits only pairs with second coordinate 00, and gg hits only numbers of the form 2m3n2^m3^n (missing, e.g., 55, 66, 77, 1010, and most naturals). Neither is a bijection on its own. Schröder–Bernstein guarantees a bijection h:N→N×Nh:\mathbb{N}\to\mathbb{N}\times\mathbb{N} exists regardless. Let's trace the chain-classification concretely for a few elements to see the machinery work.

  • Take b=(1,1)∈Bb = (1,1) \in B. Does bb have an ff-preimage? ff's image is {(n,0):n∈N}\{(n,0): n\in\mathbb{N}\}, and (1,1)(1,1) is not of that form, so bb has no ff-preimage. Hence the chain starting at (1,1)(1,1) terminates immediately at (1,1)∈B(1,1)\in B: this is a BB-stopper, so (1,1)∈BB(1,1) \in B_B.
  • By Step 4 of the proof, we then use g−1g^{-1} near this element: g(1,1)=2131=6∈AB⊂Ng(1,1) = 2^1 3^1 = 6 \in A_B \subset \mathbb{N}, and indeed h(6):=(g∣BB)−1(6)=(1,1)h(6) := (g|_{B_B})^{-1}(6) = (1,1) provided 66's chain is confirmed type BB (traced backward: 6=g(1,1)6 = g(1,1), and (1,1)(1,1) has no ff-preimage as shown, so the chain from 66 is 6→(1,1)→6 \to (1,1) \to stop, terminating in BB; type BB confirmed).
  • Now take a=5∈Aa = 5 \in A. Trace backward: does 55 have a gg-preimage? We'd need 2m3n=52^m 3^n = 5, impossible since 55 is neither a power of 22 times a power of 33 (it's prime, not 22 or 33). So the chain starting at 55 terminates immediately at 5∈A5 \in A: an AA-stopper, type AA. By Step 3, h(5):=f(5)=(5,0)h(5) := f(5) = (5,0).
  • Take a=0a = 0: does 00 have a gg-preimage, i.e. is 0=2m3n0 = 2^m3^n for some m,n≥0m,n\ge0? No, since 2m3n≥12^m3^n \ge 1 always. So 00 is an AA-stopper too, and h(0)=f(0)=(0,0)h(0) = f(0) = (0,0).
  • Take a=12=22⋅3=g(2,1)a=12 = 2^2\cdot 3 = g(2,1): it does have a gg-preimage (2,1)(2,1). Continue the chain backward from (2,1)(2,1): does (2,1)(2,1) have an ff-preimage? Only pairs (n,0)(n,0) are in ff's image, and (2,1)(2,1) has second coordinate 1≠01\ne0, so no. Chain: 12→(2,1)→12 \to (2,1) \to stop in BB. Type BB, so h(12)=(g∣BB)−1(12)=(2,1)h(12) = (g|_{B_B})^{-1}(12) = (2,1).

This example shows the theorem is not just an abstract existence claim — the chain-tracing algorithm is fully explicit and computable here, even though f,gf,g were chosen with very different "shapes."

Example 2: ∣(0,1)∣=∣[0,1]∣|(0,1)| = |[0,1]|, a case with genuinely infinite chains. Let A=(0,1)A = (0,1) and B=[0,1]B=[0,1]. Define

f:(0,1)→[0,1],f(x)=xf: (0,1) \to [0,1], \qquad f(x) = x

(the inclusion, trivially injective), and

g:[0,1]→(0,1),g(y)=y+14∈[14,12]⊂(0,1),g: [0,1] \to (0,1), \qquad g(y) = \frac{y+1}{4} \in \left[\tfrac14, \tfrac12\right] \subset (0,1),

which is injective since it is a strictly increasing affine map (g(y1)=g(y2)⇒y1=y2g(y_1)=g(y_2) \Rightarrow y_1=y_2 directly from the formula). Note ff and gg are deliberately asymmetric in construction — one is the identity inclusion, the other a nontrivial affine contraction — unlike a "symmetric" pair such as f(x)=xf(x)=x, g(y)=yg(y)=y which wouldn't even be well typed here since (0,1)≠[0,1](0,1)\ne[0,1]. Trace chains. Consider y=1∈B=[0,1]y=1 \in B=[0,1]. Is 11 in the image of ff? Image of ff is (0,1)(0,1), and 1∉(0,1)1 \notin (0,1), so 11 has no ff-preimage: chain stops immediately at 11, type BB. Consider y=0∈By = 0 \in B. Same reasoning: 0∉(0,1)=im(f)0 \notin (0,1) = \mathrm{im}(f), so 00 has no ff-preimage. Type BB as well. Now trace g(1)=1+14=12∈Ag(1) = \frac{1+1}{4} = \frac12 \in A. Does 12\frac12 have a gg-preimage in BB? We need yy with y+14=12\frac{y+1}{4} = \frac12, i.e. y=1y = 1. Yes: 12=g(1)\frac12 = g(1). Continue backward from 11: as computed above, 11 has no ff-preimage, so the chain is

12→1→stop (in B).\tfrac12 \to 1 \to \text{stop (in } B\text{)}.

So 12∈A\frac12 \in A is type BB, meaning h(12)=(g∣BB)−1(12)=1h(\tfrac12) = (g|_{B_B})^{-1}(\tfrac12) = 1. Similarly g(0)=0+14=14g(0) = \frac{0+1}{4} = \frac14, and by the same logic 14∈A\frac14 \in A is type BB with h(14)=0h(\frac14) = 0. Now take x=310∈A=(0,1)x = \frac{3}{10} \in A = (0,1), a "generic" point outside [14,12][\frac14,\frac12]. Does it have a gg-preimage? We'd need y∈[0,1]y\in[0,1] with y+14=310\frac{y+1}{4} = \frac{3}{10}, i.e. y=1210−1=15y = \frac{12}{10}-1 = \frac15... let's actually solve: y=4⋅310−1=1210−1=15∈[0,1]y = 4\cdot\frac{3}{10} - 1 = \frac{12}{10}-1 = \frac{1}{5} \in [0,1]. So it does have a preimage, y=1/5y = 1/5. This means points near the edges of (0,1)(0,1) can still be reached by gg, and the chain continues: from y=1/5∈By=1/5\in B, does it have an ff-preimage? Yes, f(1/5)=1/5∈(0,1)f(1/5) = 1/5 \in (0,1) trivially since ff is inclusion and 1/5∈(0,1)1/5\in(0,1). Continue: from x=1/5∈Ax=1/5 \in A, does it have a gg-preimage? Solve y+14=15⇒y=45−1=−15∉[0,1]\frac{y+1}{4}=\frac15 \Rightarrow y = \frac45 - 1 = -\frac15 \notin [0,1]. No preimage — chain stops at 1/5∈A1/5 \in A. So the full chain is

310→15→stop (in A),\tfrac{3}{10} \to \tfrac15 \to \text{stop (in }A\text{)},

type AA, and h(3/10)=f(3/10)=3/10h(3/10) = f(3/10) = 3/10. Generic points of (0,1)(0,1) that are never expressible as iterates landing in [14,12][\frac14,\frac12]-type preimage chains from 00 or 11 will be type AA and map via ff (identity); only the countably many points in the specific backward orbit of {0,1}\{0,1\} under gg then f−1f^{-1} (namely 1,12,151,\frac12,\frac15's preimage chain, etc.) are type BB and get redirected via g−1g^{-1}. The resulting hh is an explicit, computable bijection (0,1)→[0,1](0,1)\to[0,1] built entirely from these two very different-looking injections.

CounterexampleWhy both maps must be injective

Drop injectivity of gg (weakening one hypothesis) and keep everything else. Let A={1,2}A = \{1,2\} and B={1,2,3}B=\{1,2,3\}. Define f:A→Bf: A \to B by f(1)=1,f(2)=2f(1)=1, f(2)=2 — this is injective, so A⪯BA \preceq B genuinely holds. Define g:B→Ag: B \to A by g(1)=1, g(2)=1, g(3)=2g(1)=1,\ g(2)=1,\ g(3)=2 — this is not injective, since g(1)=g(2)=1g(1)=g(2)=1. But gg is still a perfectly good function B→AB\to A, and in fact it is surjective, which might tempt one to think "BB maps onto AA, so surely ∣B∣≥∣A∣|B|\ge|A| still holds and by some symmetric argument A≈BA\approx B." However ∣A∣=2≠3=∣B∣|A|=2 \ne 3 = |B|, so no bijection A→BA\to B can possibly exist — the conclusion of Schröder–Bernstein genuinely fails here. The point is that gg existing as some function B→AB\to A (even a surjection) does not give B⪯AB \preceq A in the required sense; the theorem's hypothesis is specifically that gg is injective, i.e. B⪯AB\preceq A via gg, not merely that a function B→AB \to A exists. Confusing "there is a function g:B→Ag:B\to A" with "B⪯AB\preceq A" is exactly the gap this counterexample exposes: surjections and injections point in opposite directions for cardinal comparison, and swapping them silently breaks the theorem. This also shows finiteness doesn't save you: for finite sets, A⪯BA\preceq B and B⪯AB\preceq A (correctly, via injections both ways) does force ∣A∣=∣B∣|A|=|B|, consistent with Schröder–Bernstein; but the malformed argument above (using a non-injective gg) is precisely the wrong hypothesis, and dropping injectivity is what breaks it, as the mismatched cardinalities 2≠32\ne3 confirm.

Scope, edge cases & common traps

SituationWhat holdsCommon error
f,gf, g both injectiveTheorem applies; bijection hh existsAssuming ff or gg itself must already be the bijection
ff injective, gg only surjectiveTheorem does not apply as statedTreating "BB surjects onto AA" as equivalent to "B⪯AB\preceq A"
A,BA, B finiteClassical fact ∣A∣≤∣B∣,∣B∣≤∣A∣⇒∣A∣=∣B∣|A|\le|B|,|B|\le|A|\Rightarrow|A|=|B| recovered as a special caseThinking the theorem is only interesting/only true for infinite sets
AA or BB emptyTrivial: if A=∅A=\varnothing then A⪯BA\preceq B vacuously and B⪯AB\preceq A forces B=∅B=\varnothingForgetting to check degenerate cases separately in a general proof
Chains that are literally infinite in both directionsAssigned type ∞\infty, handled by ff (Step 5)Assuming every chain must terminate somewhere
Composition g∘fg\circ f or f∘gf \circ gNeed not be surjective on its ownBelieving g∘f:A→Ag\circ f: A\to A injective automatically forces it to be onto AA

The mathematician behind it

Origins · 1 minFelix Bernstein and how this was discovered
FB
Felix Bernstein
1878–1956 · German mathematician and geneticist, doctoral student of Georg Cantor and David Hilbert's circle at Göttingen

Felix Bernstein proved the theorem as a young student in 1897, at around age 19, while attending Cantor's lectures in Halle. Ernst Schröder had earlier announced a proof (1896) that turned out to be flawed, and Cantor himself had stated the result and sketched an argument relying on the (then-unjustified) well-ordering of cardinals, effectively assuming a form of the Axiom of Choice. Bernstein's contribution was a genuinely choice-free, combinatorial proof, communicated to Cantor and later published with credit shared among Cantor, Schröder, and Bernstein — hence the theorem's several names: Schröder–Bernstein, Cantor–Schröder–Bernstein, or occasionally Cantor–Bernstein. Bernstein went on to a career spanning mathematics, statistics, and human genetics, including foundational work on blood type inheritance.

History
- 1887: Georg Cantor states a version of the comparability principle for cardinalities in correspondence, without a complete choice-free proof.
- 1895–1896: Ernst Schröder announces a proof of the theorem; it is later found to contain a gap.
- 1897: Felix Bernstein, then a student under Cantor at Halle, produces the first complete, choice-free proof using the chain-decomposition method.
- 1898: Émile Borel independently publishes a proof, sometimes leading to the name Cantor–Bernstein–Schröder–Borel in some traditions.
- 1908: Ernst Zermelo gives a proof within his axiomatization of set theory, cementing the theorem's place as a foundational, choice-independent result.
Does Schröder–Bernstein require the Axiom of Choice?

No. This is one of its most notable features: the chain-decomposition proof given here is fully constructive and choice-free. Every step — tracing a backward chain, classifying it as type AA, type BB, or type ∞\infty, and choosing ff or g−1g^{-1} accordingly — is determined by the structure of ff and gg themselves, with no arbitrary selection required. This contrasts with many other cardinality facts, such as "every two cardinals are comparable" (trichotomy for cardinals), which genuinely does require some form of the Axiom of Choice. Historically, Cantor's original argument for Schröder–Bernstein implicitly used well-ordering (a choice-dependent fact), and it was precisely Bernstein's contribution to remove that dependency.

Is the bijection h produced by the proof unique?

No, and it need not be. The theorem only asserts existence of some bijection A→BA\to B; there can be, and typically are, many different bijections between AA and BB once ∣A∣=∣B∣|A|=|B| is established, especially for infinite sets. The specific hh constructed by the chain-decomposition method depends on the particular ff and gg chosen — different injections f,gf,g realizing the same A⪯B,B⪯AA\preceq B, B\preceq A facts will in general yield different bijections hh. Uniqueness is never claimed or needed; only existence matters for concluding ∣A∣=∣B∣|A|=|B|.

Can the theorem fail for proper classes instead of sets?

The theorem as stated is about sets, and set-theoretic tools like partitioning A∪BA\cup B into chains work cleanly at that level. For proper classes (collections too large to be sets, such as the class of all ordinals), the usual formal apparatus of functions-as-sets-of-pairs and injections needs care, since a "function" between proper classes is itself typically a class-sized entity requiring extensions of ZFC (like NBG or MK class theory) to discuss rigorously. Analogues of Schröder–Bernstein for well-orderable proper classes can be formulated in such extended systems, but the classical statement and proof are for sets, and that is the standard setting in which the theorem is used.

How does this relate to comparing |A| ≤ |B| as a linear order?

Schröder–Bernstein gives antisymmetry: A⪯BA\preceq B and B⪯AB\preceq A imply A≈BA\approx B. Reflexivity (A⪯AA\preceq A via the identity map) is trivial. Transitivity (A⪯BA\preceq B and B⪯CB\preceq C imply A⪯CA\preceq C) follows because a composition of injections is injective. Together these three facts make ⪯\preceq (descending to cardinal numbers, i.e. equivalence classes under ≈\approx) a genuine partial order. Full comparability — that for any A,BA,B either A⪯BA\preceq B or B⪯AB\preceq A — is a separate, stronger fact that does require the Axiom of Choice (via well-ordering), so ≤\le on cardinals is only guaranteed to be a linear order once choice is assumed.

Why can't we just directly build the bijection from f and g without the chain argument?

In general ff and gg individually are far from bijective — ff might miss most of BB, and gg might miss most of AA — so there is no shortcut that avoids some case analysis. The chain-decomposition method is the standard way to make the case analysis rigorous and choice-free: it identifies, for every single point, an unambiguous rule (use ff, or use g−1g^{-1}) based on the intrinsic structure of how that point's backward orbit behaves under alternating preimages. Alternative proofs exist (e.g. via the Knaster–Tarski fixed-point theorem applied to a suitable monotone set operator), but they are essentially reformulations of the same underlying idea of splitting AA into a "stable" region handled by ff and a "leftover" region handled by g−1g^{-1}.

Does the theorem tell us anything when A and B are both finite?

Yes, though in that setting it recovers something already intuitively obvious: if ∣A∣=m|A|=m, ∣B∣=n|B|=n are finite and there are injections both ways, then m≤nm\le n and n≤mn\le m as natural numbers, forcing m=nm=n, and hence any bijection between two finite sets of equal size exists trivially (list elements and pair them up). The genuine content and historical importance of the theorem is entirely in the infinite case, where "m≤nm\le n and n≤mn\le m imply m=nm=n" is far from obvious and cannot be checked by direct counting.

What's a quick way to remember the proof idea?

Picture every point as sitting at the end of a backward trail formed by alternately undoing gg then ff. Three things can happen to a trail: it dead-ends on the AA side, it dead-ends on the BB side, or it runs forever without dead-ending. On an AA-dead-end trail, follow ff forward; on a BB-dead-end trail or an endless trail, follow gg backward (i.e., use g−1g^{-1}). Every point falls into exactly one of these three trail-types, so this rule assigns each point of AA a definite image in BB with no overlaps and no gaps — that assignment is the desired bijection.

Before this

Where this leads