Skip to main content

A Few of My Favorite Spaces: The Cantor Set

The Cantor set is huge, but there isn't very much there.

This article was published in Scientific American’s former blog network and reflects the views of the author, not necessarily those of Scientific American


Last month, I wrote about the π-Base, a website that serves a similar function to the book Counterexamples in Topology. I’m teaching a topology class this semester, and it’s been fun to revisit some good counterexamples. As a new series on the blog, I’ll be writing about some of these strange and interesting mathematical spaces. We’ll start off with the Cantor set, a useful space that pops up again and again all over mathematics.

There are two main ways to think about the Cantor set. The first is more fun, so we’ll start there. Take a line segment. It might as well be the line segment from 0 to 1 that contains both of its endpoints. Now remove the middle third of the segment, but not the endpoints 1/3 and 2/3. We’re left with the segments [0,1/3] and [2/3,1]. Now remove the middle thirds of both of those segments, so we’re left with [0,1/9], [2/9,1/3], [2/3,7/9], and [8/9,1]. If you take away middle thirds forever, you have the Cantor set.

Seven iterations of the process that eventually results in the Cantor set. Image: public domain, via Wikimedia Commons.


On supporting science journalism

If you're enjoying this article, consider supporting our award-winning journalism by subscribing. By purchasing a subscription you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


It might be mildly surprising that there’s anything left when you keep taking away all this stuff, but if you think about it for a little while, you’ll agree that the numbers 0, 1/3, 2/3, 1, and any other endpoint of one of the intermediate intervals will never be removed. We specifically chose not to take them away. What’s more surprising is that there’s more than just those endpoints. A lot more. There are only countably many (read: a puny amount of infinity) endpoints, but there are uncountably many (read: a respectable amount of infinity) points in the Cantor set. To see why, it’s easier to take a look at the other way to think about the Cantor set.

The second description of the Cantor set is a little drier but perhaps more precise. We usually write our numbers base 10, but for this construction, we should write them using base 3. That means we only need the digits 0, 1, and 2. (Three is written 10 in base 3. The numbers one through ten are written 1, 2, 10, 11, 12, 20, 21, 22, 100, 101.) The Cantor set is the set of all numbers between 0 and 1 that can be written in base 3 using only the digits 0 and 2. For example, 0 is certainly in the Cantor set, as is 1, which can be written 0.2222222…. (Just like 0.99999…=1.)

The base 3 way of thinking about the Cantor set corresponds pretty naturally to the middle thirds construction. The base 3 description is like removing all the middle thirds at once. When you remove the interval (1/3,2/3), you’re removing the numbers that have a 1 in the first place after the decimal (tricimal?) point. When you remove the middle thirds of the remaining segments, you’re removing the numbers that have a 1 in the second place, and so on. We do have to be a little careful about the endpoints. Earlier, we noticed that the number 1 could be written as either 1 or 0.222222…. Likewise, the number 1/3 can be written as either 0.1 or 0.0222222…. Any number whose base 3 representation terminates in a 1 can be rewritten to end in an infinite string of 2’s instead. The Cantor set is the set of all numbers that can be written in base 3 using only 0’s and 2’s, not the set of all numbers that must be written this way, so we will allow 1 and 1/3 and other such numbers to be part of the set.

A Cantor set tattoo adorns the arm of Lamar University math professor Robert Vallin.

 

 

The Cantor set is not just a cool thing to get a tattoo of. It has a number of properties that show up in early topology and analysis classes, and it's a great example to have in your back pocket if you want to test out new definitions. It has an interesting combination of "large" and "small" properties. I mentioned earlier that it’s uncountable. I wrote a bit about uncountability last summer. Countably infinite sets correspond to the ones that can be listed—even though we can’t write all the integers down, we can come up with a way to list them and know which one will appear in what position on the list, so the integers are countable. Surprisingly enough, some sets that seem even “bigger” are also countable. The one that surprises me the most is the set of all rational numbers. There “should” be way more rational numbers than integers, but in a precise sense, there are exactly the same number!

The set of all real numbers, on the other hand, is uncountable. This means that any way we tried to list them would be doomed to failure. Cantor’s diagonalization argument, which establishes this fact, is probably my very favorite proof in mathematics. That same reasoning can be used to show that the Cantor set is uncountable—in fact it has the same size as the set of all real numbers.

This is where the Cantor set starts to get counterexample-y. It’s uncountable, but it also doesn’t have any “stuff” in it. Its length is zero. One way to see this is to notice that you take away 1/3 of the remaining length at each step. In the first step you take away an interval with length 1/3. In the second step, you take away 1/3 of the 2/3 of an interval you had left for a total of 2/9, and so on. The total amount of length you take away is 1/3+(1/3)(2/3)+(1/3)(4/9)+(1/3)(8/27)…. Former calculus 2 students might have flashbacks to the sums of geometric series and notice that this one sums to 1. So from a length 1 interval, we’ve removed 1 unit of length, and yet we’re left with just as many numbers as the entire real number line!

If you’d like to learn more about the Cantor set, the π-Base lists some of its topological properties: it's compact, totally separated, and topologically complete, but not scattered. Cut-the-knot math also has a nice Cantor set page, and Robert Vallin (owner of the Cantor set tattoo pictured above) wrote a whole book on the topic. Have fun!

Read about more of my favorite spaces: Fat Cantor sets The Topologist's Sine Curve Cantor's Leaky Tent The Infinite Earring The Line with Two Origins The House with Two Rooms The Fano Plane The Torus The Three-Torus The Möbius Strip The Long Line Space-Filling Curves