Evanalysis
6.3Estimated reading time: 31 min

6.3 Intervals, Cantor set, density, and well-ordering

Compare several precise meanings of largeness for subsets of the real line: interval cardinality, the Cantor set, density, and well-ordering.

Course contents

Chapter 6 has already used bijections, injections, surjections, countability, and the Axiom of Choice to compare sizes of sets. The final part of the chapter makes an important warning explicit:

there is no single mathematical meaning of the word "large".

An interval can be short in length but as large as RR in cardinality. The Cantor set can have total removed length 11 and still have the same cardinality as the real line. The rationals are countable, yet dense in RR. The natural numbers are well-ordered, while the integers and positive rationals are not well-ordered by their usual orders.

These are not contradictions. They are different structures asking different questions. We first compare intervals and the Cantor set by bijections, then separate density from cardinality, and finally ask which orders have a least element in every nonempty subset. The final connection with choice is stated precisely; its transfinite-recursion proof requires tools beyond this course.

Closed intervals and half-closed intervals

We have already used open intervals such as (a,b)(a,b). Now add the closed version.

Definition

Closed interval

Let a,b∈Ra,b\in R with a≤ba\le b. The closed interval from aa to bb is

[a,b]={x∈R∣a≤x≤b}.[a,b]=\{x\in R\mid a\le x\le b\}.

The endpoint convention matters:

  • (a,b)(a,b) excludes both endpoints;
  • [a,b][a,b] includes both endpoints;
  • [a,b)[a,b) includes aa but excludes bb;
  • (a,b](a,b] excludes aa but includes bb;
  • [a,∞)[a,\infty) and (−∞,b](-\infty,b] are defined analogously.

When a=ba=b, the interval [a,a]={a}[a,a]=\{a\} is a singleton, whereas (a,a)(a,a), [a,a)[a,a), and (a,a](a,a] are empty. These are the degenerate cases.

This notation matters because later constructions often depend on whether endpoints remain present. That will matter immediately for the Cantor set: at each stage, closed intervals remain, so their endpoints are not removed.

Common mistake

Do not treat interval notation as decoration

The intervals (0,1)(0,1) and [0,1][0,1] differ as subsets of RR. They have the same cardinality, but they are not the same set. In proofs, first decide whether you are proving equality of sets, equality of cardinalities, or a statement about length.

Intervals and cardinality

The interval (0,1)(0,1) has the same cardinality as RR.

Theorem

The interval (0,1)(0,1) has cardinality ∣R∣|R|

There is a bijection

f:(0,1)→R,f(x)=2x−1x(x−1).f:(0,1)\to R,\qquad f(x)=\frac{2x-1}{x(x-1)}.

Here is the verification. Since

f(x)=1x+1x−1,f(x)=\frac1x+\frac1{x-1},

both terms decrease strictly when xx increases in (0,1)(0,1), so ff is injective. For a direct surjectivity check, given y∈Ry\in R put

x=2y+2+y2+4.x=\frac{2}{y+2+\sqrt{y^2+4}}.

The denominator is greater than 22, so 0<x<10\lt x\lt1. Substitution, or solving yx2−(y+2)x+1=0yx^2-(y+2)x+1=0, verifies f(x)=yf(x)=y; thus ff is surjective by direct formula.

For interval cardinality, begin with the linear reduction. For non-degenerate finite intervals,

x⟼x−ab−ax\longmapsto \frac{x-a}{b-a}

maps (a,b)(a,b) bijectively onto (0,1)(0,1) when a<ba\lt b. Half-infinite and infinite intervals can then be compared by injections. The endpoint change is explicit: define g:[0,1]→(0,1)g:[0,1]\to(0,1) by

g(0)=12,g(1n)=1n+2 (n≥1),g(0)=\frac12,\qquad g\left(\frac1n\right)=\frac1{n+2}\ (n\ge1),

and let g(x)=xg(x)=x at every other point. It shifts the sequence 1,1/2,1/3,…1,1/2,1/3,\ldots and fixes all remaining points, hence is a bijection. For a non-degenerate interval II, the inclusion I↪RI\hookrightarrow R is injective. Choose u<vu\lt v with (u,v)⊂I(u,v)\subset I; composing t↦u+(v−u)tt\mapsto u+(v-u)t with f−1f^{-1} gives an injection R↪IR\hookrightarrow I. Cantor–Bernstein now yields ∣I∣=∣R∣|I|=|R|. The only endpoint cases outside this argument are the empty intervals and singleton [a,a][a,a].

The Cantor set construction

The Cantor set is introduced to push this distinction further.

Start with

C0=[0,1].C_0=[0,1].

At each later stage, remove the open middle third of every interval that remains.

  • Stage 00:

    C0=[0,1].C_0=[0,1].
  • Stage 11: remove (1/3,2/3)(1/3,2/3), leaving

    C1=[0,13]∪[23,1].C_1=\left[0,\frac13\right]\cup \left[\frac23,1\right].
  • Stage 22: remove the middle third from each of the two intervals in C1C_1, leaving

    C2=[0,19]∪[29,13]∪[23,79]∪[89,1].C_2= \left[0,\frac19\right]\cup \left[\frac29,\frac13\right]\cup \left[\frac23,\frac79\right]\cup \left[\frac89,1\right].
  • Stage 33:

    C3=[0,127]∪[227,19]∪[29,727]∪[827,13]∪[23,1927]∪[2027,79]∪[89,2527]∪[2627,1].\begin{aligned} C_3={}&\left[0,\frac1{27}\right]\cup\left[\frac2{27},\frac19\right] \cup\left[\frac29,\frac7{27}\right]\cup\left[\frac8{27},\frac13\right]\\ &\cup\left[\frac23,\frac{19}{27}\right]\cup\left[\frac{20}{27},\frac79\right] \cup\left[\frac89,\frac{25}{27}\right]\cup\left[\frac{26}{27},1\right]. \end{aligned}
  • Stage nn: CnC_n is the union of 2n2^n closed intervals, each of length (1/3)n(1/3)^n.

Definition

Cantor set

The Cantor set is the common intersection

C=⋂n=0∞Cn.C=\bigcap_{n=0}^{\infty} C_n.

The sets are nested:

C0⊃C1⊃C2⊃⋯ .C_0\supset C_1\supset C_2\supset \cdots .

This nesting is why the intersection is a meaningful object. A point belongs to CC exactly when it survives every stage of middle-third removal.

Worked example

Endpoints survive

At stage 1, the open interval (1/3,2/3)(1/3,2/3) is removed, but the endpoints 1/31/3 and 2/32/3 stay.

At later stages, endpoints of remaining closed intervals again stay. Therefore points such as

0,1,13,23,19,290,\quad 1,\quad \frac13,\quad \frac23,\quad \frac19,\quad \frac29

are not removed at the stage where they first appear as endpoints.

The first stages of the Cantor set construction

Figure. Each stage removes the middle third from every interval that survived the previous stage.

Read and try

Step through the Cantor set construction

The viewer shows how repeated middle-third removal creates a set that is small by length but large by cardinality.

Stage

C_0

Remaining intervals

1

Removed length so far

0

The limit set keeps exactly those points that can be written in ternary using only the digits 0 and 2.

Ternary expansions and membership in CC

Next give an arithmetic description using base 33.

Every x∈[0,1]x\in[0,1] can be written in ternary form

x=∑k=1∞ak3k=(0.a1a2a3…)3,ak∈{0,1,2}.x=\sum_{k=1}^{\infty}\frac{a_k}{3^k} =(0.a_1a_2a_3\ldots)_3, \qquad a_k\in\{0,1,2\}.

As in decimal notation, representations are not always unique. For example, just as 0.999...=10.999...=1 in base 1010, one has

(0.0222…)3=(0.1)3.(0.0222\ldots)_3=(0.1)_3.
  • At stage 11, an expansion with first digit 11 represents a point in [1/3,2/3][1/3,2/3]; its interior is removed, while the two endpoint values have alternate expansions using 00 and 22. Later stages apply the same branch labelling to the next digit.
  • Consequently, the Cantor set consists exactly of numbers in [0,1][0,1] that have at least one ternary expansion using only the digits 00 and 22.

Theorem

Ternary description of the Cantor set

For x∈[0,1]x\in[0,1], the point belongs to CC if and only if it has a ternary expansion

x=(0.a1a2a3…)3x=(0.a_1a_2a_3\ldots)_3

where every digit aka_k is either 00 or 22.

Proof. If all ternary digits are 00 or 22, then after nn digits the remaining tail lies between 00 and

∑k>n23k=13n.\sum_{k\gt n}\frac2{3^k}=\frac1{3^n}.

Thus the number lies in the corresponding closed component of CnC_n for every nn, so it lies in CC. Conversely, if x∈Cx\in C, choose at each stage the left or right surviving component containing xx, assigning digit 00 or 22. The nested components have lengths 3−n3^{-n}, so their endpoints converge to xx and give a 00/22-only expansion. This is an existence statement: 1/3=(0.0222…)3=(0.1)31/3=(0.0222\ldots)_3=(0.1)_3, so the endpoint is retained even though one of its expansions contains a 11.

Worked example

Another retained endpoint

The point 2/92/9 is the left endpoint of the second component of C2C_2. Its terminating expansion (0.02)3(0.02)_3 uses only 00 and 22; appending zeros already proves 2/9∈C2/9\in C. Every later removal is an open middle third, so this endpoint remains present.

This description is an existence statement. A point can also have another ternary expansion containing 11; the endpoint 1/31/3 is the example above.

The length paradox

The construction removes many intervals. At stage 11, it removes one interval of length 1/31/3. At stage 22, it removes two intervals of length 1/91/9. At stage nn, it removes

2n−12^{n-1}

intervals, each of length

(13)n.\left(\frac13\right)^n.

The total removed length is therefore

L=∑n=1∞2n−13n=13∑k=0∞(23)k=1/31−2/3=1.L=\sum_{n=1}^{\infty}\frac{2^{n-1}}{3^n} = \frac13\sum_{k=0}^{\infty}\left(\frac23\right)^k = \frac{1/3}{1-2/3} =1.

After the first NN stages the cumulative removed length is

LN=∑n=1N2n−13n=1−(23)N,L_N=\sum_{n=1}^{N}\frac{2^{n-1}}{3^n} =1-\left(\frac23\right)^N,

while the total length of CNC_N is (2/3)N(2/3)^N. Thus the finite-stage quantities already show how the removed lengths approach one without implying that the intersection is empty.

Since [0,1][0,1] has length 11, this calculation suggests that the remaining set should be extremely small. In the language of length, the Cantor set has no length left after the removals.

But length is still not cardinality.

The Cantor set has cardinality ∣R∣|R|

In fact, the Cantor set is not merely non-empty. It is uncountable, and in fact has the same cardinality as RR.

Theorem

The Cantor set has the same cardinality as RR

Let SS be the set of all infinite binary sequences

(s1,s2,s3,…),sk∈{0,1}.(s_1,s_2,s_3,\ldots),\qquad s_k\in\{0,1\}.

Define

f:S→C,f((s1,s2,s3,…))=∑k=1∞2sk3k.f:S\to C,\qquad f((s_1,s_2,s_3,\ldots)) = \sum_{k=1}^{\infty}\frac{2s_k}{3^k}.

Identify subsets A⊆NA\subseteq\mathbb N with these positively indexed sequences by setting sk=1s_k=1 exactly when k−1∈Ak-1\in A, and sk=0s_k=0 otherwise. This is a bijection between 2N2^N and SS.

This sends a binary sequence to the ternary expansion whose kkth digit is 00 if sk=0s_k=0 and 22 if sk=1s_k=1. Thus the image lies in CC.

This is a bijection. To justify injectivity without a false claim that ordinary ternary expansions are always unique, suppose two binary sequences first differ at index mm. Their leading difference has magnitude 2/3m2/3^m, while the largest possible magnitude of the tail is

∑k=m+1∞23k=13m.\sum_{k=m+1}^{\infty}\frac2{3^k}=\frac1{3^m}.

The leading difference is strictly larger, so it cannot be cancelled. Surjectivity follows from the ternary characterization: every point of CC has a 00/22-only expansion, which gives a binary sequence by dividing each digit by 22.

It remains to justify ∣2N∣=∣R∣|2^N|=|R|. The coding above is an injection 2N↪R2^N\hookrightarrow R because C⊂RC\subset R. In the other direction, fix an enumeration Q={q1,q2,…}Q=\{q_1,q_2,\ldots\} and define

ρ(r)={n−1:n≥1, qn<r}⊆N.\rho(r)=\{n-1:n\ge1,\ q_n\lt r\}\subseteq\mathbb N.

If r<sr\lt s, density of QQ gives r<qn<sr\lt q_n\lt s for some nn, so ρ(r)≠ρ(s)\rho(r)\ne\rho(s). Thus ρ:R↪2N\rho:R\hookrightarrow2^N is injective. Cantor– Bernstein gives ∣2N∣=∣R∣|2^N|=|R|, and therefore

∣C∣=∣R∣.|C|=|R|.

Common mistake

Zero length does not mean countable

The Cantor set is often described as dust because it is produced by removing open intervals at every scale. But the cardinality theorem says it still has as many points as the real line. Length and cardinality are different measurements.

Empty interior

The Cantor set has empty interior. Let x∈Cx\in C and ϵ>0\epsilon\gt 0. Choose nn with 3−n<ϵ3^{-n}\lt\epsilon. The component interval of CnC_n containing xx has length 3−n3^{-n}; its open middle third contains a point y∉Cy\notin C with ∣x−y∣<ϵ|x-y|\lt\epsilon. Hence no point of CC has an open neighbourhood contained in CC. Since C⊂[0,1]C\subset[0,1], it is also not dense in RR, for example because (2,3)(2,3) misses it. This is compatible with CC having cardinality ∣R∣|R|.

Density in the real line

The next section introduces a different notion of largeness.

Definition

Dense subset of RR

A subset S⊂RS\subset R is dense if for every r∈Rr\in R and every ϵ>0\epsilon\gt 0, there exists s∈Ss\in S such that

∣r−s∣<ϵ.|r-s|\lt\epsilon.

This definition does not ask how many elements SS has. It asks whether elements of SS can approximate every real number arbitrarily well.

Equivalently, no matter where you stand on the real line and no matter how small a tolerance you choose, some element of SS lies within that tolerance.

Integers are not dense

Theorem

ZZ is not dense in RR

Take

r=12,ϵ=14.r=\frac12,\qquad \epsilon=\frac14.

For every integer nn,

∣n−12∣≥12>14.\left|n-\frac12\right|\ge \frac12\gt\frac14.

So no integer lies within distance 1/41/4 of 1/21/2. Hence ZZ is not dense in RR.

The proof only needs one failed target point and one failed tolerance. To show that a set is not dense, you do not have to check every real number. You only need to find a gap that the set cannot enter.

Rationals are dense

Theorem

QQ is dense in RR

Let r∈Rr\in R and let ϵ>0\epsilon\gt 0. By the Archimedean property, choose n∈Nn\in N such that

n>1ϵ,so1n<ϵ.n\gt\frac1\epsilon, \qquad\text{so}\qquad \frac1n\lt\epsilon.

Choose the largest integer m0m_0 satisfying

m0≤nr.m_0\le nr.

Then

m0≤nr<m0+1.m_0\le nr\lt m_0+1.

Dividing by nn gives

0≤r−m0n<1n<ϵ.0\le r-\frac{m_0}{n}\lt\frac1n\lt\epsilon.

Thus

q=m0n∈Qq=\frac{m_0}{n}\in Q

satisfies ∣r−q∣<ϵ|r-q|\lt\epsilon. Therefore QQ is dense in RR.

Worked example

A concrete rational approximation

Take r=0.37r=0.37 and ϵ=0.01\epsilon=0.01. Choose n=101n=101, so 1/n<0.011/n\lt0.01. The largest integer at most 101(0.37)101(0.37) is 3737; consequently q=37/101q=37/101 satisfies 0≤0.37−37/101<1/101<0.010\le0.37-37/101\lt1/101\lt0.01. This is the density proof with a particular target and tolerance.

This proof shows exactly what density means: for any requested tolerance, a rational approximation can be chosen inside that tolerance.

Common mistake

Dense does not mean uncountable

The rationals are dense in RR, but earlier cardinality results show that QQ is countable. Density measures approximation, not cardinality.

The same idea can be restricted to a subset of the real line.

Definition

Dense in a subset

Let T⊂RT\subset R. A subset S⊂TS\subset T is dense in TT if for every t∈Tt\in T and every ϵ>0\epsilon\gt 0, there exists s∈Ss\in S such that

∣t−s∣<ϵ.|t-s|\lt\epsilon.

Well-ordering

The last part of Chapter 6 turns from size and approximation to order.

Definition

Well-ordered set

Let (X,≤)(X,\le) be a totally ordered set. We say (X,≤)(X,\le) is well-ordered if every non-empty subset S⊂XS\subset X has a minimum.

This is stronger than merely being totally ordered. A total order lets you compare two elements. A well-order additionally says that every non-empty subcollection has a first element.

Worked example

Finite initial segments of NN

In the von Neumann construction, a natural number nn is identified with

n={0,1,…,n−1}.n=\{0,1,\ldots,n-1\}.

Ordered by inclusion, this is the usual order on the finite initial segment. For n=0n=0, there is no nonempty subset, so the assertion holds. Assume every nonempty subset of nn has a least element and let S⊆n+1S\subseteq n+1 be nonempty. If S={n}S=\{n\}, its least element is nn. Otherwise S∩nS\cap n is nonempty, and its least element supplied by induction is also least in SS. Thus every finite initial segment is well-ordered.

Theorem

The natural numbers are well-ordered

The usual order on NN is a well-order: every non-empty subset of NN has a minimum.

The proof is by contradiction using induction. If a non-empty subset S⊂NS\subset N had no minimum, induction would show that 0∉S0\notin S, then 1∉S1\notin S, then 2∉S2\notin S, and so on. Hence no natural number would lie in SS, contradicting non-emptiness.

Orders that are not well-orders

Theorem

ZZ is not well-ordered by the usual order

The subset Z⊂ZZ\subset Z has no minimum. For any n∈Zn\in Z, the integer n−1n-1 also lies in ZZ and satisfies n−1<nn-1\lt n. Therefore no element can be first.

Theorem

Q+Q^+ is not well-ordered by the usual order

The subset Q+Q^+ has no minimum. For any positive rational qq, the number q/2q/2 is also positive rational and satisfies q/2<qq/2\lt q.

The second example is especially important because all elements are positive. The failure is not caused by negative numbers. It is caused by an infinite descending process with no first positive rational.

Common mistake

A minimum is not the same as a lower bound

The set Q+Q^+ has lower bounds in RR, such as 00, but 0∉Q+0\notin Q^+. A minimum of a set must belong to the set itself.

Countable sets can be well-ordered

Now separate two statements:

  • a particular order may fail to be a well-order;
  • the underlying set may still admit some other well-order.

Theorem

Every countable set can be well-ordered

If XX is finite, list it as

X={x1,…,xn}X=\{x_1,\ldots,x_n\}

and order the elements by their indices.

If XX is countably infinite, choose a bijection

f:N→X.f:N\to X.

Define

x≤Xyif and only iff−1(x)≤f−1(y)in N.x\le_X y \quad\text{if and only if}\quad f^{-1}(x)\le f^{-1}(y) \quad\text{in }N.

This transports the well-ordering of NN to XX.

For example, ZZ is not well-ordered by its usual order, but it is countable, so it can be well-ordered by choosing an enumeration of its elements.

The Well-Ordering Theorem

The chapter ends by connecting well-ordering to the Axiom of Choice.

Theorem

Well-Ordering Theorem

The Axiom of Choice is equivalent to the statement:

every set XX can be well-ordered.

One direction is direct. Let F\mathcal F be a family in which every member A∈FA\in\mathcal F is non-empty. If F=∅\mathcal F=\varnothing, the unique empty function is a choice function. Otherwise, well-order ⋃F\bigcup\mathcal F and choose from each member its least element. That gives a choice function.

The other direction uses the Axiom of Choice to choose an element from every non-empty subset of XX, then tries to build an order by repeatedly choosing the next unused element. This direction is more technical because making the construction precise requires transfinite recursion, which is beyond the course.

Common mistake

The Well-Ordering Theorem is not saying the usual order works

The usual order on RR, ZZ, or Q+Q^+ may fail to be a well-order. The theorem says that some well-order exists, assuming the Axiom of Choice. It does not give a familiar or computationally useful order.

Common mistakes

  • Endpoint inclusion is a set-theoretic condition. The open middle third removes neither endpoint, so 1/31/3 belongs to CC through (0.0222…)3(0.0222\ldots)_3.
  • Length, cardinality, density, and interior are independent properties. QQ is countable and dense, while CC is uncountable and has empty interior.
  • A minimum belongs to the set. The lower bound 00 of Q+Q^+ is not its minimum.
  • The Well-Ordering Theorem asserts some well-order under the Axiom of Choice; it does not make the usual order on RR, ZZ, or Q+Q^+ a well-order.

Proof sketch or proof idea

The interval proof uses two injections and Cantor–Bernstein. The Cantor proof uses the geometric series for finite stages and a first-difference estimate for binary coding. Density fixes an arbitrary target and tolerance before choosing a rational approximation; well-ordering requires a minimum for every non-empty subset. Keeping these quantifiers separate is the main conceptual safeguard.

Summary

Non-degenerate intervals and the Cantor set have cardinality ∣R∣|R|, while QQ is countable and dense and CC has empty interior. Well-ordering concerns the existence of minima in every non-empty subset.

Exercises

Write a justification before opening the corresponding model solution. These questions ask for mathematical reasoning; compare the argument, not just the final statement.

Exercise 1. Determine ∣[2,5)∣|[2,5)| and justify your answer using injections.

Solution · Model solution

The affine map t↦2+3tt\mapsto2+3t sends (0,1)(0,1) into (2,5)⊂[2,5)(2,5)\subset[2,5), giving an injection R↪[2,5)R\hookrightarrow[2,5) after composing with f−1f^{-1}. Inclusion gives the reverse injection. Cantor–Bernstein therefore gives ∣[2,5)∣=∣R∣|[2,5)|=|R|.

Exercise 2. Why does 1/3∈C1/3\in C even though (0.1)3(0.1)_3 contains the digit 11?

Solution · Model solution

Because 1/3=(0.0222…)31/3=(0.0222\ldots)_3, it has a ternary expansion using only 00 and 22. It is also the retained endpoint of C1C_1.

Exercise 3. Why is ZZ not dense in RR?

Solution · Model solution

Take r=1/2r=1/2 and ϵ=1/4\epsilon=1/4. Every n∈Zn\in Z satisfies ∣n−1/2∣≥1/2>1/4|n-1/2|\ge1/2\gt1/4, so this target and tolerance disprove density.

Exercise 4. Why is QQ dense in RR even though QQ is countable?

Solution · Model solution

Countability concerns cardinality, while density concerns approximation. The Archimedean and largest-integer argument constructs a rational within any prescribed positive tolerance of any real number.

Exercise 5. Prove that Q+Q^+ is not well-ordered by its usual order.

Solution · Model solution

If q∈Q+q\in Q^+, then q/2∈Q+q/2\in Q^+ and q/2<qq/2\lt q. Thus the non-empty subset Q+Q^+ has no minimum, so its usual order is not a well-order.

Exercise 6. Let XX be countably infinite and f:N→Xf:N\to X a bijection. Why does the transported order on XX become a well-order?

Solution · Model solution

For non-empty S⊂XS\subset X, the preimage f−1(S)f^{-1}(S) is a non-empty subset of NN, so it has a least element mm. Then f(m)f(m) is the least element of SS in the transported order.

Read this after 2.2 Functions and relations, 4.2 Upper bounds, supremum, and infimum, and 4.3 Completeness and gaps in Q. Then continue to 7.1 Binary operations, monoids, and groups.

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit