Logic

Two injections make a bijection

If each of two collections fits inside the other without collisions, they are the same size. That sounds obvious and is not, because neither injection needs to be onto — and the proof is a rule for deciding which of the two to follow, one chain at a time.

Worth reading first: The row that is not on the list.

Two collections. Each fits inside the other with nothing landing on top of anything else. Are they the same size?

For finite collections the answer is yes and the reason is counting: if AA fits inside BB then AA is no larger, and if BB fits inside AA then BB is no larger, so they are equal. Take away the counting and the argument goes with it, because fits inside no longer implies no larger in any sense that can be subtracted.

The answer is still yes. The proof is a construction, and the construction is a decision about which of the two maps to follow.

A closed interval and an open one, matched point for pointTwo number lines, one closed and one open, with arrows showing the countable sequence of points that has to move.[0, 1](0, 1)01½0 goes to a half and 1/n goes to 1/(n+2); every other point of [0, 1] stays where it is8 moved points drawn, all distinct, all inside (0, 1) — and the two endpoints are gone
Fig. 1 The closed interval [0,1][0,1] and the open interval (0,1)(0,1), matched point for point. Almost every point stays where it is; a single infinite sequence shuffles along to absorb the two missing endpoints. Every moved point is checked for landing strictly inside, all the images are checked distinct, and every point that has to be reached is checked to be reached.

The example that shows what is at stake

[0,1][0,1] contains (0,1)(0,1), so the inclusion is an injection one way. And (0,1)(0,1) contains a copy of [0,1][0,1] — send xx to (x+1)/3(x+1)/3, which lands in [1/3,2/3][1/3, 2/3] — so there is an injection the other way. Both are injections and neither is onto.

The two intervals differ by exactly two points. That is as small a difference as a difference can be, and it is enough to make the obvious approach fail: there is no continuous bijection between them, and no bijection that moves only finitely many points, because removing two points from a finite set changes its size and nothing can put them back.

What works is moving infinitely many points a little. Send 00 to 1/21/2; send 11 to 1/31/3; send 1/21/2 to 1/41/4; send 1/31/3 to 1/51/5; and in general send 1/n1/n to 1/(n+2)1/(n+2). Everything else stays exactly where it is.

Count what has happened. The sequence 0,1,1/2,1/3,1/4,0, 1, 1/2, 1/3, 1/4, \dots has been shifted two places along itself, so its first two entries — the two endpoints — have been vacated, and every entry has somewhere to come from. The two extra points were absorbed by an infinite queue shuffling up.

That is the whole trick, and it is Hilbert’s hotel applied to a set with an accumulation point rather than to rooms.

A closed interval and an open one, matched point for pointTwo number lines, one closed and one open, with arrows showing the countable sequence of points that has to move.[0, 1](0, 1)01½0 goes to a half and 1/n goes to 1/(n+2); every other point of [0, 1] stays where it is6 moved points drawn, all distinct, all inside (0, 1) — and the two endpoints are gone
Fig. 2 The same interval bijection with fewer terms drawn, so the first moves are readable: 00 crosses to a half, 11 to a third, and each 1/n1/n shifts two places along the sequence it belongs to.

The general theorem

Cantor–Schröder–Bernstein. If there is an injection ABA \to B and an injection BAB \to A, there is a bijection between AA and BB.

The theorem is not obvious and it is not deep, and the gap between those two descriptions is where the interest is.

It is not obvious because the two injections have nothing to do with each other. Neither is onto, so neither can simply be inverted; and there is no reason for the compositions to be anything convenient. The proof has to build a third map out of the two.

It is not deep because the construction is short, uses no machinery, and works uniformly.

The chains

Here is the construction. Draw AA and BB as two rows, with an arrow from each aa to f(a)f(a) and from each bb to g(b)g(b).

Two injections shifted by 2 and 3, and the chains they cutTwo rows of dots with arrows for each injection, coloured by which chain each element belongs to.AB001122334455667788left to right adds 2, right to left adds 3; neither is onto and both are one-to-one5 chains in the window, and the assembled map is one-to-one on all of it
Fig. 3 Two rows with two injections between them: left to right adds 2, right to left adds 3. Neither map is onto — the first two positions on the right and the first three on the left are never hit — and the colours are the chains the two maps cut the picture into.

Now trace backwards from any element. Who maps to it? Since both maps are injections, the answer is at most one thing, so tracing backwards is deterministic: from bb go back to the unique aa with f(a)=bf(a) = b if there is one, from aa go back to the unique bb with g(b)=ag(b) = a if there is one, and stop when there is nothing.

Every element therefore sits on exactly one chain, alternating between the two sides, and each chain is of one of four kinds:

  • it starts in AA, at an element not in the image of gg;
  • it starts in BB, at an element not in the image of ff;
  • it goes back forever, with no start at all;
  • it closes into a cycle.

Now build the bijection chain by chain. On an AA-starting chain, use ff. On a BB-starting chain, use gg backwards. On the other two kinds, either works.

That is it. On an AA-starting chain, ff is a bijection between the chain’s AA-part and its BB-part, because the chain has no unmatched BB-element — anything unmatched by ff would have been a start. On a BB-starting chain, gg backwards does the same job for the mirror-image reason. Chains partition everything, so the pieces fit together into a bijection on the whole.

Two injections shifted by 1 and 3, and the chains they cutTwo rows of dots with arrows for each injection, coloured by which chain each element belongs to.AB001122334455667788991010left to right adds 1, right to left adds 3; neither is onto and both are one-to-one4 chains in the window, and the assembled map is one-to-one on all of it
Fig. 4 The same construction with different shifts. Different chains, same argument — and the generator asserts what the argument needs: that each element lies on exactly one chain, and that the assembled map sends no two elements to the same place.
Two injections shifted by 2 and 4, and the chains they cutTwo rows of dots with arrows for each injection, coloured by which chain each element belongs to.AB001122334455667788left to right adds 2, right to left adds 4; neither is onto and both are one-to-one6 chains in the window, and the assembled map is one-to-one on all of it
Fig. 5 Shifts of two and four. The chains are longer and there are fewer of them, and the rule for building the bijection does not change — which is the property that makes the construction a proof rather than a case analysis.

Why the chains are needed at all

A reader may reasonably ask why the bijection cannot simply be ff, or gg backwards, or some patched-together mixture chosen by hand.

ff alone fails because it is not onto: the elements of BB outside its image are missed. gg backwards alone fails for the same reason on the other side. So a mixture is required, and the question is where to switch.

The chains answer that question, and the answer is that the switch has to be decided globally, not locally. Whether to use ff at a particular element depends on where the backward trace from it eventually stops, and that can be arbitrarily far away. There is no way to look at an element and its immediate neighbours and decide.

That is the content of the proof, and it is the reason the theorem needs a proof at all. Finite intuition suggests a matching can be built greedily; here it cannot, and the chain decomposition is what replaces greediness with a rule that is guaranteed consistent.

A closed interval and an open one, matched point for pointTwo number lines, one closed and one open, with arrows showing the countable sequence of points that has to move.[0, 1](0, 1)01½0 goes to a half and 1/n goes to 1/(n+2); every other point of [0, 1] stays where it is11 moved points drawn, all distinct, all inside (0, 1) — and the two endpoints are gone
Fig. 6 The interval bijection again with more of the sequence drawn. The shuffle is not a finite repair extended a bit further — it uses every term, forever, and there is no point past which the map settles down to the identity.

The four kinds of chain, and where each occurs

The classification has four cases and the interval example uses two of them, which is worth spelling out because the other two are usually skipped and are where the finite intuition finally breaks.

Chains that start in AA. They begin at an element nothing maps to from BB. Here the map to follow is ff, forwards.

Chains that start in BB. Mirror image; follow gg backwards.

Chains with no start, going back forever. These are the ones a finite picture cannot show. Nothing on such a chain is a beginning, and either map works because neither side has an unmatched element. In the interval example every point not on the shifting sequence is a chain of this kind — a one-element cycle, in fact, since it maps to itself.

Cycles. A chain that closes on itself. These happen when the composition gfg \circ f has a fixed point, and again either map works.

The reason all four are needed is that the argument is about arbitrary injections and cannot look at them. It is worth noticing that the proof does not have to decide which kind a given chain is in order to be correct — it only has to be the case that each chain is of one of the four kinds, and that the rule for each kind is consistent. Whether the classification could be carried out in practice is a different question, and for a general pair of injections the answer is no.

What it is used for

The theorem is a labour-saving device and it saves an enormous amount of labour.

Establishing that two infinite sets have the same size directly means constructing a bijection, which is often fiddly and sometimes genuinely hard. Establishing two injections is usually easy, because an injection can waste as much room as it likes.

The reals and the plane. There is an obvious injection from R\mathbb{R} into R2\mathbb{R}^2. The other way, interleave the decimal expansions of two coordinates into one number — which is not a bijection, because of the expansion ambiguity, and is an injection with a little care. So the line and the plane have the same size, a fact Cantor found in 1877 and reported to Dedekind with the remark that he could see it and did not believe it.

The reals and the binary sequences. An injection each way is immediate; a bijection directly is annoying, again because of the expansion ambiguity. The theorem removes the annoyance.

Any two intervals, open or closed. All the same size, all by the same two-line argument, with none of the endpoint bookkeeping done by hand.

In every case the theorem converts a construction problem into two much easier ones, which is what a good structural theorem does.

The 8 subsets of a set of 3, ordered by inclusionA Hasse diagram of the subsets of a small set, with an edge wherever one subset is another plus one element.{a}{b}{a,b}{c}{a,c}{b,c}{a,b,c}0123the 8 subsets of a set of 3, joined when one is the other plus a single element8 against 3: there is no way to label the subsets by the elements, and that is the whole theorem
Fig. 7 Eight subsets of a three-element set. Finite sizes obey the theorem trivially — if each of two finite sets injects into the other they have equal counts, and counting is the whole argument. The theorem exists because counting stops being available, not because the statement is doubtful.

Why finite intuition is the wrong guide

The statement sounds obvious and the proof is not, and the gap is worth examining because it recurs everywhere in this part of the subject.

For finite sets, injects into implies has at most as many elements as, and sizes are numbers, and numbers are totally ordered and can be subtracted. Two inequalities in opposite directions give equality by arithmetic, and no construction is required — the bijection exists because the counts agree, and one can be built by any greedy matching.

None of that survives. Infinite cardinalities cannot be subtracted: AB|A| \le |B| and BA|B| \le |A| cannot be combined by cancelling anything, because there is nothing to cancel. And a bijection is not implied by an abstract equality of sizes; equality of sizes is the existence of a bijection, so the theorem’s conclusion is the thing itself rather than a consequence of it.

So the theorem is doing the work that arithmetic does in the finite case, and it is doing it by construction because there is no arithmetic to appeal to. That is the standard situation once sets are infinite, and it is why so many statements in this area are obvious-sounding and have proofs: the finite version is a calculation and the infinite version is a construction, and the two do not resemble each other.

The name, which is a small piece of history

The result is attributed to three people and was proved by at least four, in an order that is worth a paragraph.

Cantor stated it in 1887 and his argument relied on the well-ordering of cardinals, which was itself unproved and turned out to need the axiom of choice. Dedekind had a complete proof in his notebooks in 1887 and did not publish it. Schröder announced a proof in 1896 that was flawed and was corrected later; Bernstein, then a student of Cantor’s, gave a correct one in 1897. Zermelo produced another in 1908, and the chain argument above is essentially Dedekind’s.

The point worth extracting is not the priority dispute. It is that the proof needs no choice at all, and that this was not clear for twenty years. The chains are defined by tracing backwards, which is deterministic; the decision on each chain is determined by the chain’s own type; and nothing anywhere requires selecting one element from each of infinitely many sets. That is unusual for a theorem about arbitrary infinite sets, and it is why the result is available in settings where choice is not.

Two injections shifted by 3 and 1, and the chains they cutTwo rows of dots with arrows for each injection, coloured by which chain each element belongs to.AB00112233445566778899101011111212left to right adds 3, right to left adds 1; neither is onto and both are one-to-one4 chains in the window, and the assembled map is one-to-one on all of it
Fig. 8 The shifts swapped round. The chain structure changes completely — different starts, different lengths, a different assembled map — and the theorem does not notice, because it never looks at the maps except to trace them backwards.

What the picture can and cannot show

The two-row drawing is a window on an infinite pair and it is worth being exact about what survives the truncation.

What survives. That both maps are injections, checked pairwise on the window. That every drawn element lies on exactly one chain, computed by tracing back until the trail leaves the window. That the assembled map — following ff on chains that start on the left and gg backwards on chains that start on the right — is one-to-one on everything drawn. Those are the three facts the proof needs, and all three are checkable on a finite piece.

What does not survive. A chain with no start cannot appear, because in a finite window every backward trace either stops or leaves the picture, and the two are indistinguishable from inside. Nor can a chain be shown to be infinite. So the window shows the rule and cannot show the case analysis it is a rule for.

That is the standing arrangement in this field and it is stated rather than smoothed over. The finite picture is evidence about the mechanism, never about the infinite object, and where a claim needs the infinite object the essay says so in prose and the figure stays quiet.

What it does not give

Two limits, both worth stating, because the theorem’s strength invites overreading.

It does not compare sizes that are not comparable this way. The theorem says that two injections give a bijection. It does not say that for any two sets, one injects into the other — that statement is equivalent to the axiom of choice, and is a genuinely different and stronger claim.

It does not make the bijection natural. The map it produces depends on the two injections given, and different pairs give different bijections with nothing preferred among them. In the interval example the resulting map is discontinuous at infinitely many points and could not be otherwise, since a continuous bijection between the two intervals does not exist. Sameness of size is a very coarse relation, and this theorem is a tool for establishing it rather than for producing anything one would want to use.

That coarseness is worth a closing note, because it is what makes the whole subject of cardinality both powerful and limited. It sees only one property — whether a matching exists — and is blind to every structure a matching might have failed to respect. The interval and the square have the same size, and nothing about that fact says they are alike in any other way; the bijection between them destroys distance, order, continuity and dimension, and cardinality does not notice, because cardinality was never looking.

That blindness is the point of the notion rather than a defect in it. Size is the coarsest question that can be asked about a collection, and asking it first is what makes the answers so widely applicable — the theorem above holds for sets of numbers, sets of functions, sets of proofs and sets of sets, because it never looks at what the elements are. Every finer question in mathematics is asked against a background of structure that has to be specified; this one is asked against none, and the price of asking a question that cheap is that the answer says almost nothing beyond itself.

Named objects

A dashed tag is an object no other essay names yet.

BijectionCardinalityChain decompositionConstructionCountabilityHilbert hotelInjectionInterval