# Circles, Spheres and Hyper-Spheres

August 4, 2017 in Mathematics

Consider a unitary, 100-dimensional, hyper-sphere. What proportion of its volume lies within the last 0.01 of its radius?

It’s an odd question, no doubt; a 100-dimensional hyper-sphere, whatever that is. But there’s a moral to this puzzle that will become evident if we do baby steps:

## Let’s dumb this down…

Imagine instead that we wanted to tackle the following simplified version:

Consider a unitary circle. How much of its area (in %) lies in the last 0.2 of its radius?

It seems easy to calculate this; the area $A$ of a circle of radius $r$ is given by $A_r = \pi\cdot r^2$. Hence:

$\phantom{\equiv}~\frac{A_{[0.8; 1]}}{A_1}$

$\equiv$ { equal to the difference between the two areas }

$\phantom{\equiv}~\frac{A_1 - A_{0.8}}{A_1}$

$\equiv$ { by definition }

$\phantom{\equiv}~\frac{\pi - \pi \cdot 0.8^2}{\pi}$

$\equiv$ { since $\frac{ab-ac}{a} = b-c$ }

$\phantom{\equiv}~1 - 0.8^2 = \class{bghighlight}{0.36}$

Easy! So, **36% of the area** of a circle lies within the **last 0.2 outer ring**. Hmmm… that much? I wonder, what’s the proportion of the area that lies within the *first* 0.2 inner ring?

So, the **inner ring of the same thickness contains just 4%** of the total area. Should this come as a surprise? The inner ring is far smaller than the outer ring, isn’t it?…

## Can we have a simulation for table 3, please?

If intuition is failing you, or you think there might be something wrong with our calculations, we can attempt to simulate this by generating a pair of random numbers between [-1, 1], which would correspond to coordinates in a cartesian space delimited by a square of side 2 (and, therefore, with an area of 4). As we approach an infinite number of points, the proportion of those that fall into the circle would give us the area of the circle. This is called a Monte Carlo Simulation.

How do we know if a point felt inside the circle? Easy… We calculate the distance of that point to the origin, which, according to the Pythagora’s theorem, is given by $d_{x,y} = \sqrt{x^2 + y^2}$. If the distance is less than or equal to one, it’s inside the circle:

Ratio is 00.00% (real 78.54%)

Estimated area is 0.000 (real 3.141)

Outer 0.2 ring area is 00% (real 36%)

Click to add 100, 1000, or 10000 points, start or stop the animation, or reset the simulation.

## We shall now go 3D…

Consider a unitary sphere. How much of its volume (in %) lies in the last 0.2 of its radius?

Let $V_r$ be the volume of a sphere of radius $r$, given by $V_r = \frac{4}{3}\pi\cdot r^3$; therefore:

$\phantom{\equiv}~\frac{V_{[0.8; 1]}}{V_1}$

$\equiv$ { equal to the difference between the two areas }

$\phantom{\equiv}~\frac{V_1 - V_{0.8}}{V_1}$

$\equiv$ { by definition }

$\phantom{\equiv}~\frac{\frac{4}{3}\pi - \frac{4}{3}\pi\cdot 0.8^3}{\frac{4}{3}\pi}$

$\equiv$ { since $\frac{ab-ac}{a} = b-c$ }

$\phantom{\equiv}~1 - 0.8^3 = \class{bghighlight}{0.512}$

This is getting interesting: **more than 50% of its volume lies within the last 20% of a sphere!**

## Hyper-Spheres

I’m skipping the mathematical apparatus of integrating in higher dimensions (something that can be read in Wikipedia), and instead rely on Wolfram Alpha to check the volume of a 4d-sphere $(\frac{1}{2}\pi^2 r^4 ≈ 4.9348\cdot r^4)$, 5d-sphere $(\frac{8}{15}\pi^2 r^5 ≈ 5.26379\cdot r^5)$, and 6d-sphere $(\frac{1}{6}\pi^3 r^6 ≈ 5.16771\cdot r^6)$.

It now may be evident to the reader that the volume of a $d$-sphere of radius $r$ is always proportional to $r^d$ (we may write this as $V_r^d \propto r^d$) and so the percentage of volume that lies within the last shell of thickness $q$ is given by $1 - q^d$.

What is thus the percentage of the volume that lies within the last 0.2 of a 100-dimensional hypersphere? $1 - 0.8^{100} = \class{bghighlight}{99.99999997963\%}$. **And within the last 0.01? 63.4%…** Wow!

In fact, if we solve the equation for $1 - x^{100} = 0.99 \equiv x ≈ 0.95$, we conclude that **99% of the volume of a 100-dimensional hypersphere lies within the outer shell of 0.05 thickness.**