Visualizing Cantor’s Zig Zag

A famous and intriguing result in mathematics is that there are just as many points on a line as there are in a plane. This seems counterintuitive at first: planes contain infinitely many lines, so not only should a plane have infinitely many more points than a line, it should have infinitely times as many points as a line! But this is one of the many curious consequences of the mathematics of infinity.

Here, we’ll restrict ourselves to points in the plane with non-negative integer coordinates. Think about points of the form ( c), where c is a non-negative integer. Since there are infinitely many integers, this set of points is infinite, and the points all lie on the line y = 0. The set of points of the form ( c, ) is also infinite, and these points all lie on the line = 1. Notice that, since these two lines are parallel, every point on one matches up perfectly with a point on the other: (0,0) with (0,1); (1,0) with (1,1); (2,0) with (2,1), and so on.

This matching offers a reasonable argument that the two sets have the same number of points: Every point in each set has a unique partner in the other, so counting the points in one is equivalent to counting the points in the other. In this case, we say that the two sets are in one-to-one correspondence. And if anything, this only seems to bolster the argument that there are more points in the plane than on a line: There are infinitely many lines of the form y = k in the plane, and each one contains as many points as the line = 0. So the plane should contain infinitely times as many points as the line! But the mathematics of infinity is tricky business.

Even though it seems like there are far more points in the plane than on the line, it’s possible to match the two sets up in a one-to-one correspondence. It’s not obvious how to do that, but thanks to Georg Cantor and his famous zig zag, we know it can be done. Here’s a visualization I created in Desmos to demonstrate this matching.

This animation shows how each point in the quarter-plane can be paired up with exactly one point on the half-line, and vice versa. The zig-zag pattern enumerates the points in the plane, showing that they could be rightly imagined as though all lying in order on a straight line. This one-to-one correspondence shows that the sets are the same size. And while this demonstration is limited to only part of the plane, the argument can be extended: for example, skipping every other point on the line y = 0 would create space to accommodate the points with negative y-coordinates.

The animation above is an extension of an earlier version shared on Twitter.

Thanks to Chris Long (@octonion) for inspiring this journey into the infinite by linking to this great paper on Cantor packing polynomials, which I used to create the above Desmos demonstrations. And Kelsey Houston-Edwards also recently shared a fun and related problem. I guess infinity is in the air!

Related Posts

 

Forbes Feature

Following up on my appearance on the My Favorite Theorem podcast, co-host Kevin Knudson has an article in Forbes about Varignon’s Theorem, the topic of my episode. Kevin recaps some of the ideas we discussed, including my favorite proof of my favorite theorem.

You can read the article here, and catch the full podcast episode on Kevin’s website.

Related Posts

My Favorite Theorem

It was an honor to appear on the latest episode of My Favorite Theorem, the podcast hosted by mathematicians Evelyn Lamb and Kevin Knudson.

Evelyn and Kevin invite mathematicians to talk about their favorite theorem, and I chose Varignon’s theorem: I love sharing and exploring this theorem with students because it’s so each to start playing around with and it constantly defies expectations and intuitions!

To find out more, you can listen to the podcast at Evelyn’s Scientific American blog or download it from iTunes. You can also find a full transcript of our conversation at Kevin’s website.

I had such a blast talking about mathematics and teaching! Many thanks to Evelyn and Kevin for having me, and for putting on such an excellent podcast. I’ve been introduced to a lot of great people and math through My Favorite Theorem. I highly recommend it, and you can catch up on all the episodes here.

Related Posts

Apple Pies are Delicious

“Cherry pie is delicious!” Nick said, with a big smile. “Apple pies are, too.” He was explaining his trick for remembering the formulas for the circumference and area of a circle. A bunch of his classmates nodded along, many who attended the same middle school as Nick. I didn’t quite get it.

Nick diagrammed it out for me.

“Cherry pie is delicious” –>  C \pi d  –>  C = \pi d

“Apples pies are, too” –>  A \pi r 2  –>  A = \pi r^2

Now, I don’t mind a good mnemonic now and then; I still sing the alphabet song, after all. But this struck me as extremely silly. These formulas get used all the time and they are deeply connected to many other important concepts. Relying on a memory trick creates a flimsy foundation for an important body of knowledge. I decided to show Nick just how flimsy.

The next day in class, I approached Nick. “You know, after thinking about it, I agree with you: apple pies are delicious.” He was pleased. But his smile quickly faded. He wrote something out in his notes. “Wait, that’s not right.”

“So apple pies are not delicious?” I asked.

“It’s ‘Cherry pie is delicious‘.” He showed me the formula.

“But apple pies are delicious, right?”

“Yeah, but that’s just not how it works.”

“This is kind of confusing”, I said. “Oh wait. Now I see. Apple pies are delicious too!” I wrote out A \pi r d 2, followed by A = \pi \frac{rd}{2}. “Perfect!”

“What?”

“See here,” I said. I wrote out  A = \pi \frac{rd}{2} = \pi \frac{r2r}{2} = \pi r^2. “You’re method works perfectly!”

Nick started scribbling more in his notebook. I quietly walked away.

Over the next few days I continued my demonstration. “Cherry pies are delicious, too!” I’d say. Or, “Apple pies are really, really delicious!” I might have even said something like “Some apple pies are to die for.”

My demonstration was successful. Maybe too successful. Nick got the area of circle wrong on the next test.

When I handed it back, he acknowledged my point with a combination of irritation and admiration. Nick never got the area of a circle wrong again. And we never had to talk about his Dear Aunt Sally again, either.

[No mathematical understanding was harmed in this story.]

Follow

Get every new post delivered to your Inbox

Join other followers: