Video: Thinking Visually About Higher Dimensions

Grant Sanderson • 3Blue1Brown • Boclips

Thinking Visually About Higher Dimensions

24:49

Video Transcript

Math is sometimes a real tease. It seduces us with the beauty of reasoning geometrically in two and three dimensions where there’s this really nice back-and-forth between pairs or triplets of numbers and spatial stuff that our visual cortex is good at processing.

For example, if you think about a circle with radius one centered at the origin, you are in effect conceptualizing every possible pair of numbers, 𝑥 and 𝑦, that satisfy a certain numerical property, that 𝑥 squared plus 𝑦 squared is one. And the usefulness here is that a lot of facts that look opaque in a purely analytic context become quite clear geometrically, and vice versa. Honestly, this channel has been the direct beneficiary of this back-and-forth, since it offers such a rich library of that special category of cleverness that involves connecting two seemingly disparate ideas.

And I don’t just mean the general back-and-forth between pairs or triplets of numbers and spatial reasoning. I mean this specific one between sums of squares and circles and spheres. It’s at the heart of the video I made showing how 𝜋 is connected to number theory and primes and the one showing how to visualize all possible Pythagorean triples. It also underlies the video on the Borsuk-Ulam theorem being used to solve what was basically a counting puzzle by using topological facts about spheres. There is no doubt that the ability to frame analytic facts geometrically is very useful for math. But it’s all a tease, because when you start asking questions about quadruplets or quintuplets or 100-tuples of numbers, it’s frustrating.

The constraints on our physical space seem to have constrained our intuitions about geometry, and we lose this back-and-forth. I mean it is completely reasonable to imagine that there are problems out there that would have clever and illuminating solutions if only we knew how to conceptualize, say, lists of 10 numbers as individual points in some space. For mathematicians or computer scientists or physicists, problems that are framed in terms of lists of numbers, lists of more than three numbers, are a regular part of the job. And the standard approach to actually doing math in higher dimensions is to use two and three dimensions for analogy, but to fundamentally reason about things just analytically, somewhat analogous to a pilot relying primarily on instruments and not sight while flying through the clouds.

Now what I wanna offer here is a hybrid between the purely geometric and the purely analytic views, a method for making the analytic reasoning a little more visual in a way that generalizes to arbitrarily high dimensions. And to drive home the value of a tactic like this, I wanna share with you a very famous example where analogies with two and three dimensions cannot help, because of something extremely counterintuitive that only happens in higher dimensions. The hope, though, is that what I show you here helps to make that phenomenon more intuitive.

The focus throughout will be on higher-dimensional spheres. For example, when we talk about a four-dimensional sphere, say with radius one, centered at the origin. What that actually is, is the set of all quadruplets of numbers — 𝑥, 𝑦, 𝑧, 𝑤 — where the sum of the squares of these numbers is one. What I have pictured here now is multiple three-dimensional slices of a 4D sphere projected back into three dimensions. But it’s confusing and even if you do wrap your head around it, it just pushes the question back to how you would think about a five- or a six- or a seven-dimensional sphere. And more importantly, squinting your eyes to understand a projection like this is not very reflective of what doing math with a 4D sphere actually entails.

Instead, the basic idea here will be to get very literal about it and to think about four separate numbers. I like to picture four vertical number lines with sliders to represent each number. Each configuration of these sliders is a point in 4D space, a quadruplet of numbers. And what it means to be on a 4D-unit sphere centered at the origin is that the sum of the squares of these four values is one.

Our goal is to understand which movements of these sliders correspond to movements on the sphere. To do that, it helps if we knock things down to two dimensions where we can actually see the circle. So ask yourself, what’s a nice way to think about this relation, that 𝑥 squared plus 𝑦 squared is one? Well, I like to think of the value of 𝑥 squared as the real estate belonging to 𝑥 and, likewise, the value of 𝑦 squared is the real estate belonging to 𝑦 and that they have a total of one unit of real estate to share between them. So moving around on the circle corresponds to a constant exchange of real estate between the two variables. Part of the reason I choose this term is that it lets us make a very useful analogy, that real estate is cheap near zero and more expensive away from zero.

To see this, consider starting off in a position where 𝑥 equals one and 𝑦 is zero. Meaning 𝑥 has all of the real estate to itself, which in our usual geometric picture means we’re on the rightmost point of the circle. If you move 𝑥 down just a bit to 0.9, the value of 𝑥 squared changes to 0.81. So it has in effect given up 0.19 units of real estate. But for 𝑦 squared to increase by that same amount, 𝑦 has to move an entire 0.44 units away from zero, more than four times the amount that 𝑥 moved. In other words, 𝑥 changed a little to give up expensive real estate so that 𝑦 could move a lot and gain the same value of cheap real estate. In terms of the usual circle drawing, this corresponds to the steep slope near the right side. A small nudge in 𝑥 allows for a very big change to 𝑦.

Moving forward, let’s add some tick marks to these lines to indicate what 0.05 units of real estate looks like at each point. That is, how much would 𝑥 have to change so that the value of 𝑥 squared changes by 0.05? As you walk around the circle, the trade-off in value between 𝑥 squared and 𝑦 squared gives this piston-looking dance motion, where the sliders are moving more slowly away from zero. Because real estate is more expensive in those regions. There are just more tick marks to cover per unit distance. Also, a nice side effect of the term real estate is that it aligns naturally with the fact that it comes in units of distance squared. So the square root of the total real estate among all coordinates gives us the distance from the origin.

For a unit sphere in three dimensions, the set of all triplets 𝑥, 𝑦, 𝑧, where the sum of their squares is one, all we have to do is add a third slider for 𝑧. But these three sliders still only have the one unit of real estate to share between them. To get a feel for this, imagine holding 𝑥 in place at 0.5, where it occupies 0.25 units of real estate. What this means is that 𝑦 and 𝑧 can move around in the same piston dance motion we saw before as they trade off the remaining 0.75 units of real estate. In terms of our typical way of visualizing a sphere, this corresponds to slicing the sphere along the plane where 𝑥 is 0.5 and looking at the circle formed by all of the choices for 𝑦 and 𝑧 on that sphere.

As you increase the value of 𝑥, the amount of real estate left over for 𝑦 and 𝑧 is smaller. And this more constrained piston dance is what it feels like for the circular slice to be smaller. Eventually, once 𝑥 reaches the value one, there’s no real estate left over. So you reach this singularity point where 𝑦 and 𝑧 are both forced to be zero. The feeling here is a bit like being a bug on the surface of the sphere. You are unable to see the whole sphere all at once. Instead, you’re just sitting on a single point. And you have some sense for what local movements are allowed. In four dimensions and higher, we lose the crutch of the global view that a spatial visual offers. But the fundamental rules of this real estate exchange remain the same.

If you fix one slider in place and watch the other three trade off, this is basically what it means to take a slice of the 4D sphere to get a small 3D sphere in much the same way that fixing one of the sliders for the three-dimensional case give us a circular slice when the remaining two were free to vary. Now watching these sliders move about and thinking about the real estate exchange is pretty fun. But it runs the risk of being aimless unless we have an actual high-dimensional puzzle to sink our teeth into. So let’s set aside the sliders for just a moment and bring in a very classic example of something that seems reasonable and even dull in two and three dimensions, but which is totally out of whack in higher dimensions.

To start, take a two-by-two box centered at the origin. Its corners are on the vertices one, one; one, negative one; negative one, one; and negative one, negative one. Draw four circles, each with radius one, centered at these four vertices. So each one is tangent to two of its neighbors. Now I want you to think of the circle centered at the origin which is just large enough to be touching those corner circles, tangent to each one of them. What we wanna do for this setup and for its analogies in higher dimensions is find the radius of that inner circle. Here in two dimensions, we can use the Pythagorean theorem to see that the distance from the origin to the corner of the box is the square root of two, which is around 1.414. Then you can subtract off this portion here, the radius of the corner circle, which by definition is one. And that means the radius of the inner circle is square root of two minus one or about 0.414.

No surprises here, that seems pretty reasonable. Now do something analogous in three dimensions. Draw a two-by-two-by-two cube whose corners have vertices one, one, one; one, one, negative one; on and on and on. And then we’re gonna take eight different spheres each of which has a radius one and center them on these vertices so that each one is tangent to three of its neighbors. Now, again, think about the sphere centered at the origin which is just large enough to be barely touching those eight corner spheres. As before, we can start by thinking about the distance from the origin to the corner of the box, say the corner at one, one, one.

By the way, I guess I still haven’t yet explicitly said that the way distances work in higher dimensions is always to add up the squares of the components in each direction and take the square root. If you’ve never seen why this follows from the Pythagorean theorem just in the two-dimensional case, it’s actually a really fun puzzle to think about. And I’ve left the relevant image up on the screen for any of you who wanna pause and ponder on it.

Anyway, in our case, the distance between the origin and the corner one, one, one is the square root of one squared plus one squared plus one squared or square root of three which is about 1.73. So the radius of that inner sphere is gonna be this quantity minus the radius of a corner sphere, which by definition is one. And, again, 0.73 seems like a reasonable radius for that inner sphere. But what happens to that inner radius as you increase dimensions? Obviously, the reason I bring this up is that something surprising will happen. And some of you might see where this is going. But I actually don’t want it to feel like a surprise.

As fun as it is to wow people with counterintuitive facts in math, the goal here is genuine understanding, not shock. For higher dimensions, we’ll be using sliders to get a gut feel for what’s going on. But since it’s kind of a different way of viewing things, it helps to get a running start by looking back at how to analyze the two and three-dimensional cases in the context of sliders.

First things first, how do you think about a circle centered at a corner like one, negative one? Well, previously, for a circle centered at the origin, the amount of real estate belonging to both 𝑥 and 𝑦 was dependent on their distance from the number zero. And it’s the same basic idea here as you move around the center. It’s just that the real estate might be dependent on the distance between each coordinate and some other number. So for this circle centered at one, negative one, the amount of real estate belonging to 𝑥 is the square of its distance from one. Likewise, the real estate belonging to 𝑦 is the square of its distance from negative one. Other than that, the look and feel with this piston dance trade-off is completely the same.

For simplicity, we’ll only focus on one of these circles, the one centered at one, one. Now ask yourself, what does it mean to find a circle centered at the origin large enough to be tangent to this guy when we’re thinking just in terms of sliders? Well, notice how this point of tangency happens when the 𝑥- and 𝑦-coordinates are both the same. Or, phrased differently, at the point of this corner circle closest to the origin, the real estate is shared evenly between 𝑥 and 𝑦. This will be important for later. So let’s really dig in and think about why it’s true.

Imagine perturbing that point slightly, maybe moving 𝑥 a little closer to zero, which means 𝑦 would have to move a little away from zero. The change in 𝑥 would have to be a little smaller than the change in 𝑦, since the real estate it gains by moving farther away from one is more expensive than the real estate that 𝑦 loses by getting closer to one. But from the perspective of the origin point zero, zero, that trade-off is reversed. The resulting change to 𝑥 squared is smaller than the resulting change to 𝑦 squared, since when real estate is measured with respect to zero, zero, that move of 𝑦 towards one is the more expensive one.

What this means is that any slight perturbation away from this point, where real estate is shared evenly, results in an increasing distance from the origin. The reason we care is that this point is tangent to the inner circle. So we can also think about it as being a point of the inner circle. And this will be very useful for higher dimensions. It gives us a reference point to understanding the radius of that inner circle. Specifically, you can ask how much real estate is shared between 𝑥 and 𝑦 at this point when real estate measurements are done with respect to the origin, zero, zero. For example, down here in two dimensions, both 𝑥 and 𝑦 dip below 0.5 in this configuration. So the total value, 𝑥 squared plus 𝑦 squared, is gonna be less than 0.5 squared plus 0.5 squared.

Comparing to this halfway point is really gonna come in handy for wrapping our mind around what happens in higher dimensions. Taking things one step at a time, let’s bump it up to three dimensions. Consider the corner sphere with radius one centered at one, one, one. The point on that sphere that’s closest to the origin corresponds to the configuration of sliders where 𝑥, 𝑦 and 𝑧 are all reaching down toward zero and equal to each other. Again, they all have to go a little beyond that halfway point, because the position 0.5 only accounts for 0.5 squared or 0.25 units of real estate. So with all three coordinates getting a third of a unit of real estate, they need to be farther out.

And, again, since this is a point where the corner sphere is tangent to the inner sphere, it’s also a point of the inner sphere. So with reference to the origin zero, zero, zero, think about the amount of real estate shared between 𝑥, 𝑦 and 𝑧 in this position corresponding to the tangent point. It’s definitely less than 0.75, since all three of these are smaller than 0.5. So each one has less than 0.25 units of real estate. And, again, we sit back and feel comfortable with this result, right? The inner sphere is smaller than the corner spheres. But things get interesting when we move up into four dimensions. Our two-by-two-by-two-by-two box is gonna have 16 vertices at one, one, one, one; one, one, one, negative one; and so on, with all possible binary combinations of one and negative one.

What this means is that there are 16 unit spheres centered at these corners, each one tangent to four of its neighbors. As before, we’ll just be focusing on one of them, the one centered at one, one, one, one. The point of the sphere closest to the origin corresponds to the configuration of sliders where all four coordinates reach exactly halfway between one and zero. And that’s because when one of the coordinates is 0.5 units away from one, it has 0.25 units of real estate with respect to the point one. We do the same trick as before, thinking of this now as a point of the inner sphere and measuring things with respect to the origin. But you can already see what’s cool about four dimensions.

As you switch to thinking of real estate with respect to zero, zero, zero, zero, it’s still the case that each of these four coordinates has 0.25 units of real estate, making for a total of one shared between the four coordinates. In other words, that inner sphere is precisely the same size as the corner spheres. This matches with what you see numerically, by the way, where you can compute the distance between the origin and the corner one, one, one, one is the square root of four. And then when you subtract off the radius of one of the corners spheres, what you get is one. But there’s something much more satisfying about seeing it, rather than just computing it.

In particular, here’s a cool aspect of the fact that that inner sphere has radius one. Move things around so that all of the real estate goes to the coordinate 𝑥, and you’ll end up at the point one, zero, zero, zero. This point is actually touching the two-by-two-by-two-by-two box. And when you’re stuck thinking in the two- or three-dimensional cases, this fact that the inner sphere has radius one, the same size as the corner spheres, and that it touches the box, well it just seems too big. But it’s important to realize, this is fundamentally a four-dimensional phenomenon. And you just can’t cram it down into smaller dimensions.

But things get weirder. Let’s knock it up to five dimensions. In this case, we have quite a few corner spheres, 32 in total. But, again, for simplicity, we’ll only be thinking about the one centered at one, one, one, one, one. Think about the point of the sphere closest to the origin where all five coordinates are equally splitting the one unit of shared real-estate. This time, each coordinate is a little higher than 0.5. If they reach down to 0.5, each one would have 0.25 units of real estate, giving a total of 1.25, which is too much. But, the tables are turned when you view this as a point on the inner sphere. Because with respect to the origin, this configuration has much more than one unit of real estate.

Not only is every coordinate more than 0.5 units away from zero, but the larger number of dimensions means that there’s more total real estate when you add it all up. Specifically, you can compute that the radius of that inner sphere is about 1.24. The intuitive feel for what that means is that the sliders can roam over more territory than what just a single unit of real estate would allow. One fun way to see what this means is to adjust everything so that all of the real estate goes to just one coordinate. Because this coordinate can reach beyond one, what you are seeing is that this five-dimensional inner sphere actually pokes outside the box.

But to really get a feel for how strange things become, as a last example, I wanna jump up into 10 dimensions. Remember, all this means is that points have 10 coordinates. For a sphere with radius one, a single unit of real estate must be shared among all 10 of those coordinates. As always, the point of this corner sphere closest to the origin is the one where all 10 coordinates split the real estate evenly. And here, you can really see just how far away this feels from the origin. Or, phrased differently, that inner sphere is allowed to have a very large amount of real estate. In fact, you can compute that the radius of the inner sphere is about 2.16.

And viewed from this perspective, where you have 10 full dimensions to share that real estate, doesn’t it actually feel somewhat reasonable that the inner sphere should have a radius more than twice as big as all those corner spheres? To get a sense for just how big this inner sphere is, look back in two dimensions and imagine a four-by-four box bounding all four circles from the outside. Or, go to three dimensions and imagine a four-by-four-by-four box bounding all of those corner spheres from the outside. Way up here in 10 dimensions, that, quote, unquote, “inner sphere” is actually large enough to poke outside of that outer bounding box, since it has a diameter bigger than four.

I know that seems crazy! But you have to realize that the face of the box is always two units away from the origin, no matter how high the dimension is. And fundamentally, it’s because it only involves moving along a single axis. But the point one, one, one, one, one, one, one, one, one, one which determines the inner sphere’s radius is actually really far away from the center, all the way up here in 10 dimensions. And it’s because all 10 of those dimensions add a full unit of real estate for that point. And, of course, as you keep upping the dimensions, that inner sphere just keeps growing without bound. Not only is it poking outside of these boxes, but the proportion of the inner sphere lying inside the box decreases exponentially towards zero as the dimension keeps increasing.

So taking a step back, one of the things I like about using this slider method for teaching is that when I shared it with a few friends, the way they started to talk about higher dimensions became a little less metaphysical and started to sound more like how you would hear a mathematician talk about the topic. Rather than skeptically asking whether or not 10-dimensional space is a real thing, recognizing that it’s exactly as real as numbers are, people would actually probe at what other properties high-dimensional spheres have and what other shapes feel like in terms of sliders.

This box situation is just one in a number of things that feel very crazy about higher-dimensional spheres. And it’s really fun to think about these others in the context of sliders and real estate. It’s obviously limited. I mean, you’re a bug on the surface of these objects, only getting a feel for one point at a time and for the rules of movement. Also, geometry can be quite nice when its coordinate free. And this is the opposite of that. But it does give a foothold into thinking about high-dimensional shapes a little more concretely.

Now you could say that viewing things with sliders is no different from thinking about things purely analytically. I mean, it’s honestly a little more than representing each coordinate literally. It’s kinda the most obvious thing you might do. But this small move makes it much more possible to play with the thought of a high-dimensional point. And even little things, like thinking about the squares of coordinates as real estate, can shed light on some seemingly strange aspects of high dimensions, like just how far away the corner of a box is from its center.

If anything, the fact that it’s such a direct representation of a purely analytic description is exactly what makes it such a faithful reflection of what genuinely doing math in higher dimensions entails. We’re still flying in the clouds, trusting the instruments of analytic reasoning. But this is a redesign of those instruments, one which better takes advantage of the fact that such a large portion of our brains goes towards image processing. I mean, just because you can’t visualize something doesn’t mean you can’t still think about it visually.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.