Sets of Measure Zero and the Cantor Set

Part 12, Chapter 12: Measure Theory and the Lebesgue Integral

Learning objectives

  • Construct the Cantor middle-thirds set as the limit of an iterated removal process
  • Compute its Lebesgue measure and prove that it is zero
  • Show that the Cantor set is uncountable via base-3 expansions, hence “small in measure, large in cardinality”
  • Identify the topological properties of the Cantor set: closed, compact, perfect, totally disconnected, nowhere dense

The Cantor set is a single example that demolishes most of the intuitions you brought from calculus. It is uncountable, the same cardinality as mathbbR\mathbb{R}, yet has Lebesgue measure zero. It is closed and compact, yet contains no intervals. It is the prototypical fractal: self-similar at every scale. Every counterexample-driven argument in real analysis eventually traces back to this set or a relative of it, and it is a useful sanity check for any new conjecture: "does it still work for the Cantor set?"

The Cantor set is intrinsically diagrammatic. We describe its self-similar structure in the prose below; an interactive Cantor-construction widget is not currently available in lang-core, so the construction is presented as a static description with explicit numerical checks.

The construction

Start with C_0 = [0, 1]. To get C_1C_1, remove the open middle third:

C_1 = [0, 1/3] \cup [2/3, 1]

To get C_2C_2, remove the open middle third of each of the two intervals in C1C_1:

C_2 = [0, 1/9] \cup [2/9, 1/3] \cup [2/3, 7/9] \cup [8/9, 1]

Continue indefinitely. The Cantor set is the intersection:

C = \bigcap_{n=0}^\infty C_n

At step nn, the set CnC_nn consists of 2n2^n closed intervals each of length 3n3^{-n}. The total length of CnC_nn is (2/3)n(2/3)^n, which tends to 00 as ntoinftyn \to \infty.

The Cantor set has measure zero

The set CC is the nested intersection of the CnC_nn, so lambda(C)leqlambda(Cn)=(2/3)n\lambda(C) \leq \lambda(C_n) = (2/3)^nn)=(2/3)n for every nn. Sending ntoinftyn \to \infty:

lambda(C)leqlimntoinfty(2/3)n=0.\lambda(C) \leq \lim_{n \to \infty} (2/3)^n = 0.ntoinfty(2/3)n=0.

So lambda(C)=0\lambda(C) = 0. Equivalently, the total length removed is

\sum_{n=0}^\infty \frac{2^n}{3^{n+1}} = \frac{1/3}{1 - 2/3} = 1,

which exhausts the original interval [0, 1] exactly.

The Cantor set is uncountable

Every real number x \in [0, 1] has a base-3 expansion x=0.a1a2a3ldots3x = 0.a_1 a_2 a_3 \ldots_3 with each aiin0,1,2a_i \in \{0, 1, 2\}iin0,1,2. The middle-thirds construction removes exactly the numbers whose base-3 expansion is forced to contain a 11:

  • (1/3,2/3)(1/3, 2/3) removes numbers starting 0.1ldots_30.1\ldots_3 (where the 11 cannot be avoided by choosing the alternate expansion).
  • The next step removes numbers with a 11 in the second digit, and so on.

What remains is precisely the set of numbers in [0, 1] that have a base-3 expansion using only digits 00 and 22. Map x=0.a1a2ldots3x = 0.a_1 a_2 \ldots_3 (with aiin0,2a_i \in \{0, 2\}iin0,2) to y=0.b1b2ldots2y = 0.b_1 b_2 \ldots_2 where bi=ai/2in0,1b_i = a_i / 2 \in \{0, 1\}i=ai/2in0,1. This is a surjection C \to [0, 1], so |C| \geq |[0, 1]| = |\mathbb{R}|. Since C \subseteq [0, 1], we get C=mathbbR=2aleph_0|C| = |\mathbb{R}| = 2^{\aleph_0}. The Cantor set is uncountable.

Topology: closed, compact, perfect, totally disconnected

Each CnC_nn is a finite union of closed intervals, hence closed. The intersection of closed sets is closed, so CC is closed. Being a closed and bounded subset of mathbbR\mathbb{R}, CC is compact (Heine-Borel). It is perfect, every point of CC is a limit point, because the endpoints of the intervals at every level are arbitrarily close to other points of CC. It is totally disconnected: between any two distinct points of CC lies a removed open interval, so CC contains no interval. Finally, it is nowhere dense: its closure (itself) has empty interior.

Where this shows up
  • Fractal geometry: The Cantor set has Hausdorff dimension log2/log3approx0.631\log 2 / \log 3 \approx 0.631, a fractional dimension, the prototype example of fractal geometry. It is the simplest non-trivial example used to teach scaling and self-similarity.
  • Dynamical systems: The attractor of the doubling map on the circle, restricted to certain invariant subsets, is a Cantor set. Strange attractors in chaotic systems (the Smale horseshoe) are Cantor-set-like in cross-section.
  • Probability and percolation: The set of paths in a percolation cluster at criticality, after suitable scaling, often has Cantor-like measure-zero limits. The classical Cantor distribution, uniform on CC, is the canonical "singular" probability distribution, neither discrete nor absolutely continuous.
  • Null events in probability: The event "an infinite coin-flip sequence avoids every other digit in the limit" has Cantor-set probability structure. Measure-zero events that are nonetheless not impossible are how probabilists discuss zero-probability outcomes.

Pause and think: Is the number 1/41/4 in the Cantor set? (Hint: write 1/41/4 in base 33. It is 0.overline023=0.020202ldots30.\overline{02}_3 = 0.020202\ldots_3. Only digits 00 and 22 appear, so yes.) What does this tell you about the structure of CC: does it have any nonempty interior as a subset of mathbbR\mathbb{R}? (Equivalently: does it contain any open interval, however small?)

Try it

  • Predict first: after step n=5n = 5 of the Cantor construction, how many disjoint intervals does C_5C_5 have, and what is the total length? (Hint: 2n2^n intervals of length 3n3^{-n}.)
  • Show that the endpoints 0,1/3,2/3,1,1/9,2/9,ldots0, 1/3, 2/3, 1, 1/9, 2/9, \ldots of the construction intervals are all in CC. Is the cardinality of these endpoints countable or uncountable?
  • "Fat Cantor set" challenge: modify the construction to remove the middle 1/4n1/4^n fraction at step nn (instead of always the middle third). Show that the resulting set has positive Lebesgue measure but is still closed and nowhere dense. (Hint: compute the geometric sum of removed lengths.)
  • True or false: the Cantor set is countable because it consists of "endpoints" of removed intervals. (Hint: this is wrong, the endpoints are countable but they are a strict subset of CC.)
  • Show that the Cantor function (the "devil's staircase"), a continuous, non-decreasing function from [0, 1] to [0, 1] that is constant on every removed interval, has derivative zero almost everywhere yet rises from 00 to 11. (Sketch only: the derivative is zero on the complement of CC, which has full measure.)

A trap to watch for

It is tempting to think the Cantor set "is" the endpoints, the points 0,1/3,2/3,1,1/9,2/9,7/9,8/9,ldots0, 1/3, 2/3, 1, 1/9, 2/9, 7/9, 8/9, \ldots that mark the construction stages. These endpoints form a countable subset of CC. But CC itself is uncountable: most of its points are not endpoints, but interior limit points of the infinite nesting. The number 1/4=0.overline02_31/4 = 0.\overline{02}_3 is in CC and never appears as an endpoint at any finite stage. Confusing the set of endpoints with the Cantor set is the single most common source of "the Cantor set is countable" errors in student work.

What you now know

You can construct the Cantor set, prove it has Lebesgue measure zero, prove it is uncountable, and list its core topological properties. More broadly, you understand that "small in measure" and "small in cardinality" are independent notions, the Cantor set is the canonical example. The next section finally builds the Lebesgue integral on top of this measure theory, the modern replacement for the Riemann integral.

Mark section complete →

References

  • Garrity, T. (2002). All the Mathematics You Missed: But Need to Know for Graduate School. Cambridge University Press, ch. 12.
  • Royden, H. L., Fitzpatrick, P. M. (2010). Real Analysis (4th ed.). Pearson, ch. 2.
  • Folland, G. B. (1999). Real Analysis: Modern Techniques and Their Applications (2nd ed.). Wiley, ch. 1.
  • Falconer, K. (2014). Fractal Geometry: Mathematical Foundations and Applications (3rd ed.). Wiley, ch. 2.
  • Stein, E. M., Shakarchi, R. (2005). Real Analysis. Princeton UP, ch. 1.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.