Mathwords logoMathwords

Cantor Set — Definition, Formula & Examples

The Cantor set is the set of all points in the interval [0,1][0,1] that remain after you repeatedly remove the open middle third of every remaining segment, infinitely many times.

Define C0=[0,1]C_0 = [0,1] and Cn+1=Cn3(23+Cn3)C_{n+1} = \frac{C_n}{3} \cup \left(\frac{2}{3} + \frac{C_n}{3}\right), where the operation removes the open middle third of each closed interval in CnC_n. The Cantor set is C=n=0CnC = \bigcap_{n=0}^{\infty} C_n. Equivalently, CC consists of all real numbers in [0,1][0,1] whose base-3 (ternary) expansion contains only the digits 0 and 2.

Key Formula

C=n=0Cn,where C0=[0,1] and Cn+1 removes the open middle third of each interval in CnC = \bigcap_{n=0}^{\infty} C_n, \quad \text{where } C_0 = [0,1] \text{ and } C_{n+1} \text{ removes the open middle third of each interval in } C_n
Where:
  • CC = The Cantor set
  • CnC_n = The union of closed intervals remaining after n removal steps

How It Works

Start with the closed interval [0,1][0,1]. Remove the open middle third (13,23)(\frac{1}{3}, \frac{2}{3}), leaving [0,13][23,1][0,\frac{1}{3}] \cup [\frac{2}{3},1]. At the next step, remove the open middle third of each remaining interval, leaving four intervals. Continue this process indefinitely. The Cantor set is what survives after infinitely many removals. Despite removing more and more material, the set is uncountably infinite — yet it has total length (Lebesgue measure) equal to zero.

Worked Example

Problem: Show that the total length removed from [0,1] during the Cantor set construction equals 1, confirming the Cantor set has measure zero.
Step 1: At step 1, remove 1 interval of length 13\frac{1}{3}.
Length removed=13\text{Length removed} = \frac{1}{3}
Step 2: At step 2, remove 2 intervals each of length 19\frac{1}{9}. At step nn, remove 2n12^{n-1} intervals each of length 13n\frac{1}{3^n}.
Total removed=n=12n13n=13n=0(23)n\text{Total removed} = \sum_{n=1}^{\infty} \frac{2^{n-1}}{3^n} = \frac{1}{3}\sum_{n=0}^{\infty}\left(\frac{2}{3}\right)^n
Step 3: Evaluate the geometric series with ratio 23\frac{2}{3}.
131123=133=1\frac{1}{3} \cdot \frac{1}{1 - \frac{2}{3}} = \frac{1}{3} \cdot 3 = 1
Answer: The total length removed is 1, so the Cantor set has Lebesgue measure 0.

Why It Matters

The Cantor set is a foundational counterexample in real analysis and topology. It demonstrates that a set can be uncountable yet have zero length, and it is a natural example of a fractal with Hausdorff dimension ln2ln30.631\frac{\ln 2}{\ln 3} \approx 0.631. Understanding it is essential in measure theory, where it motivates the distinction between "large" in cardinality and "large" in measure.

Common Mistakes

Mistake: Assuming the Cantor set contains only the endpoints of removed intervals (and is therefore countable).
Correction: The Cantor set is uncountable. Every number in [0,1][0,1] with a ternary expansion using only digits 0 and 2 belongs to CC, and there are uncountably many such numbers (they biject onto [0,1][0,1] via base-2 reinterpretation).