Main Page | See live article | Alphabetical index

Cantor set

The Cantor set, named after German mathematician Georg Cantor, is a remarkable construction involving only the real numbers between zero and one.

The middle third (1/3, 2/3) is deleted from the interval [0, 1].

From what is left, namely [0, 1/3] ∪ [2/3, 1], "middle thirds" are deleted from each of the two intervals. Continue this process ad infinitum. Pictorially, the process would look something like this:

  0                         1/3                       2/3                         1

Table of contents
1 :
2 :
4 What's in the Cantor set?
5 Properties
6 The Cantor set is uncountable
7 The Cantor set is a fractal
8 Topological and analytical properties
9 Variants of the Cantor set








= = = = = = = = = = = = = = = =

What's in the Cantor set?

The question becomes, what is left when you are done? If you add up the lengths of segments removed, it would calculate out to be:

(For details, see
geometric series).

Using this calculation, you may be surprised if there were anything left - after all, the sum of the lengths of the removed intervals is equal to the length of the original interval. However a closer look at the process reveals that we must have something left, since removing the "middle-thirds" of an interval involved removing open sets (sets that do not include their endpoints). So removing the line segment ]1/3, 2/3[ from the original interval [0, 1] leaves behind the points 1/3 and 2/3. A little reflection will convince you quickly that they will never be removed, in fact none of the endpoints of any of the intervals at any stage in the process will ever be removed. So we know for certain that the Cantor set is not empty.

It may appear that only the endpoints are left, but that would be an error. The number 1/4, for example is in the bottom third, so it is not removed at the first step, and is in the top third of the bottom third, and is in the bottom third of that, and in the top third of that, and in the bottom third of that, and so on ad infinitum -- alternating between top third and bottom third. Since it is never in one of the middle thirds, it is never removed, and yet it is also not one of the endpoints of any middle third.


The Cantor set is uncountable

It can be shown that there are as many points left behind in this process as there were those that were removed. To see this, consider the points in the [0, 1] interval in terms of base 3 (or ternary) notation. In this notation, 1/3 can be written as 0.1 and 2/3 can be written as 0.2. If we remove everything from 1/3 and 2/3 we are really removing everything between 0.1 and 0.2, or in other words, 'everything with a 1 in the first position after the point (except for 0.1 itself, but since 0.1 = 0.02222222..., we can represent it without using a one in any position).

The next step examines the intervals [0, 0.1] and [0.2, 1] and removes their middle thirds. In this case we are removing everything between 0.01 and 0.02 in the first interval and between 0.21 and 0.22 in the second interval, or in other words, everything with a 1 in the second position after the point. By the time you are done, the numbers which remain are those that can be represented in ternary (base 3) notation with no '1' in any position.

Stated another way, the Cantor set consists of all the numbers between 0 and 1 that can be represented using only 0's and 2's in ternary notation. Therefore, the numbers in the Cantor set can be mapped onto the numbers in [0, 1] by replacing every 2 in the ternary expansion with a 1, and treating the result as a binary expansion. So there are as many points in the Cantor set as there are in [0, 1], and the Cantor set is uncountable (see Cantor's diagonal argument). Since the set of endpoints of the removed intervals is countable, there must be uncountably many numbers in the Cantor set which are not interval endpoints. One example of such a number is 1/4, which can be written as 0.02020202020... in ternary notation.

The Cantor set is a fractal

The Cantor set is the prototype of a fractal. It is self-similar, because it is equal to two copies of itself, if each copy is shrunk by a factor of 1/3 and translated. Its Hausdorff dimension is equal to ln(2)/ln(3). It can be formed by intersecting a Sierpinski carpet with any of its lines of reflectional symmetry (such as reading the center scanline).

Topological and analytical properties

As the above summation argument shows, the Cantor set is uncountable but has Lebesgue measure 0. Since the Cantor set is the complement of a union of open sets, it itself is a closed subset of the reals, and therefore a complete metric space. Since it is also bounded, the theorem of Heine-Borel says that it must be compact.

Pick any point in the Cantor set. In any arbitrarily small neighborhood, there is some other number that can be represented as a ternary number with only 0's and 2's. Hence, every point in the Cantor set is an accumulation point. A closed sets in which every point is an accumulation point is also called a perfect set in topology.

Again, pick any point in the Cantor set (which is itself a subset of the unit interval). Any arbitrarily small neighborhood around that point contains an open set in the unit interval that is disjoint from the Cantor set. Thus the Cantor set is nowhere dense in the unit interval and totally disconnected.

It is worth noting that as a topological space, the Cantor set is homeomorphic to the product of countably many copies of the space {0, 1}, where each copy carries the discrete topology. This can be used to show that the Cantor set is homogeneous in the sense that for any two points x and y in the Cantor set C, there exists a homeomorphism f : CC with f(x) = y. See Cantor space for more on spaces homeomorphic to the Cantor set.

The Cantor set is also homeomorphic to the p-adic integers, and, if one point is removed from it, to the p-adic numbers.

The Cantor set can be characterized by these properties: every nonempty totally-disconnected perfect compact metric space is homeomorphic to the Cantor set.

Variants of the Cantor set

Instead of repeatedly removing the middle third of every piece as above, we could also keep removing any other fixed percentage (other than 0% and 100%) from the middle. The resulting sets are all homeomorphic to the Cantor set constructed above and also have Lebesgue measure 0.

By removing progressively smaller percentages of the remaining pieces in every step, one can also construct sets homeomorphic to the Cantor set that have positive Lebesgue measure.

See also Cantor function and Cantor space.