Skip to content

n-dimensional spheres and ellipsoids – II – volume of n-ellipsoids

This post series provides some insights into the nature of n-dimensional spheres and ellipsoids and the derivation of some special integrals over their volumes. In this 2nd post we look at the volume of a “(n-1)ellipsoid“. This term refers to a closed ellipsoidal surface in a n-dimensional Euclidean space. Such a surface is a (n-1)-dimensional manifold. See the 1st post of this series for the terminology regarding n and (n-1). The result provided below can easily be adapted to a higher number of dimensions, i.e. “n-ellipsoids”.

Surface, shells and volume inside a (n-1)-ellipsoid can be created by a linear transformation of vectors describing a sphere and enclosed spherical shells in the embedding ℝn. The calculation of the ellipsoid’s volume, therefore, requires the proper treatment of a related generating and invertible (positive-definite) (nxn)-matrix M.

In this series, we also look at the stuff of multidimensional volume integrals from the perspective of “Multivariate Normal Distributions” [MVNs]. A natural connection for our present context is provided by the fact that a MVN has ellipsoidal contour surfaces of constant probability density. We will therefore use some of our gathered knowledge about such contour surfaces.

Previous posts

Terms and abbreviations

We work in an Euclidean space represented by the ℝn. We abbreviate a respective Cartesian Coordinate System by CCS. The ellipsoid is described in a system called CCSE. A related sphere, created by a (back-) transformation of the coordinates, is described in a rotated system CCSS with scaled axes. We name the n main axes of a general ellipsoid “ai“. The main axes may be rotated against the coordinate axes of the CCSE.

Regarding MVNs: The standard deviation of a MVN’s marginal Gaussian function along the i-th coordinate axis is called “σi “. A special MVN for a standardized random vector Z is given for independent standardized Gaussians along the coordinate axes of a CCSS:

\[ \begin{align} \text{general centered MVN : } \,\,\,\, \pmb{Y} \,&\sim\, \pmb{\mathcal{N}}_n \left(\pmb{\mu},\, \pmb{\Sigma} \right) \,, \tag{1} \\[10pt] \text{standardized MVN : } \,\,\,\, \pmb{Z} \, &\sim \pmb{\mathcal{N}}_n \left( \pmb{0}, \, \pmb{\operatorname{I}} \right), \,\,\, {\small with} \,\,\, Z_j \,\sim\, \mathcal{N}_1 \left( 0, \,1 \right) \,. \tag{2} \end{align} \]

We only regard centered distributions, whose points of maximum probability density coincide with the CCS-origin, so μ = 0. Due to the standardization of its constituting independent Gaussians, a Z-distribution has spherical contour surfaces of constant probability density. A general MVN-distribution for a random vector Y, has concentric ellipsoidal contour surfaces, instead. The main axes of the ellipsoids are rotated against the coordinate axes of a general CCSE. Such a general Y-distribution, i.e. a general MVN, is related to a Z-distribution by a linear invertible transformation matrix M. See this post for a introduction.

Suppositions 1

As we have already determined the volume of a (n-1)-sphere, the derivation of the volume of a (n-1)-ellipsoid is relatively easy. We will make use of the fact that n-ellipsoids (with their center coinciding with the CCS-origin) can be regarded as the result of a two combined linear operations actively applied to position vectors:

  • A first operation stretches the axes of the sphere along the coordinate axes and a subsequent one rotates the resulting surface in the ℝn. A spherical shell with an infinitesimal extension dr in radial direction thus becomes an ellipsoidal shell with infinitesimal thickness.

Invertible and positive-definite linear transformations of spherical surfaces define quadratic forms for ellipsoidal surfaces. The above linear operations can be expressed in terms of a invertible and positive-definite (nxn)-matrix M in the ℝn. See a separate section below on the question of how to find such a matrix.

Passive rotation: We can equivalently look at the whole scenario of the creation of an ellipsoid in the ℝn also from the perspective of a proper passive transformation between coordinate systems. Transforming passively would mean: The description of an ellipsoidal surface via vectors expressed in the basis of a chosen CCSE is equivalent to the description of a spherical surface or shell given by the same vectors, but expressed with respect to the basis of a backward rotated coordinate system CCSS with properly stretched coordinate axes. Why is this relevant in our context? Answer:
For such a kind of coordinate transformation we know the rules of volume integration in the ℝn very well.

At this point, we could simply analyze the results of an invertible linear transformations applied to vectors that define a unit sphere in the ℝn. But just for fun, we make a small detour. (For those, who like shortcuts: You find a much shorter version of the aspired proof in [2]. )

Relation to MVNs

In this and the following section, I want to motivate a special property of the determinant of the transformation matrix M. It is in general given by a product of the lengths of the target ellipsoid’s semi-axes.

While we could prove this directly by means of linear algebra and standard geometry, we take this insight from properties of a MVN, in particular of its contour surfaces. The transition from spherical contour surfaces of a Z-MVN to ellipsoidal contours of a general Y-MVN can be summarized by the following facts:

  1. The contour surfaces of a general MVN’s probability density ρ in the ℝn are given by concentric ellipsoids. Each of these surfaces is a continuous (n-1)-dimensional manifold in the ℝn. The contour surfaces are fully defined by the covariance matrix ΣY of the MVN.
  2. All vectors on an ellipsoidal contour surface of a MVN result from an invertible linear transformation M applied to the vectors pointing onto a spherical contour surface of a special MVN-distribution for a standardized random vector Z. The probability density of Z is given by the product of n independent, standardized Gaussians (for Z‘s marginals along the coordinate axes).
  3. Position vectors to points on an ellipsoidal contour surface of a MVN have a so called constant Mahalanobis distance dm. The definition of dm corresponds to a quadratic form of the data points’ coordinates in the chosen CCSE. One such ellipsoidal surface is that for dm=1.
  4. The determinant of the transformation matrix M is given by a product of the standard deviations σi of the MVN’s marginal Gaussian distributions along the coordinate axes.
  5. For dm=1 these standard deviations σi just give us the lengths of the semi-axes (= half-axes) ai of the special contour ellipsoid for dm=1. (One can show this from an eigendecomposition of covariance matrix Σ=MMT or its inverse).
  6. M itself can be written as a matrix product of a rotation matrix with a diagonal stretching matrix. M = MrotMstr.

We have made extensive use of these properties already in a parallel post series on a finite ellipsoidal core of a MVN. See e.g. [2] for details. Regarding BVNs and MVNs, this blog provides a variety of posts for beginners; see e.g. here and related posts.

Suppositions 2

We can write symbolically (knowing that the transformation actually has to be applied to concrete vectors of the distribution):

\[ \pmb{Y} \,=\, \pmb{\operatorname{M}}\, \pmb{Z} \,\,. \tag{1} \]

Regarding the symmetric, invertible and positive definite covariance matrix ΣY of the resulting MVN, we have

\[ \pmb{\operatorname{\Sigma}}_Y \,=\, \pmb{\operatorname{M}} \,\pmb{\operatorname{M}}^T \,. \tag{2} \]

An ellipsoidal contour surface of the MVN at a Mahalanobis distance dm=1, is defined by the condition

\[ d_m^2(\pmb{y_e}) \,=\, \pmb{y}_e^T\, \pmb{\Sigma}_Y^{-1} \, \pmb{y}_e \,=\, 1 \,, \tag{3} \]

imposed on respective surface vectors ye. As said: The eigenvalues of M are given by the square roots σi of the variances of the MVN’s n marginal Gaussians.The σi just define the squared semi-axes of the contour ellipsoid for dm=1.

Geometrically speaking: The surface of a contour ellipsoid with semi-axes ai is just the result of an invertible linear transformation M actively applied to vectors reaching to the surface of a unit sphere by a matrix M within a Cartesian Coordinate System CCSS. Inversely formulated for a passive transformation of coordinates and vector components:

  • We get the ellipsoid by transforming vector components, which define a spherical contour surface in a system CCSS, into a backward rotated coordinate system CCSE with axes (!) scaled by 1/σi. Note that scaling an axes by 1/σi corresponds to stretching semi-axes of the sphere along the coordinate axes by σi. A reverse transformation by forward rotating CCSE and afterward scaling its axes by σi (i.e. contracting the semi-axes by 1/σi) brings us back to the original system CCSS where the contour ellipsoid would look spherical. The forward rotation alone aligns the coordinate axes with the main axes of the ellipsoid (rotation to the so called “main axes system”).

For an ellipsoidal contour surface of a MVN with dm=1 (!) and semi-axes ai, we know:

\[ \begin{align} \det (\pmb{\operatorname{M}}) \, =\, \left| \pmb{\operatorname{M}} \right| \,&=\, \prod_{i=1}^n \, \sigma_i \quad \Rightarrow \\[10pt] \left| \pmb{\operatorname{M}} \right| \,&=\, \prod_{i=1}^n \, a_i \,. \tag{4} \end{align} \]

It is relatively easy to see, that the latter condition holds in general and that we can abstract from contour ellipsoids of a MVN. We just consider (n-1)-ellipsoids created from (n-1) spheres by an adjusted transformation M. The argument goes as follows:

Let us define the unit sphere and the respective ellipsoid for dm= 1 by vectors xs and xe, respectively

\[ \begin{align} \{S_{r=1}\} \,&=\, \{ \pmb{x}_s\,\,| \quad \sum_{i=1}^n x_{s,i}^2 \le 1 \, \} \,, \tag{5} \\[10pt] \{E_{d_m}\} \,&=\, \{ \pmb{x}_e \,=\ \pmb{\operatorname{M}} \, \pmb{x}_s \,\,| \quad d_m^2 \le 1 \} \,, \tag{6} \\[10pt] \{E_{qf}\} \,&=\, \{ \pmb{x}_e \,=\ \pmb{\operatorname{M}} \, \pmb{x}_s \,\,| \quad \sum_{i=1}^n x_{e,i}^2 / a_i^2 \le 1 \} \,. \tag{7} \end{align}\]

In the middle eq. (6), (dm)2 now just abbreviates the quadratic form “qf” defining the ellipsoid:

\[ qf \,: \quad \sum_{i=1}^n x_{e,i}^2 / a_i^2 = 1 \,.\tag {8}\]

In (8) the ai-values are still specific and reflect the σi -values, because we have assume dm=1. But, note that we can always scale the stretching part of M via scaling the diagonal elements of the matrix Mstr for the initial stretching operation by a constant factor! This would simply stretch the ellipsoid’s surface for dm=1. This means, that we can generalize and abstract to

\[ \{E_{qf}\} \,=\, \{ \pmb{x}_e \,=\ \pmb{\operatorname{M}} \, \pmb{x}_s \,\,| \quad \sum_{i=1}^n x_{e,i}^2 / a_i^2 \le 1 \} \,, \tag{9} \\[10pt] \]

for any surface with any wished for any ai-values and any quadratic form. We just have to adjust or choose a suited M. Actually, we do not need references to MVN’s and to Mahalanobis distances any longer. I.e., we can take eq. (4) seriously for any ellipsoid. If this does not convince you, maybe the argumentation in the next section will make you more confident.

Quadratic form and linear transformation of a unit sphere

How can we understand that a quadratic form for a (n-1)-ellipsoid is related to a matrix Mt transforming vectors which define a (n-1)-dimensional unit sphere in the ℝn?

Well, we know the recipe to show this already from other posts (on MVNs 🙂 ). We start with the quadratic form that defines the ellipsoid in a CCSE via some symmetric (!), invertible, positive definite matrix Σ-1 (this time, no reference to MVNs required; even ignore the (-1) for the time being, if you like):

\[ \pmb{y}_e^T\, \pmb{\Sigma}^{-1} \, \pmb{y}_e \, \,=\, 1 \,. \tag{13} \]

The ye are assumed to be the result of some invertible linear transformation Mt in the ℝn:

\[ \pmb{y}_e \,=\, \pmb{\operatorname{M}}_t \, \pmb{x}_s \quad \Rightarrow \quad \pmb{x}_s^T \, \pmb{\operatorname{M}}^T_t \,\pmb{\Sigma}^{-1} \, \pmb{\operatorname{M}}_t \,\pmb{x}_s \,=\, 1 \,. \tag{14} \]

If we want the xs to define a sphere, the chain of matrices must obviously fulfill :

\[ \pmb{\operatorname{M}}^T_t \,\pmb{\Sigma}^{-1} \, \pmb{\operatorname{M}}_t \,=\, \lambda * \pmb{\operatorname{I}}_n \,, \tag{15} \]

with In being the (nxn) identity matrix and λ representing a constant factor. Note that the left side corresponds to a transformation of Σ-1 into a different coordinate system (=> CCSS). As Mt is invertible we can rewrite eq. (15) as a condition Mt must fulfill :

\[ \begin{align} \pmb{\Sigma}^{-1} \, &= \, \lambda * \left[\pmb{\operatorname{M}}^T_t \right]^{-1} \, \pmb{\operatorname{M}}^{-1}_t \\[10pt] &= \, \lambda * \left[ \pmb{\operatorname{M}}_t \, \pmb{\operatorname{M}}^T_t \right]^{-1} \,. \tag{16} \end{align} \]

If you want, you can now move a factor sqrt(λ) into Mt and MtT to get matrices M and MT. I.e.:

\[ \pmb{\Sigma} \, = \, \pmb{\operatorname{M}} \, \pmb{\operatorname{M}}^T \,. \tag{17} \]

A proper M can always be found by a Cholesky decomposition of Σ. This shows that for a given quadratic form (mediated by some invertible pos.-definite matrix Σ-1), we can always find a matrix M that creates the ellipsoid from a unit sphere in the ℝn. An eigendecomposition of the symmetric Σ gives us

\[ \pmb{\Sigma} \,=\, \pmb{\operatorname{Q}} \, \pmb{\operatorname{\Lambda}} \, \pmb{\operatorname{Q}}^T \,, \tag{18} \]

with Λ being a diagonal matrix having the eigenvalues of Σ on its diagonal. Q instead is an orthogonal matrix. Q can be regarded as a rotation in the ℝn. This shows that M can indeed be written as

\[ \pmb{\operatorname{M}} \,=\, \pmb{\operatorname{Q}} \, \pmb{\operatorname{\Lambda}}^{1/2} \,= \, \pmb{\operatorname{M}}_{rot} \, \pmb{\operatorname{M}}_{str} \,. \tag{19} \]

As the stretching operation creates the n semi-axis ai of the ellipsoid, which is only rotated afterward, we can indeed conclude:

\[ \det (\pmb{\operatorname{M}} ) \,=\, \left| \pmb{\operatorname{M}} \right| \,=\, \prod_{i=1}^n \, a_i \,. \tag{20} \]

As we already found out from the properties of a MVN. For those who have followed my posts on MVNs this is nothing new. But it reflects a relation between MVNs and geometry.

Derivation of the volume of a n-ellipsoid

We need just one more puzzle piece:

  • We know that the volume of a body in linearly transformed coordinates can be calculated by performing a volume integral in the original coordinate system, but taking the Jacobian determinant of the coordinate transformation into account.

Let us call the volumes of the unit sphere VSn,1 and the volume of our general target ellipsoid VEn,qf. For an invertible coordinate transformation mediated by our matrix M (with constant coefficients), we can relate the volume integrals for the ellipsoid in CCSE and the sphere in CCSS:

\[ \begin{align} \underset{V_{n, qf}^E} { \iint … \int} \, dx_{e,1}\, dx_{e,2}, …,\, dx_{e,n} \,&= \, \underset{V^S_{n,1}} {\iint … \int} \, \left| \pmb{\operatorname{M}} \right| \, dx_{s,1}\, dx_{s,2}, …,\, dx_{s,n} \\[10pt] &=\, \left| \pmb{\operatorname{M}} \right| * \underset{V^S_{n,1}} {\iint … \int} \, \, dx_{s,1}\, dx_{s,2}, …,\, dx_{s,n} \,. \tag{21} \end{align} \]

As said: The first integral applies in the CCSE of the transformed coordinates, and the 2nd integral in the original coordinate system CCSS. I.e.,

\[ V^E_{n,\,qf} \,= \, \left| \pmb{\operatorname{M}} \right| * V^S_{n,1} \,. \tag{22} \]

Using the results of the previous post (see eqs. (38) and (39) there), we get the volume of the transformed unit sphere, i.e. of our (n-1)-ellipsoid:

\[ V^E_{n,\, qf} \,= \, {\pi^{n/2} \over \Gamma \left(1 + {n \over 2}\right) } \, \prod_{i=1}^n \, a_i \,. \tag{23} \]

The (n-1)-ellipsoid and its axes are described in some chosen CCSE. To get the volume of a n-ellipsoid you just have to adapt the number of dimensions (n -> n+1).

Conclusion / Outlook

The volume of a (n-1)-dimensional ellipsoid in the ℝn can easily be determined when we know the ellipsoids semi-axes (or, equivalently, its quadratic form). We have made the result plausible not only by straightforwardly using Linear Algebra, but also by generalizing properties of contour surfaces of a MVN.

Unfortunately, there is no such derivation of an analytic expression for the surface area of such an ellipsoid. But as we will see in the next post of this series, we may again get help from statistics and MVN-like distributions.

Links and literature

[1] R. Mönchmeyer, 2025, “Covariance matrix of a cut-off Multivariate Normal Distribution – II – integrals over volume and surface of an n-dimensional sphere”, blog post at
https://machine-learning.anracom.com/2025/12/12/covariance-matrix-of-a-cut-off-multivariate-normal-distribution-ii-integrals-over-volume-and-surface-of-an-n-dimensional-sphere/

[2] M.Jorgensen, 2014, “Volumes of n-dimensional spheres and ellipsoids”,
https://www.whitman.edu/Documents/Academics/Mathematics/2014/jorgenmd.pdf