Volume of an n-ball
{{Short description|Size of a mathematical ball}}
{{DISPLAYTITLE:Volume of an n-ball}}
File:Volumes of unit balls.svg
In geometry, a ball is a region in a space comprising all points within a fixed distance, called the radius, from a given point; that is, it is the region enclosed by a sphere or hypersphere. An {{math|n}}-ball is a ball in an {{math|n}}-dimensional Euclidean space. The volume of a {{math|n}}-ball is the Lebesgue measure of this ball, which generalizes to any dimension the usual volume of a ball in 3-dimensional space. The volume of a {{mvar|n}}-ball of radius {{mvar|R}} is where is the volume of the unit ball, the {{mvar|n}}-ball of radius {{math|1}}.
The real number can be expressed via a two-dimension recurrence relation.
Closed-form expressions involve the gamma, factorial, or double factorial function.
The volume can also be expressed in terms of , the area of the unit n-sphere.
Formulas
{{See also|N-sphere#Volume and area|Unit sphere#Volume and area}}
The first volumes are as follows:
class="wikitable"
! Dimension !! Volume of a ball of radius {{math|R}} !! Radius of a ball of volume {{math|V}} | ||
0
| | (all 0-balls have volume 1) | ||
1
| | | ||
2
| | | ||
3
| | | ||
4
| | | ||
5
| | | ||
6
| | | ||
7
| | | ||
8
| | | ||
9
| | | ||
10
| | | ||
11
| | | ||
12
| | | ||
13
| | | ||
14
| | | ||
15
| | | ||
n | Vn(R) | Rn(V) |
---|
= Closed form =
The {{math|n}}-dimensional volume of a Euclidean ball of radius {{math|R}} in {{math|n}}-dimensional Euclidean space is:Equation 5.19.4, NIST Digital Library of Mathematical Functions. http://dlmf.nist.gov/5.19#E4, Release 1.0.6 of 2013-05-06.
:
where {{math|Γ}} is Euler's gamma function. The gamma function is offset from but otherwise extends the factorial function to non-integer arguments. It satisfies {{math|Γ(n) {{=}} (n − 1)!}} if {{math|n}} is a positive integer and {{math|Γ(n + {{sfrac|1|2}}) {{=}} (n − {{sfrac|1|2}}) · (n − {{sfrac|3|2}}) · … · {{sfrac|1|2}} · {{pi}}1/2}} if {{math|n}} is a non-negative integer.
= Two-dimension recurrence relation =
The volume can be computed without use of the Gamma function. As is proved below using a vector-calculus double integral in polar coordinates, the volume {{math|V}} of an {{math|n}}-ball of radius {{math|R}} can be expressed recursively in terms of the volume of an {{math|(n − 2)}}-ball, via the interleaved recurrence relation:
:
V_n(R) = \begin{cases}
1 &\text{if } n=0,\\[0.5ex]
2R &\text{if } n=1,\\[0.5ex]
\dfrac{2\pi}{n}R^2 \times V_{n-2}(R) &\text{otherwise}.
\end{cases}
This allows computation of {{math|V{{sub|n}}(R)}} in approximately {{math|n / 2}} steps.
= Alternative forms =
The volume can also be expressed in terms of an {{math|(n − 1)}}-ball using the one-dimension recurrence relation:
:
V_0(R) &= 1, \\
V_n(R) &= \frac{\Gamma\bigl(\tfrac n2 + \tfrac12 \bigr)\sqrt\pi}{\Gamma\bigl(\tfrac n2 + 1\bigr)}R\, V_{n-1}(R).
\end{align}
Inverting the above, the radius of an {{math|n}}-ball of volume {{math|V}} can be expressed recursively in terms of the radius of an {{math|(n − 2)}}- or {{math|(n − 1)}}-ball:
:
R_n(V) &= \bigl(\tfrac12n\bigr)^{1/n}\left(\Gamma\bigl(\tfrac n2\bigr) V\right)^{-2/(n(n-2))}R_{n-2}(V), \\
R_n(V) &= \frac{\Gamma\bigl(\tfrac n2 + 1\bigr)^{1/n}}{\Gamma\bigl(\tfrac n2 + \tfrac12 \bigr)^{1/(n-1)}}V^{-1/(n(n-1))}R_{n-1}(V).
\end{align}
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 in terms of factorials. For non-negative integer {{mvar|k}}, these are:
:
V_{2k}(R) &= \frac{\pi^k}{k!}R^{2k}, \\
V_{2k+1}(R) &= \frac{2(k!)(4\pi)^k}{(2k + 1)!}R^{2k+1}.
\end{align}
The volume can also be expressed in terms of double factorials. For a positive odd integer {{math|2k + 1}}, the double factorial is defined by
:
The volume of an odd-dimensional ball is
:
There are multiple conventions for double factorials of even integers. Under the convention in which the double factorial satisfies
:
the volume of an {{math|n}}-dimensional ball is, regardless of whether {{math|n}} is even or odd,
:
Instead of expressing the volume {{math|V}} of the ball in terms of its radius {{math|R}}, the formulas can be inverted to express the radius as a function of the volume:
:
R_n(V) &= \frac{\Gamma\bigl(\tfrac n2 + 1\bigr)^{1/n}}{\sqrt{\pi}}V^{1/n} \\
&= \left(\frac{n!! V}{2(2\pi)^{(n-1)/2}}\right)^{1/n} \\
R_{2k}(V) &= \frac{(k!V)^{1/(2k)}}{\sqrt{\pi}}, \\
R_{2k+1}(V) &= \left(\frac{(2k+1)!V}{2(k!)(4\pi)^k}\right)^{1/(2k+1)}.\end{align}
= Approximation for high dimensions=
Stirling's approximation for the gamma function can be used to approximate the volume when the number of dimensions is high.
:
:
In particular, for any fixed value of {{math|R}} the volume tends to a limiting value of 0 as {{math|n}} goes to infinity. Which value of {{mvar|n}} maximizes {{math|V{{sub|n}}(R)}} depends upon the value of {{mvar|R}}; for example, the volume {{math|Vn(1)}} is increasing for {{math|0 ≤ n ≤ 5}}, achieves its maximum when {{math|n {{=}} 5}}, and is decreasing for {{math|n ≥ 5}}.Smith, David J. and Vamanamurthy, Mavina K., "How Small Is a Unit Ball?", Mathematics Magazine, Volume 62, Issue 2, 1989, pp. 101–107, https://doi.org/10.1080/0025570X.1989.11977419.
Also, there is an asymptotic formula for the surface area{{Cite web | url=https://www.stat.berkeley.edu/~songmei/Teaching/STAT260_Spring2021/Lecture_notes/scribe_lecture7.pdf | title=Lecture 7: Concentration Inequalities and Field theoretic calculations | date=2021-02-10 | author=Song Mei | website=www.stat.berkeley.edu}}
= Relation with surface area =
File:Surface areas of unit hyperspheres.svg
Let {{math|A{{sub|n − 1}}(R)}} denote the hypervolume of the n-sphere of radius {{math|R}}. The {{math|(n − 1)}}-sphere is the {{math|(n − 1)}}-dimensional boundary (surface) of the {{math|n}}-dimensional ball of radius {{math|R}}, and the sphere's hypervolume and the ball's hypervolume are related by:
:
Thus, {{math|A{{sub|n − 1}}(R)}} inherits formulas and recursion relationships from {{math|V{{sub|n}}(R)}}, such as
:
There are also formulas in terms of factorials and double factorials.
Proofs
There are many proofs of the above formulas.
= The volume is proportional to the {{math|''n''}}th power of the radius =
An important step in several proofs about volumes of {{math|n}}-balls, and a generally useful fact besides, is that the volume of the {{math|n}}-ball of radius {{math|R}} is proportional to {{math|Rn}}:
:
The proportionality constant is the volume of the unit ball.
This is a special case of a general fact about volumes in {{math|n}}-dimensional space: If {{math|K}}
is a body (measurable set) in that space and {{math|RK}} is the body obtained by stretching in all directions by the factor {{math|R}} then the volume of {{math|RK}} equals {{math|Rn}} times the volume of {{math|K}}. This is a direct consequence of the change of variables formula:
:
where {{math|1=dx = dx1…dxn}} and the substitution {{math|1=x = Ry}} was made.
Another proof of the above relation, which avoids multi-dimensional integration, uses induction: The base case is {{math|n {{=}} 0}}, where the proportionality is obvious. For the inductive step, assume that proportionality is true in dimension {{math|n − 1}}. Note that the intersection of an n-ball with a hyperplane is an {{math|(n − 1)}}-ball. When the volume of the {{math|n}}-ball is written as an integral of volumes of {{math|(n − 1)}}-balls:
:
it is possible by the inductive hypothesis to remove a factor of {{math|R}} from the radius of the {{math|(n − 1)}}-ball to get:
:
Making the change of variables {{math|t {{=}} {{sfrac|x|R}}}} leads to:
:
which demonstrates the proportionality relation in dimension {{math|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 {{math|n}}-ball and an {{math|(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 {{math|r}} denote the distance between a point in the plane and the center of the sphere, and let {{math|θ}} denote the azimuth. Intersecting the {{math|n}}-ball with the {{math|(n − 2)}}-dimensional plane defined by fixing a radius and an azimuth gives an {{math|(n − 2)}}-ball of radius {{math|{{sqrt|R2 − r2}}}}. The volume of the ball can therefore be written as an iterated integral of the volumes of the {{math|(n − 2)}}-balls over the possible radii and azimuths:
:
The azimuthal coordinate can be immediately integrated out. Applying the proportionality relation shows that the volume equals
:
The integral can be evaluated by making the substitution {{math|u {{=}} 1 − ({{sfrac|r|R}}){{su|p=2}}}} to get
:
V_n(R) &= 2\pi V_{n-2}(R) \cdot \left[-\frac{R^2}{n}\left(1 - \left(\frac{r}{R}\right)^2\right)^{n/2}\right]_{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 {{math|Γ(1) {{=}} 1}} and {{math|Γ({{sfrac|3|2}}) {{=}} {{sfrac|1|2}} · Γ({{sfrac|1|2}}) {{=}} {{sfrac|{{sqrt|{{pi}}}}|2}}}}. The inductive step is similar to the above, but instead of applying proportionality to the volumes of the {{math|(n − 2)}}-balls, the inductive hypothesis 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 {{math|n}}-ball and an {{math|(n − 1)}}-ball. As in the proof of the proportionality formula, the volume of an {{math|n}}-ball can be written as an integral over the volumes of {{math|(n − 1)}}-balls. Instead of making a substitution, however, the proportionality relation can be applied to the volumes of the {{math|(n − 1)}}-balls in the integrand:
:
The integrand is an even function, so by symmetry the interval of integration can be restricted to {{math|[0, R]}}. On the interval {{math|[0, R]}}, it is possible to apply the substitution {{math|u {{=}} ({{sfrac|x|R}}){{su|p=2}}}}. This transforms the expression into
:
The integral is a value of a well-known special function called the beta function {{math|Β(x, y)}}, and the volume in terms of the beta function is
:
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
:
Using the value {{math|Γ({{sfrac|1|2}}) {{=}} {{sqrt|{{pi}}}}}} gives the one-dimension recursion formula:
:
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 of the n-ball can be computed by integrating the volume element in spherical coordinates. The spherical coordinate system has a radial coordinate {{math|r}} and angular coordinates {{math|φ1, …, φn − 1}}, where the domain of each {{math|φ}} except {{math|φn − 1}} is {{math|[0, {{pi}})}}, and the domain of {{math|φn − 1}} is {{math|[0, 2{{pi}})}}. The spherical volume element is:
:
and the volume is the integral of this quantity over {{math|r}} between 0 and {{math|R}} and all possible angles:
:
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:
:
The integral over the radius is {{math|{{sfrac|Rn|n}}}}. The intervals of integration on the angular coordinates can, by the symmetry of the sine about {{sfrac|{{pi}}|2}}, be changed to {{math|[0, {{sfrac|{{pi}}|2}}]}}:
:
Each of the remaining integrals is now a particular value of the beta function:
:
The beta functions can be rewritten in terms of gamma functions:
:
This product telescopes. Combining this with the values {{math|Γ({{sfrac|1|2}}) {{=}} {{sqrt|{{pi}}}}}} and {{math|Γ(1) {{=}} 1}} and the functional equation {{math|zΓ(z) {{=}} Γ(z + 1)}} leads to
:
= Gaussian integrals =
The volume formula can be proven directly using Gaussian integrals. Consider the function:
:
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:
:
where {{math|dV}} is the {{math|n}}-dimensional volume element. Using rotational invariance, the same integral can be computed in spherical coordinates:
:
where {{math|Sn − 1(r)}} is an {{math|(n − 1)}}-sphere of radius {{math|r}} (being the surface of an {{math|n}}-ball of radius {{math|r}}) and {{math|dA}} is the area element (equivalently, the {{math|(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 {{math|An − 1(r)}} is the surface area of an {{math|(n − 1)}}-sphere of radius {{math|r}}, then:
:
Applying this to the above integral gives the expression
:
Substituting {{math|t {{=}} {{sfrac|r2|2}}}}:
:
The integral on the right is the gamma function evaluated at {{math|{{sfrac|n|2}}}}.
Combining the two results shows that
:
To derive the volume of an {{math|n}}-ball of radius {{math|R}} from this formula, integrate the surface area of a sphere of radius {{math|r}} for {{math|0 ≤ r ≤ R}} and apply the functional equation {{math|zΓ(z) {{=}} Γ(z + 1)}}:
:
= Geometric proof =
The relations and and thus the volumes of n-balls and areas of n-spheres can also be derived geometrically. As noted above, because a ball of radius is obtained from a unit ball by rescaling all directions in times, is proportional to , which implies . Also, because a ball is a union of concentric spheres and increasing radius by ε corresponds to a shell of thickness ε. Thus, ; equivalently, .
follows from existence of a volume-preserving bijection between the unit sphere and :
:
( is an n-tuple; ; we are ignoring sets of measure 0). Volume is preserved because at each point, the difference from isometry is a stretching in the xy plane (in times in the direction of constant ) that exactly matches the compression in the direction of the gradient of on (the relevant angles being equal). For , a similar argument was originally made by Archimedes in On the Sphere and Cylinder.
Balls in {{math|''L''{{isup|''p''}}}} norms
There are also explicit expressions for the volumes of balls in Lp spaces. The {{math|L{{isup|p}}}} norm of the vector {{math|x {{=}} (x1, …, xn)}} in {{math|Rn}} is
:
and an {{math|L{{isup|p}}}} ball is the set of all vectors whose {{math|L{{isup|p}}}} norm is less than or equal to a fixed number called the radius of the ball. The case {{math|p {{=}} 2}} is the standard Euclidean distance function, but other values of {{math|p}} occur in diverse contexts such as information theory, coding theory, and dimensional regularization.
The volume of an {{math|L{{isup|p}}}} ball of radius {{math|R}} is
:
These volumes satisfy recurrence relations similar to those for {{math|p {{=}} 2}}:
:
and
:
which can be written more concisely using a generalized binomial coefficient,
:
For {{math|p {{=}} 2}}, one recovers the recurrence for the volume of a Euclidean ball because {{math|2Γ({{sfrac|3|2}}) {{=}} {{radic|{{pi}}}}}}.
For example, in the cases {{math|p {{=}} 1}} (taxicab norm) and {{math|p {{=}} ∞}} (max norm), the volumes are:
:
These agree with elementary calculations of the volumes of cross-polytopes and hypercubes.
= Relation with surface area =
For most values of {{math|p}}, the surface area of an {{math|L{{isup|p}}}} sphere of radius {{math|R}} (the boundary of an {{math|L{{isup|p}}}} {{math|n}}-ball of radius {{math|R}}) cannot be calculated by differentiating the volume of an {{math|L{{isup|p}}}} 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 {{math|p}}-norm varies from point to point. For {{math|p {{=}} 2}} and {{math|p {{=}} ∞}}, this factor is one. However, if {{math|p {{=}} 1}} then the correction factor is {{math|{{sqrt|n}}}}: the surface area of an {{math|L1}} sphere of radius {{math|R}} in {{math|Rn}} is {{math|{{sqrt|n}}}} times the derivative of the volume of an {{math|L1}} ball. This can be seen most simply by applying the divergence theorem to the vector field {{math|F(x) {{=}} x}} to get
:{{oiint
| preintegral =
| intsubscpt =
| integrand =
}} {{oiint
| intsubscpt =
| integrand =
}} {{oiint
| intsubscpt =
| integrand =
}}
For other values of {{math|p}}, the constant is a complicated integral.
= Generalizations =
The volume formula can be generalized even further. For positive real numbers {{math|p1, …, pn}}, define the {{math|(p1, …, pn)}} ball with limit {{math|L ≥ 0}} to be
:
The volume of this ball has been known since the time of Dirichlet:{{cite journal|last=Dirichlet|first=P. G. Lejeune|title=Sur une nouvelle méthode pour la détermination des intégrales multiples|trans-title=On a novel method for determining multiple integrals|journal=Journal de Mathématiques Pures et Appliquées|volume=4|date=1839|pages=164–168}}
:
== Comparison to {{math|''L''{{isup|''p''}}}} norm ==
Using the harmonic mean and defining , the similarity to the volume formula for the {{math|L{{isup|p}}}} ball becomes clear.
:
See also
References
{{Reflist}}
= Further reading =
- {{Cite journal |last=Hayes |first=Brian| author-link=Brian Hayes (scientist) |title=An Adventure in the Nth Dimension |url=https://www.americanscientist.org/article/an-adventure-in-the-nth-dimension |access-date=October 24, 2024 |journal=American Scientist |volume=99 |issue=9| date=November–December 2011| page=442 |doi=10.1511/2011.93.442}}, bibliography, accessible to layman.
- Updated version: {{Cite book |last=Hayes |first=Brian |author-link=Brian Hayes (scientist) |chapter=Playing Ball in the nth Dimension |title=Foolproof, and Other Mathematical Meditations |publisher=The MIT Press |publication-date=September 22, 2017 |isbn=9780262036863}}, bibliography, accessible to layman.
External links
- [http://www.brouty.fr/Maths/sphere.html Derivation in hyperspherical coordinates] {{in lang|fr}}
- [http://mathworld.wolfram.com/Hypersphere.html Hypersphere] on Wolfram MathWorld
- [http://www.mathreference.com/ca-int,hsp.html Volume of the Hypersphere] at Math Reference