How can I compute the volume of the hyperellipsoid corresponding to a Mahalanobis distance $r^2 = (x-\mu)^{T}\Sigma^{-1}(x-\mu)$?

I'm a bit confused because the answer involves $r$:

$$V = V_{d} |\Sigma|^{1/2}r^{d}$$ with $V_{d}$ as the volume of a d-dimensional unit hypersphere. I have seen that some statements of this problem describe $V_{d}$ as:

$$V_{d} = \left\{ \begin{array}{ll} \pi^{d/2}/(d/2)! \;\;\; \text{for d even}\\\ 2^{d}\pi^{(d-1)/2}\left(\frac{d-1}{2}\right)!/(d)! \;\;\; \text{for d odd} \end{array}\right.$$

I thought I was supposed to integrate $r^{2}$ over $r\in [0, 1]$ and the surface of a unit hypersphere, but that doesn't give the right answer. What is the right procedure?

Thanks in advance

  • $\begingroup$ Start with $\mu = 0$ and $\Sigma = I,$ the identity matrix. Do you know the $d$-volume of an ordinary hypersphere of radius $r?$ $\endgroup$
    – Will Jagy
    Mar 17, 2013 at 1:40
  • $\begingroup$ Same idea, really. Do you know how to derive $V_d?$ Not contract $V_d,$ that means something different. $\endgroup$
    – Will Jagy
    Mar 17, 2013 at 1:41
  • $\begingroup$ Sure. The differential of volume in cylindrical coordinates takes the form $r^{n-1}d\Omega$ that when integrated produces $\frac{2\pi^{n/2}}{\Gamma(n/2)}\frac{r^{n}}{n}$ (although now I'm not sure why you edited user1938185's answer to include the term $1+d/2$) $\endgroup$ Mar 17, 2013 at 3:56
  • $\begingroup$ Now I can see that the volume of a hypersphere is $\frac 2 d \frac {\pi ^ {d/2}} {\Gamma (1 + (d/2)) } r^d$ according to Wikipedia's n-sphere article (en.wikipedia.org/wiki/N_sphere) but the surface of a hypersphere with radius 1 is $2 \frac {\pi ^ {d/2}} {\Gamma ((d/2)) }$ in the Sphere article (en.wikipedia.org/wiki/Sphere) which integrated produces $\frac{2\pi^{n/2}}{\Gamma(n/2)}\frac{r^{n}}{n}$. This result is confirmed by W|A: wolframalpha.com/input/?i=volume+hypersphere $\endgroup$ Mar 17, 2013 at 4:13
  • $\begingroup$ I did not notice the extra $d$ in the denominator $\endgroup$
    – Will Jagy
    Mar 17, 2013 at 4:30

2 Answers 2


Your ellipsoid is the transformation of the sphere of radius $r$ by the linear transform of matrix $Σ^{1/2}$.

The volume of the sphere of radius $r$ in an $d$-dimensional space is $V = \frac 2 d \frac {\pi ^ {d/2}} {\Gamma ( d/2) } r^d = V_d r^d$. wikipedia. Note the $r^d$.

Your get the volume of the ellipsoid by multiplying with the determinant of the linear transform, which is exactly your formula.

  • $\begingroup$ Oh, that makes it so easy. Yes, that was the first approach I tried but I didn't know this ellipsoid was a linear transformation of the sphere of radius $r$ using $\Sigma^{1/2}$. How can I see that? I was under the impression that I needed to work with the Mahalanobis distance. $\endgroup$ Mar 17, 2013 at 2:04

You can put $r$ on the right hand side: $1 = (x-\mu)^T(r \Sigma^{1/2})^{-2} (x-\mu)$. Then the answer becomes clearer: $V = V_d\ \det(r\Sigma^{1/2}) = V_d\ \det(\Sigma)^{1/2}r^d$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.