# Volume of an n-ball

In geometry, a ball is a region in space consisting of all points within a fixed distance from a fixed point. An n-ball is a ball in n-dimensional Euclidean space. The volume of an n-ball is an important constant that occurs in formulas throughout mathematics.

## Formulas

### The volume

The n-dimensional volume of a Euclidean ball of radius R in n-dimensional Euclidean space is:[1]

$V_n(R) = \frac{\pi^{n/2}}{\Gamma(\frac{n}{2} + 1)}R^n,$

where Γ is Leonhard Euler's gamma function (which can be thought of as an extension of the factorial function to fractional arguments). Using explicit formulas for particular values of the gamma function at the integers and half integers gives formulas for the volume of a Euclidean ball that do not require an evaluation of the gamma function. These are:

$V_{2k}(R) = \frac{\pi^k}{k!}R^{2k},$
$V_{2k+1}(R) = \frac{2^{k+1}\pi^k}{(2k+1)!!}R^{2k+1} = \frac{2(k!)(4\pi)^k}{(2k+1)!}R^{2k+1}.$

In the formula for odd-dimensional volumes, the double factorial (2k + 1)!! is defined for odd integers 2k + 1 as (2k + 1)!! = 1 · 3 · 5 ··· (2k − 1) · (2k + 1).

Instead of expressing the volume V of the ball in terms of its radius R, the formula can be inverted to express the radius as a function of the volume:

$R_n(V) = \frac{\Gamma(\frac{n}{2} + 1)^{1/n}}{\sqrt{\pi}}V^{1/n}.$

This formula, too, can be separated into even and odd dimensional cases using factorials and double factorials in place of the gamma function:

$R_{2k}(V) = \frac{(k!V)^{1/2k}}{\sqrt{\pi}},$
$R_{2k+1}(V) = \left(\frac{(2k+1)!!V}{2^{k+1}\pi^k}\right)^{1/(2k+1)}.$

### Recursions

The volume satisfies several recursive formulas. These formulas can either be proved directly or proved as consequences of the general volume formula above. The simplest to state is a formula for the volume of an n-ball in terms of the volume of an (n − 2)-ball of the same radius:

$V_n(R) = \frac{2\pi R^2}{n} V_{n-2}(R).$

There is also a formula for the volume of an n-ball in terms of the volume of an (n − 1)-ball of the same radius:

$V_n(R) = R\sqrt{\pi}\frac{\Gamma(\frac{n+1}{2})}{\Gamma(\frac{n}{2} + 1)} V_{n-1}(R).$

Using explicit formulas for the gamma function again shows that the one-dimension recursion formula can also be written as:

\begin{align} V_{2k}(R) &= R\pi \frac{(2k - 1)!!}{2^k k!} V_{2k-1}(R) = R\pi \frac{(2k-1)(2k-3) \cdots 5 \cdot 3 \cdot 1}{(2k)(2k - 2) \cdots 6 \cdot 4 \cdot 2} V_{2k-1}(R), \\ V_{2k+1}(R) &= 2R\frac{2^k k!}{(2k+1)!!} V_{2k}(R) = 2R\frac{(2k)(2k - 2) \cdots 6 \cdot 4 \cdot 2}{(2k-1)(2k-3) \cdots 5 \cdot 3 \cdot 1} V_{2k}(R). \end{align}

### Low dimensions

In low dimensions, these volume and radius formulas simplify to the following:

Dimension Volume of a ball of radius R Radius of a ball of volume V
0 $1$ All balls have volume 1
1 $2R$ $V/2$
2 $\pi R^2$ $\frac{V^{1/2}}{\sqrt{\pi}}$
3 $\frac{4}{3}\pi R^3$ $\left(\frac{3V}{4\pi}\right)^{1/3}$
4 $\frac{\pi^2}{2} R^4$ $\frac{(2V)^{1/4}}{\sqrt{\pi}}$
5 $\frac{8\pi^2}{15} R^5$ $\left(\frac{15V}{8\pi^2}\right)^{1/5}$
6 $\frac{\pi^3}{6} R^6$ $\frac{(6V)^{1/6}}{\sqrt{\pi}}$
7 $\frac{16\pi^3}{105} R^7$ $\left(\frac{105V}{16\pi^3}\right)^{1/7}$
8 $\frac{\pi^4}{24} R^8$ $\frac{(24V)^{1/8}}{\sqrt{\pi}}$
9 $\frac{32\pi^4}{945} R^9$ $\left(\frac{945V}{32\pi^4}\right)^{1/9}$
10 $\frac{\pi^5}{120} R^{10}$ $\frac{(120V)^{1/10}}{\sqrt{\pi}}$

### High dimensions

Suppose that R is fixed. Then the volume of an n-ball of radius R approaches zero as n tends to infinity. This can be shown using the two-dimension recursion formula. At each step, the new factor being multiplied into the volume is proportional to 1 / n, where the constant of proportionality R2 is independent of n. Eventually, n is so large that the new factor is less than 1. From then on, the volume of an n-ball must decrease at least geometrically, and therefore it tends to zero. A variant on this proof uses the one-dimension recursion formula. Here, the new factor is proportional to a quotient of gamma functions. Gautschi's inequality bounds this quotient above by n−1/2. The argument concludes as before by showing that the volumes decrease at least geometrically.

A more precise description of the high dimensional behavior of the volume can be obtained using Stirling's approximation. It implies the asymptotic formula:

$V_n(R) \sim \frac{1}{\sqrt{n\pi}}\left(\frac{2\pi e}{n}\right)^{n/2}R^n.$

The error in this approximation is a factor of 1 + O(n−1). Stirling's approximation is in fact an underestimate of the gamma function, so the above formula is an upper bound. This gives another proof that the volume of the ball decreases exponentially: When n is sufficiently large, the factor $R\sqrt{2\pi e / n}$ is less than one, and then the same argument as before applies.

### Relation with surface area

Let $A_n(R)$ denote the surface area of the n-sphere of radius R. The n-sphere is the boundary of the (n + 1)-ball of radius R. The (n + 1)-ball is a union of concentric spheres, and consequently the surface area and the volume are related by:

$A_n(R) = \frac{d}{dR}V_{n+1}(R).$

Since the volume is proportional to a power of the radius, the above relation leads to a simple recurrence equation relating the surface area of an n-ball and the volume of an (n + 1)-ball. By applying the two-dimension recursion formula, it also gives a recurrence equation relating the surface area of an n-ball and the volume of an (n − 1)-ball:

$V_0(R) = 1,$
$A_0(R) = 2,$
$V_{n+1}(R) = \frac{R}{n+1}A_n(R),$
$A_{n+1}(R) = (2\pi R)V_n(R).$

## Proofs

There are many proofs of the above formulas.

### The volume is proportional to the nth power of the radius

An important step in several proofs about volumes of n-balls, and a generally useful fact besides, is that the volume of the n-ball of radius R is proportional to Rn:

$V_n(R) \propto R^n.$

The proportionality constant is the volume of the unit ball.

The above relation has a simple inductive proof. The base case is n = 0, where the proportionality is obvious. For the inductive case, assume that proportionality is true in dimension n − 1. Note that the intersection of an n-ball with a hyperplane is an (n − 1)-ball. When the volume of the n-ball is written as an integral of volumes of (n − 1)-balls:

$V_n(R) = \int_{-R}^R V_{n-1}(\sqrt{R^2 - x^2}) \,dx,$

it is possible by the inductive assumption to remove a factor of R from the radius of the n − 1 ball to get:

$V_n(R) = R^{n-1} \int_{-R}^R V_{n-1}\left(\sqrt{1 - (x/R)^2}\right) \,dx.$

Making the change of variables t = x/R leads to:

$V_n(R) = R^n \int_{-1}^1 V_{n-1}(\sqrt{1 - t^2}) \,dt = R^n V_n(1),$

which demonstrates the proportionality relation in dimension n. By induction, the proportionality relation is true in all dimensions.

### The two-dimension recursion formula

A proof of the recursion formula relating the volume of the n-ball and an (n − 2)-ball can be given using the proportionality formula above and integration in cylindrical coordinates. Fix a plane through the center of the ball. Let r denote the distance between a point in the plane and the center of the sphere, and let θ denote the azimuth. Intersecting the n-ball with the (n − 2)-dimensional plane defined by fixing a radius and an azimuth gives an (n − 2)-ball of radius $\sqrt{R^2 - r^2}$. The volume of the ball can therefore be written as an iterated integral of the volumes of the (n − 2)-balls over the possible radii and azimuths:

$V_n(R) = \int_0^{2\pi} \int_0^R V_{n-2}(\sqrt{R^2 - r^2}) \,r\,dr\,d\theta,$

The azimuthal coordinate can be immediately integrated out. Applying the proportionality relation shows that the volume equals:

$V_n(R) = (2\pi) V_{n-2}(R) \int_0^R (1 - (r/R)^2)^{(n-2)/2}\,r\,dr.$

The integral can be evaluated by making the substitution u = 1 − (r/R)2 to get:

\begin{align} V_n(R) &= (2\pi) V_{n-2}(R) \cdot \left(-\frac{R^2}{n}(1 - (r/R)^2)^{n/2}\right)\bigg|_{r=0}^{r=R} \\ &= \frac{2\pi R^2}{n} V_{n-2}(R), \end{align}

which is the two-dimension recursion formula.

The same technique can be used to give an inductive proof of the volume formula. The base cases of the induction are the 0-ball and the 1-ball, which can be checked directly using the facts $\Gamma(1) = 1$ and $\Gamma(3/2) = (1/2) \cdot \Gamma(1/2) = \sqrt{\pi}/2$. The inductive step is similar to the above, but instead of applying proportionality to the volumes of the (n − 2)-balls, the inductive assumption is applied instead.

### The one-dimension recursion formula

The proportionality relation can also be used to prove the recursion formula relating the volumes of an n-ball and an (n − 1)-ball. As in the proof of the proportionality formula, the volume of an n-ball can be written as an integral over the volumes of (n − 1)-balls. Instead of making a substitution, however, the proportionality relation can be applied to the volumes of the (n − 1)-balls in the integrand:

$V_n(R) = V_{n-1}(R) \int_{-R}^R (1 - (x/R)^2)^{(n-1)/2} \,dx.$

The integrand is an even function, so by symmetry the interval of integration can be restricted to [0, R]. On the interval [0, R], it is possible to apply the substitution u = (x/R)2. This transforms the expression into:

$V_{n-1}(R) \cdot R \cdot \int_0^1 (1-u)^{(n-1)/2}u^{-1/2}\,du$

The integral is a value of a well-known special function called the beta function, and the volume in terms of the beta function is:

$V_n(R) = V_{n-1}(R) \cdot R \cdot B(\textstyle\frac{n + 1}{2}, \textstyle\frac{1}{2}).$

The beta function can be expressed in terms of the gamma function in much the same way that factorials are related to binomial coefficients. Applying this relationship gives:

$V_n(R) = V_{n-1}(R) \cdot R \cdot \frac{\Gamma(\frac{n + 1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{n}{2} + 1)}.$

Using the value $\Gamma(1/2) = \sqrt{\pi}$ gives the one-dimension recursion formula:

$V_n(R) = R\sqrt{\pi}\frac{\Gamma(\frac{n+1}{2})}{\Gamma(\frac{n}{2} + 1)} V_{n-1}(R).$

As with the two-dimension recursive formula, the same technique can be used to give an inductive proof of the volume formula.

### Direct integration in spherical coordinates

The volume can be computed by integrating the volume element in spherical coordinates. The spherical coordinate system has a radial coordinate r and angular coordinates φ1, ..., φn − 1, where the domain of each φ except φn − 1 is [0, π), and the domain of φn − 1 is [0, 2π). The spherical volume element is:

$dV = r^{n-1}\sin^{n-2}(\phi_1)\sin^{n-3}(\phi_2) \cdots \sin(\phi_{n-2})\, dr\,d\phi_1\,d\phi_2 \cdots d\phi_{n-1},$

and the volume is the integral of this quantity over r between 0 and R and all possible angles:

$V_n(R) = \int_0^R \int_0^\pi \cdots \int_0^{2\pi} r^{n-1}\sin^{n-2}(\phi_1) \cdots \sin(\phi_{n-2})\, d\phi_{n-1} \cdots d\phi_1\,dr.$

Each of the factors in the integrand depends on only a single variable, and therefore the iterated integral can be written as a product of integrals:

$V_n(R) = \bigg(\int_0^R r^{n-1}\,dr\bigg)\bigg(\int_0^\pi \sin^{n-2}(\phi_1)\,d\phi_1\bigg)\cdots\bigg(\int_0^{2\pi} d\phi_{n-1}\bigg).$

The integral over the radius is Rn/n. The intervals of integration on the angular coordinates can, by symmetry, be changed to [0, π/2]:

$V_n(R) = \frac{R^n}{n} \bigg(2\int_0^{\pi/2} \sin^{n-2}(\phi_1)\,d\phi_1\bigg) \cdots \bigg(4\int_0^{\pi/2} d\phi_{n-1}\bigg).$

Each of the remaining integrals is now a particular value of the beta function:

$V_n(R) = \frac{R^n}{n} \textstyle B(\frac{n-1}{2}, \frac{1}{2}) B(\frac{n-2}{2}, \frac{1}{2}) \cdots B(\frac{2}{2}, \frac{1}{2}) \cdot 2B(\frac{1}{2}, \frac{1}{2}).$

The beta functions can be rewritten in terms of gamma functions:

$V_n(R) = \frac{R^n}{n} \frac{\Gamma(\frac{n-1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{n}{2})} \frac{\Gamma(\frac{n-2}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{n - 1}{2})} \cdots \frac{\Gamma(\frac{2}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{3}{2})} \cdot 2 \frac{\Gamma(\frac{1}{2})\Gamma(\frac{1}{2})}{\Gamma(\frac{2}{2})}.$

This product telescopes. Combining this with the values $\Gamma(1/2) = \sqrt{\pi}$ and $\Gamma(1) = 1$ and the functional equation zΓ(z) = Γ(z + 1) leads to:

$V_n(R) = \frac{2\pi^{n/2}R^n}{n\Gamma(\frac{n}{2})} = \frac{\pi^{n/2}R^n}{\Gamma(\frac{n}{2} + 1)}.$

### Gaussian integrals

The volume formula can be proved directly using Gaussian integrals. Consider the function:

$f(x_1, \ldots, x_n) = \exp\Big(\mathord{-}\textstyle\frac{1}{2} \displaystyle\sum_{i=1}^n x_i^2\Big).$

This function is both rotationally invariant and a product of functions of one variable each. Using the fact that it is a product and the formula for the Gaussian integral gives:

$\int_{\mathbf{R}^n} f \,dV = \prod_{i=1}^n \Big(\int_{-\infty}^\infty \exp\left(-x_i^2/2\right)\,dx_i\Big) = (2\pi)^{n/2},$

where dV is the n-dimensional volume element. Using rotational invariance, the same integral can be computed in spherical coordinates:

$\int_{\mathbf{R}^n} f \,dV = \int_0^\infty \int_{S^{n-1}(r)} \exp\left(-r^2/2\right) \,dA\,dr,$

where Sn − 1(r) is an (n − 1)-sphere of radius r and dA is the area element (equivalently, the (n − 1)-dimensional volume element). The surface area of the sphere satisfies a proportionality equation similar to the one for the volume of a ball: If An − 1(r) is the surface area of an (n − 1)-sphere of radius r, then:

$A_{n-1}(r) = r^{n-1} A_{n-1}(1).$

Applying this to the above integral gives the expression:

$A_{n-1}(1) \int_0^\infty \exp\left(-r^2/2\right)\,r^{n-1}\,dr.$

By substituting t = r2/2, the expression is transformed into:

$A_{n-1}(1) 2^{n/2 - 1} \int_0^\infty e^{-t} t^{n/2 - 1}\,dt.$

This is the gamma function evaluated at n/2.

Combining the two integrations shows that:

$A_{n-1}(1) = \frac{2\pi^{n/2}}{\Gamma(\frac{n}{2})}.$

To derive the volume of an n-ball of radius R from this formula, integrate the surface area of a sphere of radius r for r between 0 and R and apply the functional equation zΓ(z) = Γ(z + 1):

$V_n(R) = \int_0^R \frac{2\pi^{n/2}}{\Gamma(\frac{n}{2})} \,r^{n-1}\,dr = \frac{2\pi^{n/2}}{n\Gamma(\frac{n}{2})}R^n = \frac{\pi^{n/2}}{\Gamma(\frac{n}{2} + 1)}R^n.$

## Balls in Lp norms

There are also explicit expressions for the volumes of balls in Lp norms. The Lp norm of the vector x = (x1, ..., xn) in Rn is $\textstyle (\sum |x_i|^p)^{1/p}$, and an Lp ball is the set of all vectors whose Lp norm is less than or equal to a fixed number called the radius of the ball. The case p = 2 is the standard Euclidean distance function, but other values of p occur in diverse contexts such as information theory, coding theory, and dimensional regularization.

The volume of an Lp ball of radius R is:

$V^p_n(R) = \frac{(2\Gamma(\frac{1}{p} + 1)R)^n}{\Gamma(\frac{n}{p} + 1)}.$

These volumes satisfy a recurrence relation similar to the one dimension recurrence for p = 2:

$V^p_n(R) = (2\Gamma(\textstyle\frac{1}{p} + 1) R) \displaystyle\frac{\Gamma(\frac{n-1}{p} + 1)}{\Gamma(\frac{n}{p} + 1)} V^p_{n-1}(R).$

For p = 2, one recovers the recurrence for the volume of a Euclidean ball because $2\Gamma(3/2) = \sqrt{\pi}$.

For example, in the cases p = 1 and p = ∞, the volumes are:

$V^1_n(R) = \frac{2^n}{n!}R^n,$
$V^\infty_n(R) = (2R)^n.$

These agree with elementary calculations of the volumes of cross-polytopes and hypercubes.

For most values of p, the surface area of an Lp sphere (the boundary of an Lp ball) cannot be calculated by differentiating the volume of an Lp ball with respect to its radius. While the volume can be expressed as an integral over the surface areas using the coarea formula, the coarea formula contains a correction factor that accounts for how the p-norm varies from point to point. For p = 2 and p = ∞, this factor is one. However, if p = 1, then the correction factor is $\sqrt{n}$: The surface area of an L1-(n − 1)-sphere of radius R is $\sqrt{n}$ times the derivative at R of the volume of an L1-n-ball. For most values of p, the constant is a complicated integral.

The volume formula can be generalized even further. For positive real numbers p1, ..., pn, define the unit (p1, ..., pn) ball to be:

$B_{p_1, \ldots, p_n} = \{ x = (x_1, \ldots, x_n) \in \mathbf{R}^n : \vert x_1 \vert^{1/p_1} + \cdots + \vert x_n \vert^{1/p_n} \le 1 \}.$

The volume of this ball is:[2]

$\operatorname{Vol}(B_{p_1, \ldots, p_n}) = 2^n \frac{\Gamma(1 + p_1^{-1}) \cdots \Gamma(1 + p_n^{-1})}{\Gamma(1 + p_1^{-1} + \cdots + p_n^{-1})}.$