On the volumes of higher-dimensional spheres
Explore the 3b1b virtual career fair: See https://3b1b.co/talent
Become a supporter for early views of new videos: https://3b1b.co/support
An equally valuable form of support is to simply share the videos.
Home page: https://www.3blue1brown.com
Thanks to UC Santa Cruz for letting me film there, and special thanks to
Pedro Morales-Almazan for arranging everything.
My video on Numberphile with a fun application of this problem: https://youtu.be/6_yU9eJ0NxA
Timestamps:
0:00 - Introduction
1:01 - Random puzzle
6:16 - Outside the box
14:35 - Setting up the volume grid
21:14 - Why 4πr^2
25:21 - Archimedes in higher dimensions
36:17 - The general formula
40:40 - 1/2 factorial
44:58 - Why 5D spheres are the biggest
50:16 - Concentration at the surface
54:27 - A unit-free interpretation
57:50 - 3b1b Talent
59:13 - Explaining the intro animation
------------------
These animations are largely made using a custom Python library, manim. See the FAQ comments here:
https://3b1b.co/faq#manim
Music by Vincent Rubinetti.
https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown
https://open.spotify.com/album/1dVyjwS8FBqXhRunaG5W5u
------------------
3blue1brown is a channel about animating math, in all senses of the word animate. If you're reading the bottom of a video description, I'm guessing you're more interested than the average viewer in lessons here. It would mean a lot to me if you chose to stay up to date on new ones, either by subscribing here on YouTube or otherwise following on whichever platform below you check most regularly.
Mailing list: https://3blue1brown.substack.com
Twitter: https://twitter.com/3blue1brown
Bluesky: https://bsky.app/profile/3blue1brown.com
Instagram: https://www.instagram.com/3blue1brown
Reddit: https://www.reddit.com/r/3blue1brown
Facebook: https://www.facebook.com/3blue1brown
Patreon: https://patreon.com/3blue1brown
Website: https://www.3blue1brown.com
Оглавление (13 сегментов)
Introduction
[Submit subtitle corrections at criblate. com] Thank you very much. It is good to be here. I don't know if you people realize what a beautiful campus you have and how you basically just study in heaven. Today, I want to talk with you about what I think is one of the most underappreciated formulas, not because those who know it don't appreciate it, but because not enough people know about this. And more importantly, not enough people understand where it comes from. And this should be one of the gems. It's this should be the e to the pi i of the mathematical community. But I really want you to come away knowing not just what it is, but why it's true and what it represents. Now, before I dive straight into it, I think the scene is best set if we start with two different puzzles. The first puzzle is just going to give us a sense of the meaning of what we're about to do because it runs the risk of feeling pretty abstract. And then the second puzzle is going to be a kind of forewarning, not to trust our intuitions. So let's start with the first puzzle. This is our warm up for today.
Random puzzle
We're going to start by imagining that there's a random number. I'm going to call it X. It's going to sit between negative one, positive one, chosen uniformly. X is going to have a friend, another random number, Y, chosen between negative one and positive one uniformly. And we're going to ask a question, a probability question about both of these, which is, what's the probability that if you square X and then you add it to the square of Y, you end up with something which is less than or equal to one? So let me throw this out to the audience. Anyone want to raise their hand and throw out probability that you choose this random X, choose this random Y, you add their squares, it's going to be less than one. Let's see. So I see a blue shirt up here. Yeah, do you want to pass it out? I mean, X squared plus Y squared makes like a unit circle. So my guess would be it be related to the area of the unit circle over the area of like a unit square. Amazing. So I asked this question and immediately in your mind, there's an image that pops up. And the point I want to make is this is an analytical question. This is just a question about two numbers. If you're savvy with your probability, you could set up some integrals not thinking about geometry and answer the question, but that would feel a little bit like a crime. The question is kind of screaming out at you that it wants to be a picture. The natural way that this wants to be answered is to think of that pair of numbers, X and Y, as a point in a two-dimensional space. And that way, when you're thinking of a random choice for X independent from a random choice of Y, you're choosing a random point inside. Well, in this case, it's a square that goes from X equals negative 1 to positive 1. Same with Y. So it's a two-by-two square. Now, the reason it's screaming out to be geometric is because this constraint of X squared plus Y squared being less than equal to 1 is the meaning of being inside a circle. And it's saying if X squared plus Y squared is equal to 1, that would actually land you on the boundary. This follows straight from the Pythagorean theorem. You can draw a nice little right triangle. X gives you one leg, Y gives you the other leg. And you end up answering, in this case, area of that circle divided by area of the square. All you need to know is the area of a circle. Pi R squared, this is one of those formulas we learned in high school. So you can write down pi divided by 4. All well and good. And then we can bump it up. I could say, what if instead of choosing two random numbers, X and Y, they had a third friend, Z? Same deal, uniform between negative 1 and 1. You square it. You want to ask the probability that the sum of all those numbers is less than or equal to 1. In your mind's eye, it's screaming to you, hey, I want to be a three-dimensional picture now. It doesn't have to be. You could answer it purely analytically, but it would somehow feel wrong not to turn this into a three-dimensional picture. Because in this case, that constraint of X squared plus Y squared plus Z squared being less than 1 means sitting inside of a unit sphere. And so in this case, to answer the probability question, you just need to know what's the volume of that unit sphere as it compares to the volume of this 2 by 2 cube. This is another one of those formulas we might have learned in middle school or high school. Volume of a sphere ends up being 4 thirds pi times its radius squared. Radius in this case is 1. You work it all out, and you get, I guess, a little above 50%. Now, there's no reason that we'd have to stop there. This is three numbers, but what if I asked about four numbers? Now, at this point, your mind's eye is going to start kind of squinking a little bit because it's like, I know what I want to be seeing right now in the same way that the first problem screamed out that it wants you to be thinking about a circle. This one whatever the four-dimensional equivalent of circles and spheres should be. But again, it's a perfectly reasonable question. It's a very empirical question. It's very real, and I don't have to stop there. We could say, what if you had 100 different numbers, you add up all their squares, and I want to know the probability that they add up to be something less than 1? To ask that question is to kind of force yourself to want to know the volume of a 100-dimensional unit ball. Now, that might seem kind of weird. If you just heard a mathematician off the street saying that they found some formula for the volumes of high-dimensional balls, that risks sounding like something which is just nonsense. It's so divorced from reality because we're used to living in three dimensions. But the point I want to make is that higher-dimensional geometry is real. Just because it's not describing a literal physical space doesn't mean that it doesn't have a kind of utility. Now, it probably doesn't need to be emphasized nowadays because machine learning is awash in high-dimensional geometry. Essentially, any time that you're representing something with a long list of numbers, you could choose to interpret that as a point in a high-dimensional space. And one of the big lessons of geometry is that that's a fruitful choice to make. It helps your problem solving. It makes certain things that would have been really hard, like setting up 100 different integrals for this probability question, turn into something easier. I don't think I need to emphasize this to you because these days, we have things like large language models. And if you dig under the hood and say, what's really going on when you interact with ChatGPT or Claude or Gemini or whichever one your favorite one is, the under-the-hood scheme basically looks like breaking up all of your text into little chunks. And each of those chunks gets turned into a long, long list of numbers. And you don't have to think about that as a point in high-dimensional space. You could just say, oh, it's this big, long list of numbers. But to try to understand what these models are doing, it ends up being really fruitful to think about those long lists of numbers that the words turn into as being points in a space. When people do research to interpret these things, all of their language is centered around talking about points in some kind of high-dimensional space.
Outside the box
That's all to say, high dimensions are useful. But this is a little bit of a problem because high-dimensional geometry can get very counterintuitive. And the second puzzle here is just an absolute classic. This is one of those things where I think everybody, sometime, you know, if they're entering a STEM field, going into college, they should see this example at some point as a kind of like Aesop's fable of something you might want to avoid. So here's going to be the setup. We're again going to have a 2 by 2 square centered at the origin, goes from x equals negative 1 to y equals positive 1. I'm going to put a circle at each one of its corners. So the corners are sitting at 1, 1, negative 1, negative 1, on and on. I'm going to put a unit circle on each one of those. And so by definition, those corner circles have a radius of 1. And the question I'm going to ask here is to say, what if I was to give them another friend, a circle that sits on the inside, that gets as big as it can to be tangent to all of them on the outside? What's the radius of that inner circle? Just a geometry question, just a little puzzle. We're still in the warm-up phase. Again, anyone want to raise their hand and kind of toss out a proposed answer here? All right, we got a raised hand over here. You can take a look at the diagonal, calculate the length of that bag, and then subtract from that vr twice. Love it. So we're going to look at the diagonal from the origin to the corner of that cube. And that looks like square root of, well, in this case, the legs are 1 and 1. So square root of 1 squared plus 1 squared, that distance is square root of 2. And then we're going to subtract off the radius of that outer circle. Subtract off the one that was, by definition, radius 1. So the answer, square root of 2 minus 1, you work it out. It's about 0. 4. You look at the picture, you say, I don't know, seems reasonable. Why is this an interesting question? I say, wait, wait, you'll see, you'll see. So then you could go to three dimensions, and we're going to do the same setup. We're going to have a unit ball on each one of the corners. So in this case, we're going to have not four, but eight different unit spheres. Each one of them has a radius 1. They're sitting on all of the corners. And we're going to play the same game. I say, introduce a new sphere centered at the origin that is as big as it can be, meaning it gets as big as it needs to be tangent to those eight outer spheres. Same question, what is the radius of that inner sphere? In this case, anybody want to raise their hands, toss out a proposed answer to the radius of this one? Up close? Root 3 minus 1. Okay, so you say root 3 because you understand Pythagorean theorem in three dimensions. I might belabor the point here. Forgive me if this is telling you something you already know. I really want to emphasize why the distance rule is what it is. Because the result I'm about to get to is so counterintuitive that when I've put it online before, there have been comments to the effect of maybe distance in higher dimensions just doesn't work the way that we think it does. What I want to emphasize is everything's just stemming from the rule in two dimensions. So if you have a unit cube, you can play the same two dimensional Pythagorean theorem game. Because having that diagonal of one square, that could be one leg of a new right triangle, where another leg is this z axis. And then from there, you do the normal two dimensional Pythagorean theorem. So we're not imbuing 3D space with a new rule. It's more like it's inheriting the rule from all its two dimensional subspaces. You work it out, you end up with root 3. So in this case, that means the final answer, root 3 minus 1. Again, you do the calculation, looks to be about 0. 7. You say, seems reasonable. Why is this interesting? But let's just keep upping it. Up in four dimensions, I don't know how to draw a four dimensional cube. This is my best attempt. It's something that would look like a cube, but it's got another cube as the top cap and some lines connecting the vertices. But we know how to calculate the distance. The exact same logic is going to let us go up one more, where you would be drawing a two dimensional right triangle, where one leg is that root 3, that's the diagonal of a unit cube. And then you just step up in some fourth direction. Now, this one's kind of cute because the distance to the corner is square root of 4, which means it's a whole number, it's 2. And in this case, whatever that diagram should look like in four dimensions, it's got 16 different corners, 16 different unit balls. One thing that's really nice about four dimensions is that a unit ball fits nice and snugly right in the middle of them. So this gives you a little instinct for what sphere packing in four dimensions can look like. Now, where this gets more interesting is if we think in generality. If we say, okay, not just for three or four dimensions, but for n dimensions, what would this look like? The distance to the corner of that cube is going to look like square root of n. We're always subtracting off the radius of that corner sphere, which is by definition 1. So for example, up in 10 dimensions, it looks like root 10 minus 1, which is about 2. 16. Now, if you just look at that and you kind of nod along with the formulas, you might say, okay, seems reasonable, I guess that's what things would be. But it gets really, really weird when you try to interpret it geometrically and physically. Because here's what I'm going to do. I'm going to draw a new box outside of the entire diagram that we had. So before we introduce that center circle, I'm going to draw this 4 by 4 bounding box outside of everything. And if in two dimensions I said, notice that inner circle is inside all of those, or in three dimensions, the inner sphere is inside of that whole bounding box, you'd say, yeah, obviously, like, it seems like by definition, it must be inside of it. But the weird part is the distance from your origin to the edge of that bounding box, because it's 4 by 4, ends up being 2 to get to that edge. So if we're saying up in 10 dimensions, whatever this diagram should look like with its 2 to the 10th different corners, whole bunch of little unit balls up there, expanding some sort of inner sphere, that inner sphere is actually dramatically bigger than all your corner spheres. It's even bigger than that bounding box. It pokes outside the bounding box. Now that's just bizarre. And it's so bizarre, there's this common phrase that I've heard from other people who've described this problem where they say, this suggests that higher dimensional spheres are very spiky. I don't know if anyone's heard this intuition would say, yeah, high dimensional spheres are spiky. I hate this. Because they're not. They're very round. They're round because they are defined to be round. What is a sphere in a high number of dimensions? It's all of the points that are a given distance from the origin. So it is as round could be. Spheres are not the problem. This is counterintuitive, but spheres, they're fine. You know who's the problem? It's the cubes. Cubes are messed up in higher dimensions. At the very least, they defy our intuition. Because what's really going on with this example is we've got this very high dimensional cube where to get from the origin to the edge of it, that point that a high dimensional sphere on the inside could bounce outside of, let's say this is a two by two box, it's just going to be a distance one to get to the edge of that two by two box. But to get to the corner, that's actually a lot longer. Because up in 10 dimensions, to get to that corner, you've got to walk in your first dimension, then your second dimension, then your third dimension, then your fourth dimension, then your sixth, on and on 10 times. Now, even if you're not taking perpendicular steps and you take the shortcut to just go straight across, you know, the shortcut can only get you so much. So it gets you a square root speed up, but not anything better than that. So the very loose schematic picture I have in my head for high dimensional cubes, and take this with a grain of salt, is it's something like this, where your corners are just way, way farther away than the edge. Again, grain of salt because it's not like their sides are curved, but just cram this intuition into two dimensions. That's what we have to do. So for this example, if we're thinking what's going on, when we put those unit spheres on the corners, those unit spheres are just way far away. They're just way off there. So when we have that inside one that's growing as big as it needs to be tangent to all of those, it's got to get massive. Now, this picture is also still not quite right because I'm cramming it into two dimensions and I'm only showing four corners, but there's many, many corners. There's two to the n different corners. So the new loose schematic that you might have for this is something where rather than just those four corners, you have a whole bunch of corners. So very vaguely speaking, this is the picture to have in your mind for what's going on with that example. So the inner sphere does bust out, but in some sense it's still contained by all of those corners. So this is all to say, high dimensional geometry for all of its utility is unfortunately very counterintuitive. And I think maybe the better way of framing is that it risks being counterintuitive. I think if you find the right ways to think about these shapes, they actually can become your friends.
Setting up the volume grid
And this is what brings us to the real me. The real reason we're all here. I don't want to talk about how it's real and useful. I don't even want to talk about how it's counterintuitive. I want to talk about something that's just completely beautiful about higher dimensional spheres specifically. And this is that formula that I referenced. What it's going to describe is the volume of a ball up in a higher number of dimensions. You can focus on a ball with radius one, but just add an R to the end there if you want. So we're going to build up to this. We're going to talk about where it comes from. I want it to feel like it's deep in your bones, something that you really felt like you could have discovered it yourself. And in order to get up there, I think it's worth just spending some time with the familiar friends that we have, which are the relevant formulas you might have come across already in school. And so there's four main ones here. You've got the circumference of a circle. So this is measuring the boundary in two dimensions. And this is 2 pi times the radius. This is basically the definition of pi. So after here, everything is a derivation. But this one you could call a definition. This is what the constant pi even means. Now below it, I'm going to draw pi R squared. That's measuring the interior of the square. So still in two dimensions, interior, our good old friend pi R squared. Up in three dimensions, the boundary, that surface area looks like 4 pi R squared. Very fun. Very suspicious because it's exactly four times the circle. So that might be worth revisiting. And then the interior, the volume of a sphere, is 4 thirds pi R cubed. So these are the ones we might have seen. I'm going to put them inside a chart. And our goal today is basically to fill out this chart. So the way I'm orchestrating this, I'm going to label that bottom row BN, meaning a ball in N dimensions. So for example, a ball in two dimensions, that's a filled in circle. A ball in three dimensions, that's the thing we would usually call a ball. But we're going to use this as a very general term across all the dimensions. And then above that, I'm going to label things with this little Dell symbol that you often use to mean partial. So this is just a bit of notation. In this case, it doesn't mean partial. It actually means the boundary. So the boundary of a ball in N dimensions. two dimensions, that's the circle. In three dimensions, it's the shell of the sphere. Now the notation that kind of looks like a little D kind of gives some calculus vibes. I actually think is helpful for an important rule about this chart. I want you to think a little bit, because I know all of you have probably had some kind of exposure to calculus in your background. I want you to think about the relationship between the bottom row and the top row. And again, I'm going to just throw this out. Anyone want to raise their hands and kind of say what is the relationship? So right over here. Yeah. It's a derivative, right? How many of you like thought this was very fun the first time? I don't know. Maybe this is the first time you've seen it. The first time I saw this, I remember thinking, that's weird. Why is that true? Now it's but a little calculus student who maybe didn't have a deep enough intuition for what the whole field was. But there's a very good reason this is true in terms of the meaning of a derivative. So if you think of what would it mean to take the derivative of the area formula, you're kind of saying, well, suppose you were to increase that radius of a circle by a little amount, some little dr. How much has that area changed? What is the resulting change to that area that we might call da? And what this is saying is approximately, it's about the circumference of that circle times that little dr. Now this is wrong if you interpret dr and da as literal amounts, some kind of actual tiny nudge like a physicist. But the idea is that it becomes less wrong if you let that dr get smaller and smaller. I'm a fan of the physicist's perspective. I don't mean that in a derogatory way. I actually think it's the way we should all teach it. But the technical meaning of this would be this is not actually an equation. It's something that becomes less and less wrong as you let that little dr approach something close to zero or approach zero rather. And then same intuition the other way around is basically saying you could think of the interior of the circle as kind of integrating together a whole bunch of boundaries. And when you integrate all of those boundaries that grow proportionally to r, taking that integral looks like turning the r into r squared and dividing by two. That division is going to be very important for us. So remember it. Same deal in three dimensions just to state it all. You've got a ball. If you were looking at its volume and you want to know what's the rate of change of its volume, a really nice way to think about that is that it is based on the surface area of that sphere. You're saying what is the tiny change in volume caused by a tiny change to the radius? Well, it's about the area of that shell times the thickness that you've given it. Now that's wrong as stated with a literal number that you plug in for little dr. But it becomes less wrong if you let dr shrink and shrink closer to zero. And then on the flip side too, you can think of it by integrating together a bunch of shells and integrating the r squared turns into one third r cubed. And that one third is important. That idea that integration gives us that division is going to matter a lot. So we know how to go up and down in this diagram. That's the important part. If you know something on the bottom row, you can step up. Now our real question is how do we go left and right? And before we go in the interesting direction to all the higher dimensions, let's give a little love to the first dimension because we do a lot of two dimensional three dimensional geometry. One dimensional geometry always kind of gets the short shift and maybe it's because it's a little less fun. But take a moment to think what should the volume of the interior of a one dimensional ball be? Anyone want to hazard an answer? What should the formula be for one dimensional ball? Yeah, here. Would it just be a constant because it's kind of like a line? Well, it's going to be... It is a line, but it's not going to be constant because we want to think of with respect to a radius. So as you increase that radius... 2 times r. Yeah, exactly. 2 times r. So we say what is a ball in one dimension? Well, it's all the points within a distance r from some center point. That ends up looking like a line. And in the same way that in two dimensions, the way that we're measuring like volume is with area in three dimensions. It's our normal meaning of volume. Down here, what I mean by the volume of a one dimensional ball, using this word volume in a general sense across all the dimensions would just be the length and the length is 2r. And what's fun here is if we just try to blindly follow the rule of taking a derivative to get up top, we end up with the idea that the volume of the boundary of a one dimensional ball is 2. Which at first seems weird because what's the boundary of a one dimensional ball? We think about it and say, well, it's just two different points and what should zero dimensional volume be? I guess just counting those points seems as reasonable as anything, but it follows the pattern. So that gives us a little reassurance and that'll be a general theme as we move forward here. Something that seems a little suspicious at first, but that follows the pattern kind of gives us a comfortable feeling in our hearts.
Why 4πr^2
Now, of course, I know you want to see how we move to the right. How do we get into those higher dimensions? But to get a running start at it, I want to linger a little bit on where exactly those three dimensional formulas are coming from. Because the logic that gets us an understanding of, for example, the surface area of a sphere is going to actually carry us even farther if we think about it the right way. So I alluded to the fact that a sphere is kind of suspicious because it's got this area that's exactly four times the area of a circle. That may make you wonder, like, where does it come from? Why do we get such a nice formula? And there's a really lovely way of thinking about this surface area that dates a long time back. It goes all the way back to Archimedes. And he had this very clever idea, which was to say, we can think about the area of the surface of a sphere by imagining taking all these little patches on it and projecting them out onto a cylinder that encloses that sphere. Now, you might think this act of projecting and kind of warping it is going to be such a violent affair that it changes the area. Of course, it should change the area. But Archimedes very cleverly pointed out that if you think of one little rectangle of area on that sphere and you imagine what happens as you project it out onto that cylinder, there are two competing effects. It doesn't end up the same. But what happens is it gets stretched out in one direction. But then because it's kind of casting a shadow of something at an angle, it effectively gets squished down in another direction. And those two effects actually cancel each other out perfectly. And it's not too hard to reason about why either. So let's think about one of them. We're going to slice open the sphere. We're going to put some names to things. Let's say the radius of the whole sphere is capital R. And then the distance between the z-axis and our specific choice of a little rectangle, I'm going to call that little d. How much does it get stretched out, say, on the bottom in terms of capital R and little d? And here you can draw two different similar triangles. We could think of the triangle that's isosceles and has a tip on that z-axis point. And its base is the original base of that little rectangle. And then you say, think of a new triangle whose base is the projected version of that little rectangle that was on the sphere. And when you project it out, you're going to get a similar triangle. And because they're similar, the ratios of all of their sides should be the same. So in particular, we know the ratio of the long sides of those isosceles triangles is going to be capital R to d. So that should also be the ratio of that little side, meaning that's the factor by which it gets stretched out in that direction when we project. Now, what about the other way, this competing factor? What's going on there is you kind of think about casting a shadow. So the height of that rectangle looks like this diagonal line here. And then it gets projected down onto something that is perpendicular to the direction of projection. So how much does that get scaled? What's that factor? We can do a nice little angle chasing argument to point out that this little blue right triangle that I've drawn showing us that projection factor is actually similar to this brown right triangle, which again has the side lengths little d and then a hypotenuse R. So finding that is just kind of chase some angles, see what has to be equal, and you end up deducing that these have to be the same. And what that ends up telling you is the factor by which it gets squished down in the other direction is that same R divided by d. So when you do this to all of your little rectangles, each one of them is stretched in one direction, squished in another. But the idea is that it's area preserving. And because it's area preserving, we just have to ask the area of the cylinder, which is a lot easier. Because with a cylinder, you can just unwrap it. You can basically imagine slicing it like a piece of paper, unwrapping it, and you get a rectangle where one edge of that rectangle came from the circumference of that sphere, which would be 2 pi R. And then the other edge just came from the height on that Z axis, the 2 times R. When you multiply those together, you get yourself that 4 pi R squared. So that's where that formula comes from, or at least one way of seeing where that formula comes from. And then like I said, if you're at one row of this diagram, you can just take derivatives and integrals to get yourself up and down. So knowing the surface area is enough to give you the boundary on the inside.
Archimedes in higher dimensions
Now here's the key question. This is a very clever thing that Archimedes did. I don't know if Archimedes ever took a moment to think about four dimensional balls, or five dimensional balls. But if he ever did, I have to imagine he might have wondered, is there some way I could generalize that really nice argument to talk about the boundary of a three dimensional ball and how to measure it? How do I generalize that? And I want you to think about this for a moment, because this is really the crux of everything we're going to talk about today, is taking this clever Archimedean idea, but somehow using it to let us take rightward steps in our diagram. And what I want to convince you of is that kind of the right way to think about what Archimedes was really doing is that he was making a knight's move in this. Might sound a little bit weird. Let me explain. So it's a knight's move where you might think of it combined with that 2 pi r factor. Because if we think of that unwrapped cylinder and we say, where did those two side lengths come from? We were multiplying two amounts. Where did they come from? One of them at the top came from the boundary of a two dimensional ball, that is a circle. That was your 2 pi r. And even though initially it might just look like, oh, that other side, it was a line, because it started off as a line. I want to try to convince you the right way to think about that other side is that it's a one dimensional ball. It's the interior of And here's what I mean. So we're thinking about a three dimensional sphere. What is that? What does it mean to be on the boundary of a three dimensional sphere? Well, really, in terms of coordinates, it means you take three numbers, x, y, and z. And as long as the sum of the squares of those numbers is one, that's what it means to be on the boundary of a sphere. Now, we could say, suppose I ask you, hey, I would like you to give me a point on the boundary of a sphere. One way you could do that, it's kind of a weird way, but one way you could do it is to say, first, I'm going to choose my z value. And as long as z squared is less than or equal to one, I'm going to be safe. That's going to give me enough room to find an x squared and a y squared. And then after choosing a value for z, you have a circle's worth of options for x squared and y squared. That's going to be everything such that the sum of those squares is one minus whatever z squared was. Now, usually, you couldn't use this kind of breakdown to make a nice surface area calculation because there's this dependence where the size of that value z is influencing the size of the circle of options that remains. So you can't just take the length of that line on the z-axis and then multiply it by the size of that circle because that circle is changing size. And it's actually really not obvious, even if you're savvy with multivariable calculus and you want to set this all up and sign this away. It's really not obvious how you can get those two numbers to relate to each other. But the core point of the Archimedean idea was to basically say, you don't have to do that. Now, before I draw that, actually, I want to take the same diagram we're kind of moving z squared and we're letting that influence x and y. But I want to show the same animation in a way that's going to generalize to the four dimensional case. So it's not going to rely on me to drawing that three dimensional picture. Basically, as you move z farther away from zero, it constricts that circle. And you have this dependence between what z you happened to choose and the circle's worth of options left over. OK, so what did Archimedes do, basically? He said, well, it's actually going to be the same as if there was no dependence, as if you took those circles worth of options and you just projected it out. So at all different values of z, it happened to be a unit circle. That's what we mean by a cylinder. If you are comfortable with the language of set theory, you could say that cylinder is a Cartesian product between the line segment and then the circle. And the really nice thing about taking a product like that, where what's happening on one of those sets is just completely independent from the other one, is if you want to calculate the area, in this case, you can just multiply those two numbers because of that independence. So that's what I mean by taking a knight's move here, is that if we're taking that interior of a one-dimensional ball and each one is kind of getting turned into a circle, projected out, and because of this Archimedean idea, it's independent enough that we're safe to just multiply those numbers. Now, what's this going to look like in four dimensions? OK, so we're going to give some notation here. We could say the boundary of a three-dimensional ball looks like the interior of a one-dimensional ball times the boundary of a two-dimensional ball, just a circle. OK, I take that. Here's what it looks like in four dimensions. We're going to say the boundary of a four-dimensional ball is going to look like multiplying the area of the interior of a two-dimensional ball by a circle again. And again, let's think in terms of the coordinates. Why does this make sense? What do we mean by the boundary of a four-dimensional ball? Well, we mean all the points x, y, z, w, got four coordinates now, where you add up their squares and you equal one. One way you could think to make a choice for such a point on that boundary is to first, I'm going to choose a z and a w, and if they're going to give me a valid option, all I need is that the sum of their squares is less than equal to one. If that's the case, I'll be safe. I'll have some choice for my x and y. And then after that, that leaves you with a circle's worth of options, some x squared plus y squared that would have to equal this thing that depends on z and w. And initially, that would mean you can't just naively multiply these because of that dependence. So the equivalent of the animation we had earlier would be basically saying, if the choice of z and w was farther away from the origin, that constricts the circle's worth of options you have left over. And in general, it's very non-trivial to use this kind of relationship to somehow say, how am I going to figure out the volume of the boundary of this four-dimensional ball using this breakdown? But the clever thing is that same Archimedean idea, where you take various points with a constant z value and you project them out onto a cylinder, the same logic ends up holding. But in this case, instead of a constant z value, you'd be choosing constant z and w, but you still take that x, y's worth of options and project them out onto something with radius one. You'll still have the same effect where that stretches things in one direction, but it squishes things in another, and the ratios work out that those perfectly cancel each other out. And in terms of what we have on screen here, what that basically means is we can pretend like there is no dependence on z and w. As far as a volume calculation is concerned, we can just take that interior of the circle and then multiply it by the boundary of the circle. And this is very bizarre for me to think about because the product of the interior of a circle and a circle like this is going to be a solid donut. So whereas Archimedes was projecting onto a cylinder, somehow the four-dimensional version of Archimedes would be imagining projecting his hypersphere onto a donut that encloses the sphere. I can't visualize that either, but we can do the analysis to say this must be what's going on. So in our diagram, we're making another knight's move, but this time we're shifting everything over. What is the volume of the boundary of a four-dimensional sphere? Well, we're going to take that pi r squared, we multiply it by the two pi, or two pi r, rather, and there we go. Evidently, that volume looks like two pi squared times r cubed. This is kind of fun because we picked up another factor of pi. Maybe you weren't expecting that. And again, once you have something in one column of this diagram, you just take derivatives and integrals to go up and down. So if we want to know the volume, or rather the four-dimensional equivalent of volume of a hypersphere, you just take an integral to go down. In this case, integrating r cubed looks like turning it into an r to the fourth and then dividing by four. So as far as the constant is concerned, what we've done here is basically divided by four. Again, that division is going to be very important. And so we end up with this conclusion where evidently, the volume of a four-dimensional ball looks like pi squared over two times r to the fourth. Now that's very pretty. It's kind of a nice formula. And maybe you don't believe me. Maybe you think, I don't know, Grant, you're pulling the wool over my eyes in some way here. Like, I don't know if that Archimedean trick really necessarily works. Maybe you're skeptical about the integration step. But I want to emphasize again, this is not just we claim it and we hand it down from on high. This is an empirical question. If you want to test whether this is true, whether you've done your math right, this wouldn't be a proof, but you could just go and run a simulation. You can ask that probability question we had at the start. Go type up some, whatever your favorite programming language is. You have a choose four random numbers between negative one and one. You add up their squares and you just sample when do and don't, the sum of those squares end up bigger or smaller than one. And what you'll find is the numerical answer to that ends up lining up very, very closely the bigger your simulation is with the formula that I just gave you. That nice beautiful pi squared divided by two. So that's fun. And it's also generalizable. We could just keep going. We can make that same knight's move if we want to go up to the fifth dimension. And just to spell it all out, what this is going to end up looking like, I won't do this for every single one of them because boy, are we stretching what we can even draw in pictures on the screen now. But we're going to say the boundary of a five dimensional ball is in some sense, thought of as a product between the interior of one and three dimensions, a solid three dimensional ball and a circle. And what I actually mean by that is if you choose a point on that boundary, well, what we mean is choosing five numbers for the sum of the squares of those numbers is equal to one. And you could think of that as saying, first, I'm going to choose three of those numbers. And I'm safe to do that as long as the sum of their squares is less than one meaning point inside a three dimensional ball. And I have a circle's worth of options left. And this is a tongue in cheek equation. It's not the case that the boundary of the ball is literally like a product, a Cartesian product between your interior of a ball and a circle. But what I'm saying is there's a volume preserving move that takes you from that boundary of a five dimensional ball onto the thing that literally is that Cartesian product. So we might as well think of it as being that as far as volume calculations are concerned, which is very fun. Now, in terms of our diagram, all that means is to make this night's move, you do the same thing. You multiply by two pi r. And sometimes people ask, why are you staying constant at that two pi r? Everything else is moving over. Why does that one stay fixed? And the basic idea is that when you're making this Archimedean move where you want to project out, it's important that you have two distinct actions that are canceling each other out. One that's stretching in one direction and the other one which is casting a shadow. So if you tried to break down your choice of a point on the boundary of some high dimensional sphere, not as a bunch of things and then two more, but three more or four more, you wouldn't run into that same really nice cancellation. So every time you make this night's move in the diagram and then you integrate to go down, it gives us one more column. And again, that integration, as far as the constant is concerned, up in five dimensions, it just means dividing by five. That r fourth turns into r to the fifth and you have that integration factor divided by five. And we can just keep this going on autopilot. Every time you make one of these moves, getting into that night's move looks like multiplying by two pi r. So you kind of have this two pi jump up into the right and then an integration factor to get down. And we just fill in the whole diagram and in some sense, we're done. In some sense, this gives you the rule that you could use to decide on the volume of any dimensional sphere that you want.
The general formula
But of course, we want a nice formula for this. We want to come away with formula. We want to analyze the think about what it means. So let's take a moment to see if we can write down what that should be. So the way I'm going to do this, each one of these volumes in higher dimensions looks like some constant times r to that number of dimensions. So for example, in one dimension, that constant is two. In two dimensions, that constant is pi. In three dimensions, four thirds pi, on and on. What we really want to know is what is this constant. And the key rule that we have is a recursive one. It's saying if you want to know that constant in some dimension, look two dimensions earlier. And it should be the same as taking that but multiplying by two pi and dividing by n. And that's the formulaic way of basically capturing this knight's move and integrate idea. You take a knight's move to get up and to the right, that multiplies you by two pi. And then you integrate to get down, that's going to divide you by n. So if you have this recurrence relation, it kind of tells you everything you need to know. For example, let's say a couple months from now, you find yourself in one of your exams. For some unbeknownst reason, your exam asks, what is the volume of an eight dimensional ball? And you're like, grand told me this, but I forgot. Don't worry, it's okay if you forget because all you need to know, if you want to know the volume of an eight dimensional ball, is the volume of a six dimensional ball. You take pi divided by half the dimensions and then multiply it by that. And you say, ah crap, I also forget the volume of a six dimensional ball. Not a worry, not a worry at all. All you have to remember is the volume of a four dimensional ball. You take pi divided by half the dimension, so in this case half of six would be three, pi divided by half the dimension, multiply it by that. And you're like, well now this is embarrassing because I also forget the volume of a four dimensional ball. But not a worry, you go down one more, you multiply by pi divided by half the dimension. Now at this point, presumably you do know the volume of a two dimensional ball, which is to say the area of a circle. But if you're a programmer at heart and you're looking at this, and you're thinking, I'm defining a recursive function. If you ever wrote a recursive function, your base case was at n equals two, it would be very embarrassing to submit that pull request. So looking at this diagram, it kind of screams out to you, hang on a second, maybe we should actually be venturing farther back. Even though I know the area of a circle, like should I be going one further? Should I have a base case of zero? And I mentioned one dimension was unloved, but like poor zero dimensions. We didn't even think about zero dimensional geometry. And say, okay, what would this mean? Well, in terms of the formulas, we know what it wants us to be saying if we want this recurrence relation to be true. The volume of a zero dimensional unit ball should be one. And we're like, hang on, where are we? Zero dimensions. Can't move left, can't move up, I can't move anywhere, just a point. So a unit ball is everything, I guess. And the volume of everything is one. Seems reasonable. What's the boundary of a unit ball? Like the boundary of everything, I guess, would be nothing. So zero, which I guess makes sense. And I actually once gave this talk at Stanford, and you know how at the end of talks, like people come up for Q& As, and there's always the annoying person who doesn't understand the Q part of Q& A, and they're like, I have a thing to say. So someone comes up, he's like, I have three points I want to say. It was okay though, because this person was Donald Knuth. And he was like, in the zero dimensional case, you can still write the program to verify the answer, because you just choose zero numbers and ask the probability that the sum of their squares is less than one, and it's probability one. I was like, yeah, touche Donald Knuth. Thanks. So point is, we've got this answer to our eight dimensional question, but it's not hard to see how it generalizes. We were playing this little hopscotching game going back, and you're basically multiplying pi in the numerator by half the dimensions number of times. And then that denominator, because we were always dividing by that half dimension, it's just a factorial. So in this specific example, it's four factorial, but more generally, it's half the number of dimensions factorial. So we can clean things up. We take that constant, like I was saying, it's multiplied by an r to the n, and I can tell you, wonderful. We can use this. It lets you hopscotch two dimensions up if you think of it as a recurrence, but you can also just zero shot your way into whatever you want if we're going to ask this for, say, 100 dimensions.
1/2 factorial
And I say, what a beautiful formula. As promised, we have a beautiful formula. And you might say, well, hang on a second. You're not done, because there's something kind of awkward about this formula, which is what's going on at all the odd numbers, because the denominator is asking us to take something like half factorial, or three halves factorial, or five halves factorial, which feels kind of weird, but we shouldn't have a rule that's different for the odd number dimensions, because in terms of all the logic that we were applying with this Knight's move and integrate, nothing about that logic was telling us, hey, only do this for an even number of dimensions. So we kind of want in our souls for this to be something that applies to everything, because the recurrence rule applies to everything. Like if you forgot the volume of a seven-dimensional ball, and it's a crucial fact that comes up on your homework for some forsaken reason, you could still find your way up to it. You play this game where you keep multiplying by pi divided by half the dimension. And actually, in this case, I think it's kind of nicer to put that two back up in the numerator. So if you wanted to think about what is it that takes us from, say, a one-dimensional ball up to a three-dimensional ball, you're multiplying that two pi, and then you're dividing by three. And so maybe next time you look at the volume of a sphere, you can think about it as saying, hmm, actually it is a one-dimensional ball, but we did that Knight's move, which is two pi and divided by three. And that's what gets you that four-thirds pi factor. But you could keep going from there. To get up to five, you multiply by another two pi and divide by five, from there, divide by seven. And if you had been looking at those odd-numbered cases and thinking that the numbers were very ugly, like for example, we have this 945 in one of the denominators. And initially, you see that you go, where did that number come from? Here, it's actually nice to think about. It's like a factorial, but just where you do all the odd numbers. That's nine times seven times five times three. And then the numerator always looks like a power of two times a power of pi. But if we wanted this to all be true for our general formula, we don't want to have one rule that we write for the even case, odd case, like, I don't know, Thanksgiving with divorced parents or something, where you have to make a choice. It's nice if our parents get back together, right? Like, let's think about what would be required for this to make sense. And in this case, the marriage counselor just suggests looking at the n equals one case and asking what has to be true there. So what this formula would say for n equals one would be that the volume of a one-dimensional ball, which again is just a line segment, looks like pi to the one-half, and raising to the one-half is the same as taking a square root, divided by one-half factorial, whatever the heck that should be, times r. But we do a little arrangement and we say, well, this is kind of telling us what one-half factorial would have to be, if, you know, mom and dad are getting back together. It would have to be square root of pi divided by two. And once you have that, you actually have the rest of them. Because if you think about factorials again in a recursive way, what should it mean? Like n factorial, recursively, is defined to be n times whatever n minus one factorial is. So what is three-halves factorial? Well, it's going to be three-halves times whatever one-half factorial is, which we're saying should be square root of pi over two. What's five-half factorials? Well, five-halves times three-halves times whatever one-half factorial should be. So basically, if we take this one suggestion from the mathematical universe, that one-half factorial should be square root of pi over two, our whole formula works out. And what's reassuring here, some of you might actually know that there is a way to generalize the factorial. It doesn't just generalize to half integers. It's based on something called the gamma function. It generalizes it to real numbers, to complex numbers. And if this was a much longer lecture, we could have a whole other discussion about the gamma function and how there's a completely parallel path that you could use to derive the volumes of higher dimensional spheres that comes from basically studying Gaussian distributions in high dimensions, where if you want to integrate them and understand what it looks like to integrate a Gaussian function, there's a certain trick that you can apply. And that trick will give you a formula for the higher dimensional spheres in terms of the gamma function. And what that ends up telling us is the way that we want to extend our factorial definition, which is kind of like forcing this formula to be true, it actually does align with the way that it gets generalized even more broadly in a different corner of math.
Why 5D spheres are the biggest
Now, in addition to just having a beautiful formula to gawk at symbolically, I want to take a moment to look at the actual numbers behind it and plug in some amounts and see if we can interpret what's going on. Something very strange actually happens when you do that. So let's think about this. I'm going to draw the volume of a unit ball in all of our dimensions. So starting with zero dimensions, no longer does zero dimension get no love, we're going to give it the love it deserves. That constant is one. In one dimension, the volume of a unit ball is two. In two dimensions, it's pi, just area of a unit circle. In three dimensions, it's four-thirds pi. And all these numbers are going up. You might be like, yeah, of course they're going up because each sphere in one dimension contains the smaller ones. So it's getting bigger. They should be getting bigger. Up in four dimensions, it gets bigger still. We end up around 4. 93. Five dimensions is bigger still, but it's kind of slowing down, which might give us pause. Then it gets very worrying because at six dimensions, it's smaller. Like that's weird. Seven is smaller. Eight is smaller. Nine is smaller still. It starts decreasing very rapidly. Like, hang on a second. Up in, for example, 10 dimensions, that's actually smaller than the two-dimensional ball. And that's a little strange to interpret, to say the least. And so if you draw the curve for this, where we're going to fill it in not just for integers, but for everything using the gamma function, here's what it looks like. And let's think about why. Like, why does it turn around? around at five? That's kind of weird. What's special about five dimensions? And then what happens as we go out towards an even higher number of dimensions? And the nice thing about the fact that you and I have landed here, not because I just gave you the formula and said trust me that it's true, but because you see where it comes from, is we can think about these questions in terms of where it came from. Ultimately, it's rooted in this recurrence relation, where understanding what happens in one dimension, you look two dimensions earlier, and then you do that knight's move that takes you two pi, and then you do an integration, which gives you that division by n. So every time we're stepping two units to the right in this diagram, you're multiplying two pi divided by n, where n is kind of the x coordinate of where you land. So for example, jumping from one up to three, that's two pi thirds. Two pi is bigger than three, so that's why you're growing. From two up to four, you multiply by two pi over four. Two pi is bigger than four, so you're still growing. Two pi is bigger than five, not by as much, so you're not growing as much. From four to six, two pi is bigger than six, but now just barely. And then it's at that point that it turns around, where as you go from five up to seven, you're taking two pi divided by seven, but now the denominator is starting to win out. And in fact, it starts to win out by more and more, because as you get into a higher dimension, that integration factor is playing a bigger and bigger role, and it starts to dominate. So if you wanted to ask why was five the biggest, basically because at that value of n, where the numerator and denominator are as close as they can be, when it's equal to six, that's straddling this number five. And so that's the point at which the change on this graph is going to be around zero. So if we keep going though, what ends up being very surprising, and I think this is one of those just genuinely baffling facts about higher dimensions, is that your unit balls, they don't just get small, they get downright infinitesimal. For example, let's take a 100 dimensional ball. Using our formula, it looks like pi to the 50. Cool, that's big, nice big number, but divided by 50 factorial, which is way bigger, right? Because all of those factors of pi in the numerator on average are much, much smaller than the terms that you're multiplying in the denominator. Almost all of them are much bigger than pi. Numerically, this is around 2. 37 times 10 to the negative 40th. So a ball in 100 dimensions, it's nothing. It's just absolutely nothing. And this again is an empirical fact. That question I asked at the very beginning, I said, imagine you choose 100 different random numbers, each between negative one and one, you square them. You want to know the probability that the sum of those squares is less than one. On the one hand, you could say, well, it's very expected that this should be a small number, right? Because think about the coincidence that's required here. All 100 of your numbers have to happen to be so small that when you add up all those squares, you end up less than one. And I'd say, I agree, that's surprising. I would have thought that smallness is taken into account by that two to the 100 in the denominator. I would look at it and be like, well, there's the source of your smallness. The thing that's surprising here is that it's not just the denominator that makes it small, but the numerator is also working against you. That numerator is a puny number as well. This volume of higher dimensional spheres being very small and downright negligible, it actually comes up a lot. People who study machine learning, they have to think about quirks in higher dimensions. This is one of them. Your balls are just puny. Cryptographers, same deal. You don't clap, you can't clap. There's a time for clapping and that's not it. If you study cryptography, this fact comes up a lot as well. Quantum mechanics comes up as well. And I think it's worth just a little moment to divert all of your attention away from the concept of puny balls. And instead on the question of like, why? Where did that come from?
Concentration at the surface
And really what's happening here is the integration factor when you're dividing by that n. For example, when you're thinking about the volume of a three-dimensional ball, you're kind of adding together all of these shells. You're integrating together all these things that are proportional to r squared. And we're saying that effectively gives you this one third factor. It's very similar actually, if you have, let's say like a square pyramid and you think of it as being built up from a whole bunch of squares whose side lights are increasing linearly. You know how with the pyramid, it looks like one third times its base times the height. Basically the same thing is going on here where that's where the one third comes from. And in general, when you're doing this in a higher number of dimensions, that factor is getting bigger and bigger. And this actually relates to a distinct fact about higher dimensional spheres, which is also relevant in all of these fields. If you want to get a little bit of an intuition for how distances behave. And this has to do with not just what the volume of a sphere is, but where that volume is. And it's basically almost all right next to the boundary. And it's not too hard to explain why. So let's say we're in two dimensions and I want to understand how much of the area of that circle, let's say it's a unit circle, is within a distance of like 0. 01 of the It's kind of within 1% of the boundary. Well, you could calculate that as you could say, all right, the area of the entire circle is pi r squared. And then if we chop out everything other than that boundary, that would be another circle, but whose radius was scaled down by 99%. And if you scale that down by 99%, the area gets scaled down by its square, which is approximately 0. 98 in this case, 0. 9801. But the idea is that 2% of the area of that circle is close to the boundary. But circles are actually very unusual in this respect, in the scope of all of the possible spheres across all the dimensions. Because let's think about what this would be in like some really big, like 10,000 dimensions. So we know the volume. It's fun. We have a formula for it. It's not really the point here though. If you wanted to play the same game of saying how much of the volume is right next to the boundary, you can take the entire ball and then you say, let's scale it down by 99%. And then ask what's the volume of that smaller one. Then initially you might think it's only slightly smaller. But in this case, when you scale it down, it's not just getting scaled down in two directions. By definition of what we mean being in 10,000 dimensions, it's getting scaled down in 10,000 different directions. So the factor by which its volume decreases looks like 0. 99 raised to the 10,000. That is effectively zero. It's 2 times 10 to the negative 44. So this is saying, essentially all of the volume is sitting right there on that boundary. And this is related to what we were just looking at, where as you're going from the boundary to the interior, you're making this division that becomes more and more significant. Because if you think about it, what does it mean when we're talking about the surface area of a sphere, of a unit sphere, is 4 pi, a number that's around 12, and the interior of it is 4 thirds pi. On the one hand, you're comparing different units. One is an area, one's a volume. But you could say you take that area and you multiply it just by a tiny little amount, and it's giving you a disproportionate amount of the entire sphere. So that's actually a nice intuition to have just if you are working with high dimensional data. Essentially everything, if you're dealing with something inside a ball, is just right next to the surface, effectively right on the surface. While we're here, there's another fact this is kind of tied to, where let's say you want to know on that boundary, where is most of that boundary volume? For example, most of the surface area of a sphere. Now in a sphere, it's nicely distributed across everything. But if this picture was being drawn in many, many more dimensions, what ends up happening is almost all the masses at the equator. And the reason is tied to what we were just talking about, where as you scale it a little bit, because there's so many dimensions to scale in, it basically disappears. So if you think of the circles that aren't the equator, and I say circle, the D minus two dimensional boundaries that aren't the equator, but are just a little bit upward or down from it, those ones end up becoming effectively nothing, because that tiny bit of scaling that's required to get just a little up or just a little down, essentially makes their volume disappear.
A unit-free interpretation
Now the last thing I want to linger on is how, like this idea that the size of your spheres in higher dimensions is shrinking, feels a little bit, like it feels like it's not even a sensible comparison, because we're messing with different units. Like what does it mean to compare the volume of a one dimensional ball to that of a two dimensional ball to a three dimensional one? Because one is a length, one is an area, one is a volume. Because in some literal sense, like a three dimensional ball is not smaller or bigger than the four dimensional ball, it's just incomparable. And so let's try to think about what this number actually means. How can we give kind of a unit free interpretation of it? And in a literal sense, I guess what we're saying is we're really comparing it to the volume of a unit cube. That pi for the area of a unit circle, that's basically area of a circle as compared to the area of a square with side length one. And then three dimensions, what do we mean by that four thirds pi? Well, we're comparing the volume of that sphere to the volume of a unit cube. And so in some sense, the fact that this is getting smaller is really just telling you that up in many dimensions, the size of a cube compared to sphere ends up getting really, really disproportionate. The cubes are huge and the spheres are small. And that I was thinking, actually that reminds me of that earlier puzzle. And in fact, there's a different visual that you can think of for what this number is really telling you. Because let's pull up that second puzzle that we looked at where we had all these corner spheres. What if I wanted to ask how much of this diagram is represented in those corner spheres versus in that cube? And in this case, there's eight distinct corner spheres and each one of them has radius one. And then the cube is a two by two cube. So you'd be taking eight times the volume of a unit sphere and you're dividing it by eight. So that's just getting us back to where we are because that factor of eight cancels out. Whatever this picture looks like up in a hundred dimensions, you've got two to the 100 corner spheres and then you've got this big old cube that's volume two to the 100, those cancel out. And the fact that a 100 dimensional sphere is very small could be interpreted as saying, whatever this diagram should be up in a hundred dimensions, those corner spheres are basically none of it. They're effectively none of the volume that you're looking at. And that kind of ties to the visual I was giving earlier, where the very loose heuristic for this high dimensional cube is that it's super spiky. It's something where the distance to the edge is much, much smaller than the distance to the corner. And so all those corner spheres are basically none of your diagram. And so with all that, I just want to end you up with you on a very small note, which is that there's a lot of beautiful items that you can come across in math, but actually recognizing that beauty sometimes requires looking at something that was very familiar, whether that's the factorial or area of a circle, and then putting it in the context of something more general. The beauty that underlies factorials and the volume formula for a sphere is actually only visible once you've stepped back to see things general enough. Otherwise it would not at all be visible that a pie is secretly hiding inside your factorial calculations, or that there's some unifying formula sitting between your area of a circle and your volume of a sphere. So that's all I have for you. I want to end it here. Thank you everyone for coming. Hi there, me again, but from the office this time.
3b1b Talent
I wanted to chime in with a quick little end note, partly to talk about that very first animation I showed at the beginning and explain what that actually is, how it relates to high dimensional spheres. But before then, given that you are demonstrably the kind of person who watches a lecture about high dimensional spheres, I have a suspicion that you would be a good fit for the new experimental thing I'm doing this year, which is essentially a virtual career fair. So take a moment to go to 3b1b. co slash talent. And there, what you'll find is a set of career opportunities from various different organizations who are interested in people like you, the kind of people who watch these videos and the curiosity that represents, which tends to correlate with very technically talented people. So for every group that you find there, I've personally taken a chance to chat with the teams there. And I can tell you the people that I've met there are just clearly very smart. They're very curious in the sense of truth seeking. A lot of them are just high agency people. They clearly take charge of what they actually do. They don't just wait to follow instructions. And if that sounds like the kind of person who you want to work alongside, I would highly encourage you to at least check it out, listen to some of the interviews I conducted with the people there. And if you're looking for a new career, hopefully this gives you a helpful new batch of considerations. Since the last video, when I very first mentioned this, there have been actual hires made, which is pretty cool to me. So who knows? Maybe if you go and explore the page, you'll be the next one.
Explaining the intro animation
All right. So for that animation at the very, very beginning, I initially showed this circle that turns into the various lines of latitude on a sphere, a sphere in three dimensions. And our minds are very good at seeing that it's a three-dimensional sphere. After that, I basically show the same thing, same code, but stepping it up in one dimension. I represent all of the spheres of latitude on a four-dimensional sphere. So they're kind of a bunch of four tuples of numbers. But if you change the perspective on that before you project down into three dimensions, you get all of these different views of what those spheres of latitude end up looking like, which as you rotate that hypersphere, ends up looking just very trippy. And I don't think this is explanatory in the sense of you look at this and you see, ah, pi squared over two. But it is very fun. So thought I'd share that with you. Also, if you want to see a fun application of this formula for high-dimensional sphere volumes, you might enjoy a video I did with Numberphile a couple of years back that includes a puzzle that incorporates this into its answer.