The unit “1” in terms of hypervolume is a n-hypercube with side length 1, so the question is really, how many of those hypercubes fit into an n-ball of a given radius.
Now, the thing I realized is that a unit hypercube in n dimensions is an unimaginably weird object. Its side length is, by definition, 1. But as n goes to infinity, the distance between the center and the corners of this unit hypercube goes to infinity — this follows directly from the Pythagorean Theorem. The center of the hyperfaces, on the other hand, is always only 0.5 distance units away from the center of the cube. An inscribed ball touches those hyperfaces, so 0.5 is also the radius of that inscribed ball. This makes the hypercube in some sense very “spiky”, with parts of the boundary close to the center (0.5) and other parts infinitely far away. Also, there are 2^n of those corners.
Indeed, and that’s just another way of stating the submission headline, most of the volume of the hypercube is near those spiky corners. Stated another way, as n goes to infinity, none of the volume of a hypercube is at a bounded distance from the center. And note that we’re still talking about a unit hypercube, so the side length in all of this always remains 1.
So, if you accept the math, the question is: Is the quoted result really something unintuitive about high-dimensional balls, which are perfectly symmetrical objects? Or is the “weirdness”, in terms of human intuition, better blamed on the hypercubes we implicitly compare them to when we talk about volume?
> This makes the hypercube in some sense very “spiky”, with parts of the boundary close to the center (0.5) and other parts infinitely far away.
One way to make the weirdness of the "other parts infinitely far away" concrete is to recall that, say, the Empire State Building can fit entirely inside of an n-cube with sides of 1 cm, for sufficiently large n. The length of the diagonal of such a cube grows without bound, and so does any constant-dimensional cross-section.
Extremely high-dimensional spaces are extremely spacious. (People experience this with ML and statistics, where random points in very high-dimensional data sets are almost certain to be extremely far apart from one another in a Euclidean metric.)
> So, if you accept the math, the question is: Is the quoted result really something unintuitive about high-dimensional balls, which are perfectly symmetrical objects? Or is the “weirdness”, in terms of human intuition, better blamed on the hypercubes we implicitly compare them to when we talk about volume?
That's a terrific way to put it. We can think of the n-balls as bizarrely small (and/or bizarrely round), or we can think of the n-cubes as bizarrely huge (and/or bizarrely spiky). Then we could say that the latter eventually contain absurdly much space, while the former continue to contain only a moderate, reasonable amount of space!
> the Empire State Building can fit entirely inside of an n-cube with sides of 1 cm, for sufficiently large n.
My sole attempt at writing an essay for my local SF fan club, when I was in high school, was to apply this observation to explain ... err .. handwave .. how the TARDIS can be bigger on the inside, eg, as seen in The Invasion of Time.
Of course, back then the TARDIS was only 68,000 tons - about the size of an aircraft carrier. (In Castrovalva, 1/4 of the TARDIS - 17,000 tons - was ejected.) Figuring 400 meters length in a (2m)^n box gives at least n = 40,000 dimensions.
Nowadays it has enough mass to fracture a planet, contains a collapsing star, etc. Life was simpler in the 1980s. :)
> One way to make the weirdness of the "other parts infinitely far away" concrete is to recall that, say, the Empire State Building can fit entirely inside of an n-cube with sides of 1 cm, for sufficiently large n.
That’s a striking illustration. Even the entire Earth fits into a 1 cm n-cube, but — and that’s important — only diagonally.
> the Empire State Building can fit entirely inside of an n-cube with sides of 1 cm, for sufficiently large n. The length of the diagonal of such a cube grows without bound, and so does any constant-dimensional cross-section.
I still find this analogy confusing, because the units don’t match. The Empire State Building has some volume in cm^3, but the hypercube volume is cm^n. 1 cm^5 is not 100 times more volume than 1 cm^3, right?
Am I thinking about it wrong? I guess you can think about filling up a 3D cube with quasi-2D slices, is it like that?
Ah, thinking about the other comments a bit, you mean the diagonal of the hypercube can be larger than the biggest dimension of the building?
It’s not about area, but about actually physically placing an object in a higher dimensional object, like placing a long stick (1D) in a room (3D): the stick can be longer than the longest side of the room, but not by that much. In higher dimensions, this effect is more extreme.
Thanks, I see what you mean now. I think I was keying off the word “entirely” and trying to make it work for all three dimensions of the building at once. It seems like the building will fit along each coordinate inside the diagonals, but the edges of the hypercube would still cut through the building, right? That’s where I was getting confused
> the building will fit along each coordinate inside the diagonals, but the edges of the hypercube would still cut through the building, right?
No, you can fit the whole thing inside the 1mm hypercube, as long as you have enough dimensions. Once you have fit the height of the building along one diagonal, you can add new dimensions and rotate the building along that diagonal so that the width and the height will fit along the diagonals of the other dimensions.
And in that case n is about 1,964,262,400. According to Wikipedia the overall height of the Empire State Building is 443.2m. That's 44320cm. So we need a cube that -- corner-to-opposite-corner -- is that many cm long. If the cube is 1 cm on a side, its corner-to-opposite-corner distance is the square root of n, so the number of dimensions of the cube needs to be about 1.96 billion for [a line the same length as] the Empire State Building to fit inside.
and thought about all of those circular craters, then realized that the circularity of the craters is a consequence of symmetry (and also of conservation of energy). The sphericity of Mars itself is also a consequence of physical principles like that.
So in terms of physical laws and physical phenomena, n-balls show up much more readily than n-cubes, and in some senses have a much simpler description.
If you weren't already on a street grid in a city and using that grid to navigate, a parent might say to a child "don't wander more than one kilometer from home" and would naturally generate a circle rather than a square as the locus of points that are close enough.
Nature and people care a lot about proximity, which is to say distance, which then generates n-balls. So maybe they are more fundamental and more intuitive for certain purposes. But the curse of dimensionality is going to make either balls or cubes weird in enough dimensions, and counterintuitive to intuitions formed with just three dimensions. The balls are going to be surprisingly tiny ("there's very little nearby here") and the cubes are going to be surprisingly vast ("space is so spacious").
there definitely are some things non-intuitive about high-dimensional objects, in general.
For example, if you peel away the outer 1% of a n-dimensional sphere or cube, you’re left with 0,99^n of its volume. As n goes to infinity, that goes down to zero.
See also the curse of dimensionality (https://en.wikipedia.org/wiki/Curse_of_dimensionality), or https://www.math.ucdavis.edu/~strohmer/courses/180BigData/18..., which, for example, compares the n-dimensional sphere with radius 1 to n-dimensional hypercubes with side length 1. In two and three dimensions, the cube easily fits in the sphere; in four, it just fits. In higher dimensions, you can’t fit that hypercube in the hyper sphere, even though the diameter of the sphere is twice that of a side of the cube.
I have a HN request where someone out there will know the answer as relates to your comment.
Somewhere, in the past, there's a "popular science" level essay on modern string theory that casually discusses the volume of radius ball and similar geometric implications as regards modern string theory in 10 or 11 dimensions as opposed to bosonic 26 dimensional theory and of course normal human scale 3-D. For example, if, hypothetically, in a very thought experiment manner, you wanted to squirt ping pong ball shaped "things" between packed protons in 3D, the gap would max out at X length whereas in 11D you could squoosh a somewhat larger ping pong ball between the packed gaps or was it actually a denser pack, whatever. Yeah I'm well aware the physics doesn't work that way but it was more of an imaginative geometrical essay.
Sounds like the kind of thing you'd find in an 80s or older "mathematical recreations" column in Scientific American magazine, but its not, or I didn't find it in an index. Which doesn't necessarily mean my inability to find it proves its not there, LOL. But that comparison does accurately relate the general level of casualness and length of the essay and being of general interest to the general educated scientific public.
It was just a fun read, a decade or three ago, and I would merely enjoy reading it again if its free on the net.
Its a typical search problem, searching for terms like "string theory essay" is going to return too much whereas overly specific searches return nothing. So there's some magic middle level of search term complexity that would find it; no idea what those search terms would be, mildly curious HOW anyone finds the article as much as I'm curious about re-reading it.
If nothing else this would be an entertaining 2020's physics blog poster topic or maybe a future xkcd comic LOL.
Ball packing (no, it's not some new thing Bay Area VCs are doing--I mean, it probably is also that but it's not what I'm referring to here; rather, it's the n-dimensional analogue of sphere packing) gets stranger in n-dimensions as well.
If you have an n-dimensional integer lattice with unit n-spheres at each even-numbered point, you get inscribed n-spheres. For n = 2, those circles are tiny: about 29% (1-1/sqrt(2)) of the radius of the bigger (r = 1) ones. At n = 3, they're somewhat bigger but still small. At n = 4, they're the same size. At n = 5+, the inscribed n-spheres are actually larger than the unit spheres, which means they extend farther despite being "inscribed". This is probably impossible to visualize, because it's never that way in our 3-dimensional world.
High dimensional spaces also make it difficult to come up with good distance metrics. In 1000+ dimensions, nearly all the volume is on the boundary, and neighborhoods in the classical sense (e.g. visible clusters) don't exist. It's trivial to come up with metrics that "work" but it often requires domain knowledge to come up with ones that are useful.
> Is the quoted result really something unintuitive about high-dimensional balls, which are perfectly symmetrical objects?
That reference to symmetry made me thing of another way to look at this: the overlap between two random unit n-hypercubes goes to zero as n goes to infinity (or does it?).
The spiky shape of the n-cube can be used as an illustration of the “myth of averages”, i.e. the observation that basically no person can be considered “average” or “typical” as soon as you consider a number of dimensions (famously observed by the US Air Force when trying to adjust fighter jet cockpits to the average dimensions of pilots [1]). If you consider n variables along which people and their experience can vary, the space that is “reasonably close” to the average (e.g. an n-ball or even an n-cube with side length 1−ε) becomes vanishingly small compared to the full space.
I find this is an important concept to keep in mind when designing systems and products. When you reach a certain complexity, most cases are edge cases and designing only for the “typical” case serves almost nobody.
Fascinating observation. Thanks for sharing. Given that this problem space still exists I wonder what the best approach might be other than taking the mean
This is one of my favorite counterintuitive math results.
> Volume of an n-ball tends to a limiting value of 0 as n goes to infinity
Another way to say this is that if you inscribe a circle in a square, or a sphere in a cube, or in general an n-ball inside an n-cube, then in higher dimensions the n-ball takes up almost none of the space of the n-cube.
Because the location of the peak falls at a different dimension depending on the underlying units (i.e., the radius), I don’t think the numerical location of the peak is fundamental. So maybe it’s best that you don’t have intuition for it?
The ratio of the volume of the sphere to the volume of the enclosing cube (the proportion of the box that it takes up, or the probability that a randomly chosen point inside the box is in the ball) is dimensionless, though. It's not dependent on the size of the cube.
You can extract dimensionless quantities, but depending on the normalization, the peak will land in different "n" values. E.g., normalize by the enclosing cube (sides of length 2R) versus the enclosed cube. So I don't think there's anything special about the turnover point.
I've always thought that "density at the edges" would have interesting implications for moment of inertia. Euler's column formula depends on moment of inertia so that would seem to imply a "Flatland-but-in-11D-instead-of-2D" would have significant mechanical engineering problems compared to our 3-D world.
I think macro-scale higher dimensions as a hard sci fi topic would also have weird aerodynamic and heat exchanger effects. How would the ratio of radiative cooling to convective cooling vary if the world had 10,11,100,100000000 dimensions instead of 3?
Intuitively if we had 4 dimensions of space I think automotive-type radiators could be quite a bit smaller for a given heat exchange?
This is pretty obvious, no? If you choose a (uniformly) random point inside an n-sphere, the components of the vector will go to zero as n gets larger -- after all, the sum of their squares has to be less than 1.
A (uniformly) random point in an n-dimensional cube will have random coordinates from zero to 1, with no other constraint on their size.
No, it is not obvious to people who haven't been trained in college-level mathematical thinking, or people who don't think about higher-dimensional objects using the handlebars of abstraction.
Pick N random numbers between -0.5 and 0.5. Square them. Then add them up. How does the probability that {sum of these N positive values exceeds 1} change as the N increases?
I think anyone with a basic understanding of arithmetic should be able to answer that.
Is it obvious to anybody with "a basic understanding of arithmetic" that this has anything to do with higher dimensional spheres?
I think any great teacher can break down many complicated subjects (like the nature of the surface of a higher dimensional sphere) into a series of simpler subjects (if you have to choose a bunch of numbers so they add up to 100, will the numbers tend to be on the small side?), but that in no way implies a person capable of counting change will intuit this series of simpler subjects themselves.
I must ask, somewhat rhetorically, isn't that obvious?
Looks like this is just a debate of the semantics of the word "obvious". Feynman would likely find a great many things "obvious" that I could not hope to understand. This doesn't mean they aren't "obvious", just that I don't have the requisite mental frameworks.
The only frameworks required to reach this conclusion are the Pythagorean theorem (8th grade geometry), the definition of a circle (same), and the ability to generalize the Pythagorean theorem to higher dimensions. I take it this last bit is where you think people would struggle. I don't think so. Looking at the theorem, there are basically 2 ways one might attempt to generalize it, and the incorrect way (a^n + b^n + ... )^(1/n) can be demonstrated to fall on its face pretty easily by considering small values of higher dimensioned components.
I consider these a "basic understanding of arithmetic" as these frameworks have been around for thousands of years and are expected knowledge for the youngest of teenagers. Yes some hand holding may be required to generalize the idea of distance to higher dimensions, but I'd wager not as much as you seem to think.
Testing this is interesting. If a random person at a bar can be given a refresher on the above frameworks and reach the desired conclusion themselves in 5 minutes or less, would you grant the problem is "obvious to people who haven't been trained in college-level mathematical thinking, or people who don't think about higher-dimensional objects using the handlebars of abstraction"?
I'm generally shocked when an average person I meet can add fractions without a calculator. I think you wildly overestimate just how "basic" the understanding of arithmetic is for the vast majority of people. This isn't to say these people are stupid--don't conflate knowledge of mechanical mathematics operations with intelligence.
If you choose n uniformly random values in [-1/2, 1/2] (the unit cube) then the sum of squares will be concentrated around n/12 (just take the variance).
This is way more than 1, which is what you would need to stay inside the unit ball.
This is nice way to think of the problem. Although I think for unit hyper sphere , I think of the sphere centred at the origin, so the distance from point to origin is always less than 0.5
Very counterintuitive. I understand how the proportional space of an n-ball bounded in an n-cube can go to zero, but I don't understand how the volume of an n+1-ball can be of a smaller volume than an n-ball.
> Very counterintuitive. I understand how the proportional space of an n-ball bounded in an n-cube can go to zero, but I don't understand how the volume of an n+1-ball can be of a smaller volume than an n-ball.
It can't be, in the same sense that it's not true that π square meters (the area of a unit circle) is less than (4/3)π cubic meters (the volume of a unit sphere); they are simply not comparable quantities. What is true, as wging very nicely put it (https://news.ycombinator.com/item?id=31349002), is that the (n + 1)-ball (of radius 1) eventually takes up a smaller fraction of the (n + 1)-cube (of side 2) than the n-ball does of the n-cube.
I agree that this is still probably sufficiently unintuitive that the best one can do is to argue why one shouldn't disbelieve it, not to try to make it intuitive; but nonetheless I will share one of the closest things I've seen to an explanation, which is that the number of corners in a cube grows exponentially with the dimension of the cube, so that, sooner or later, the cube is "mostly corners"—and the ball does not poke into the corners.
> volume of an n+1-ball can be of a smaller volume than an n-ball
Volume is the ratio of the n-ball to the n-cube.
Saying that n+1-ball has “smaller volume” than the n-ball is equivalent to saying that the ratio of the n+1-ball to the n+1-cube is smaller than the ratio of the n-ball to the n-cube.
> I understand how the proportional space of an n-ball bounded in an n-cube can go to zero
The volume comment is saying that the ratio of the n-ball to its bounding n-cube goes to zero faster than (base-2) exponential:
A two-dimensional n-ball is a circle. If you extend it into 3 dimensions, by default it is a cylinder, of h=1 and r=1. That’s not a 3-dimensional n-ball however.
If you increase the dimensions of that 2-dimensional n-ball into 3 dimensions, it becomes a 3-dimensional n-ball—-a sphere of r=1.
And now you have a sphere that is smaller than the circle that was extended into 3 dimensions as a cylinder. The ball-ness of the n-ball formula chopped off the corners of the cylinder.
And that chopping off continues in higher dimensions.
I mean, we can directly calculate the volume of a cylinder by modeling it as a big stack of circles and adding up their areas. That's the whole idea of integral calculus.
If you have enough circles, they will form a cylinder.
A while back, I wanted a way to find the volume of a unit 4-ball without calculus, but I couldn’t find anything. I ended up coming up with the approach below, which uses probability. Comments and criticism welcome.
We want to find the volume of a 4-dimensional unit ball. Let the center of the 4-ball be the origin. Enclose the 4-ball in an origin-centered, axis-aligned 4-dimensional cube of side length 2. Choose a point uniformly at random inside the 4-cube. What is the probability that the point lies within the 4-ball? If we knew this, we could find the volume of the 4-ball, because P[point inside 4-ball] = (volume of 4-ball)/(volume of 4-cube), and we know that the volume of the 4-cube is 2⁴.
We will find P[point inside 4-ball]. Let (a,b,c,d) be the point's coordinates. Since they were picked uniformly at random within the 4-cube and the 4-cube's coordinates range from −1 to 1, we know that a, b, c, and d are each uniformly distributed from −1 to 1 (in symbols: a ~ U(−1,1), b ~ U(−1,1), etc.).
The radius of the 4-ball is 1, so the point is inside the 4-ball just when the radius of the point is less than 1. In symbols:
Now a lemma: Suppose x ~ U(−1,1) and y ~ U(−1,1). Then P[x² + y² < 1] = π/4.
Proof: Since x ~ U(−1,1) and y ~ U(−1,1), P[x² + y² < 1] is the probability that (x,y) lies within an open unit disc, given that it lies within the enclosing 2x2 square. This is simply the area of a unit disc divided by the area of the enclosing 2x2 square, so we have P[a² + b² < 1] = π/4. Similarly for the probability that c² + d² < 1.
Using the lemma on the first two factors, we have:
Now for a second lemma: Suppose x ~ U(−1,1), y ~ U(−1,1), and x² + y² < 1. Then x² + y² ~ U(0,1).
Proof: The assumptions can be visualized as throwing a dart randomly at an origin-centered unit disc enclosed in an origin-centered, axis-aligned 2x2 square. If the dart falls outside the disc, we throw again, until it falls within the disc.
Let (x,y) be the coordinates of the point, and consider the probability that the point falls inside an origin-centered disc of area A, where 0 ≤ A < π (the area of the outer unit disc). This happens just when the radius of the point (the distance from it to the origin) is less than the radius of the inner circle. The radius of the point is √(x² + y²), and the radius of the inner circle is √(A/π). Therefore, the desired probability is P[√(x² + y²) < √(A/π)]. Squaring both sides yields P[point inside disc of area A] = P[x² + y² < A/π].
Since the area of the inner disc is A and the area of the enclosing unit disc is π, we have P[point inside disc of area A] = A/π, or P[x² + y² < A/π] = A/π, for 0 ≤ A/π ≤ 1. By the definition of a uniform distribution over the reals, P[X < x] = x for 0 ≤ x ≤ 1 if and only if X ~ U(0,1). Hence, we have shown that x² + y² ~ U(0,1).
Now back to the main problem. Write u = a² + b² and v = c² + d². Since a ~ U(−1,1), b ~ U(−1,1), and a² + b² < 1, we know, by the second lemma, that a² + b² ~ U(0,1). Similarly, we know that c² + d² ~ U(0,1). Therefore, we can write:
P[point inside 4-ball] = (π/4)(π/4)P[u + v < 1 | u ~ U(0,1) ∧ v ~ U(0,1)]
The value of the probability expression in that formula is simply the area below the triangle in a square, or 1/2, so we have:
Instead of the area below a triangle we have the volume inside a unit simplex, or 1/n!, and of course the volume of the 2n-cube is 2^(2n) or 4^n, giving the 2n-ball’s volume as:
Unfortunately, I haven’t been able to figure out how to find the volume of a unit n-simplex without calculus or linear algebra. Any suggestions?
Simple single-variable calculus would be acceptable, like finding the area under the curve y = 1 – √x when x ranges from 0 to 1, but I’d prefer to avoid nested integrals and trigonometric integrals and derivatives.
The unit “1” in terms of hypervolume is a n-hypercube with side length 1, so the question is really, how many of those hypercubes fit into an n-ball of a given radius.
Now, the thing I realized is that a unit hypercube in n dimensions is an unimaginably weird object. Its side length is, by definition, 1. But as n goes to infinity, the distance between the center and the corners of this unit hypercube goes to infinity — this follows directly from the Pythagorean Theorem. The center of the hyperfaces, on the other hand, is always only 0.5 distance units away from the center of the cube. An inscribed ball touches those hyperfaces, so 0.5 is also the radius of that inscribed ball. This makes the hypercube in some sense very “spiky”, with parts of the boundary close to the center (0.5) and other parts infinitely far away. Also, there are 2^n of those corners.
Indeed, and that’s just another way of stating the submission headline, most of the volume of the hypercube is near those spiky corners. Stated another way, as n goes to infinity, none of the volume of a hypercube is at a bounded distance from the center. And note that we’re still talking about a unit hypercube, so the side length in all of this always remains 1.
So, if you accept the math, the question is: Is the quoted result really something unintuitive about high-dimensional balls, which are perfectly symmetrical objects? Or is the “weirdness”, in terms of human intuition, better blamed on the hypercubes we implicitly compare them to when we talk about volume?