Bounty update: this can be solved by change of basis, but I'm intrigued by David's solution relying on Fourier Transform of Dirac Delta function, so the bounty is for whoever finds a way to fix his solution to give the right result.

Suppose I have a non-negative real-valued function over $d$-dimensional real vectors as follows

$$f(\mathbf{x})=\exp(-\mathbf{x}' A \mathbf{x})$$

Where $A$ is some symmetric positive definite $d\times d$ matrix. What is the normalization factor to turn this into a valid density over the following set?

$$S_d=\{(x_1,\ldots,x_d)\in \mathbf{R}^d | \sum_i x_i=0 \}$$

Below, David Bar Moshe gives a general solution to computing that integral over space orthogonal to some vector $v$, but I suspect it has a mistake because the answer depends on the norm of $v$.

In particular, suppose $A$ is $d$-by-$d$ identity matrix. Let $v$ be a vector of all ones. Because of symmetry, integrating over space orthogonal to $v$ should be the same as as $d-1$ dimensional Gaussian integral, ie $\pi^{(d-1)/2}$, whereas David's solution gives


  • $\begingroup$ Where does the factor of |v| in the first step come from? $\endgroup$ – Yaroslav Bulatov Sep 14 '10 at 5:25
  • 1
    $\begingroup$ The "Dirac Delta" has to be normalized to have unit area. It is invariant under rotation, so you can think of $v$ as a scalar multiple of the first component (where the scalar is the length of $v$), effectively reducing your consideration to one dimension. Making the substitution $u = v x$ shows where the factor must come from. $\endgroup$ – whuber Sep 16 '10 at 3:34
  • $\begingroup$ makes sense now, thanks $\endgroup$ – Yaroslav Bulatov Sep 17 '10 at 0:11

This is a correction of the answer of David Bar Moshe edit: and generalizing it for the case, when $\mathbf{A}$ is degenerate. Using formulas for Fourier and inverse Fourier transforms we can write $$f(0)=\frac{1}{2\pi}\int_{-\infty}^{\infty}\mathrm{d}k\int_{-\infty}^{\infty} \mathrm{d}y f(y)e^{iky}. (1)$$ Suppose $S_d(y)=$"$S_d$ shifted by $(y,0,\dots,0)$" and $f(y)=\int_{\mathbf{x} \in S_d(y)} \mathrm{d}\mathbf{x} \exp(-\mathbf{x}^T \mathbf{A}\mathbf{x}).$ Then using the formula (1) we will get $$N^{-1}=f(0) = \frac{1}{2\pi}\int_{-\infty}^{\infty}\mathrm{d}k\int_{-\infty}^{\infty} \mathrm{d}y f(y)e^{iky} =$$ $$\frac{1}{2\pi}\int_{-\infty}^{\infty}\mathrm{d}k\int_{-\infty}^{\infty} \mathrm{d}y \int_{\mathbf{x} \in S_d(y)}\mathrm{d}\mathbf{x} \exp(-\mathbf{x}^T \mathbf{A}\mathbf{x} + iky) =$$ $$\frac{\|\mathbf{v}\|}{2\pi}\int_{-\infty}^{\infty}\mathrm{d}k \int_{\mathbf{x} \in \mathbb{R}^d}\mathrm{d}\mathbf{x} \exp(-\mathbf{x}^T \mathbf{A}\mathbf{x} + ik \mathbf{v}^T \mathbf{x}),$$ where $\mathbf{v}$ is vector, orthogonal to the plane we are interested in. For example, we can take $\mathbf{v}=(1,\dots,1)$. Note $\|\mathbf{v}\|$ in the last integral, appearing from change of coordinates from $y$ and coordinates in $S_d$ to coordinates in $\mathbb{R}^d$.

Now $N^{-1}=$ $$\frac{\|\mathbf{v}\|}{2\pi}\int_{-\infty}^{\infty} \mathrm{d}k \int_{\mathbf{x} \in \mathbb{R}^d}\mathrm{d}\mathbf{x} \exp(-(\mathbf{x}+\frac{i}{2}k\mathbf{A}^{-1}\mathbf{v})^T \mathbf{A}(\mathbf{x}+\frac{i}{2}k\mathbf{A}^{-1}\mathbf{v}) - \frac{k^2}{4} \mathbf{v}^T \mathbf{A}^{-1}\mathbf{v})=$$ $$\frac{\|\mathbf{v}\|}{2\pi} \frac{\pi^{d/2}}{\sqrt{\det{A}}} \frac{2\sqrt{\pi}}{\sqrt{\mathbf{v}^T \mathbf{A}^{-1}\mathbf{v}}}=\frac{\|\mathbf{v}\| \pi^{(d-1)/2}}{\sqrt{\det{A}}\sqrt{\mathbf{v}^T \mathbf{A}^{-1}\mathbf{v}}}=\frac{\|\mathbf{v}\| \pi^{(d-1)/2}}{\sqrt{\mathbf{v}^T \mathbf{C}\mathbf{v}}},$$ where $\mathbf{C}$ is adjugate matrix to $\mathbf{A}$. Initial integral and the answer both are continuous in $\mathbf{A}$ when $A$ restricted to $S_d$ is not degenerate. From this we can conclude, that equation $N^{-1}=\frac{\|\mathbf{v}\| \pi^{(d-1)/2}}{\sqrt{\mathbf{v}^T \mathbf{C}\mathbf{v}}}$ is true whenever $\mathbf{A}$ restricted to $S_d$ is not degenerate (i.e. even if $\mathbf{A}$ is degenerate).


First, one may assume that $\mathbf{A}$ is a symmetric matrix, since its antisymmetric part doesn't contribute to the density value. The normalization factor is equal to the reciprocal of the integral over constraint surface. This integral can be converted into an integral over the whole of $\mathbb{R}^n$ as follows:

$N^{-1}=\int_{\mathbf{x} \in S_d} \exp(-\mathbf{x}^T \mathbf{A}\mathbf{x}) = \frac1{2\pi}\int_{-\infty}^{\infty}\mathrm{d}k \int_{\mathbf{x} \in \mathbb{R}^d} \exp(-\mathbf{x}^T \mathbf{A}\mathbf{x} + \sqrt{-1}k \mathbf{v}^T \mathbf{x})$

Where $\mathbf{v}$ is a $d$-dimensional vector having all components equal to one. This construction can be understood by exchanging the integration order, then the integration over $k$ generates a Dirac measure concentrated on the constraint surface. The change of order is possible because the integrand is bounded. Performing a square completion of the exponent, we obtain:

$N^{-1}= \frac1{2\pi}\int_{-\infty}^{\infty} \mathrm{d}k \int_{\mathbf{x} \in \mathbb{R}^d} \exp(-(\mathbf{x}+\frac{\sqrt{-1}}{2}k\mathbf{A}^{-1}\mathbf{v})^T \mathbf{A}(\mathbf{x}+\frac{\sqrt{-1}}{2}k\mathbf{A}^{-1}\mathbf{v}) - \frac{k^2}{4} \mathbf{v}^T \mathbf{A}^{-2}\mathbf{v})$

Solving the Gaussian integral over $\mathbb{R}^d$:

$ N^{-1}= \frac{(2\pi)^{\frac{d-3}{2}}}{2\det(\mathbf{A})^{\frac{1}{2}}}\int_{-\infty}^{\infty} \mathrm{d}k \exp(-\frac{k^2}{4} \mathbf{v}^T \mathbf{A}^{-1}\mathbf{v}))$

Solving the Gaussian integral over $k$, we obtain the final result:

$ N^{-1} = \frac{(\pi)^{\frac{(d-1)}{2}}}{\det(\mathbf{A})^{\frac{1}{2} }(\mathbf{v}^T \mathbf{A}^{-1}\mathbf{v})^{\frac{1}{2}}}$

  • $\begingroup$ Wow, this is very in-depth...I'm checking it for some examples now...by the way, is there an easy way to adjust the result if A has rank d-1 with Av=0? (actually this is the reason I'm restricting density to S_d) $\endgroup$ – Yaroslav Bulatov Sep 6 '10 at 16:23
  • $\begingroup$ Hm...I don't quite understand the answer I get for d=2, I added example in question $\endgroup$ – Yaroslav Bulatov Sep 6 '10 at 17:37
  • $\begingroup$ I corrected two errors in the solution, the power of the determinant and the power of $A^{-1}$ in the denominator. The solution was constructed under the assumption that A is nonsingular ($A$ is defined in the question to be positive definite). Nevertheless, if $A$ is non-singular only on the constraint surface, then one should be able using a limiting process to extract the correct value from the result. For example, if $A$ has a vanishing eigenvalue, one can replace this eigenvalue by $\epsilon$, calculate the result and then let $\epsilon$ go to zero. $\endgroup$ – David Bar Moshe Sep 7 '10 at 7:35
  • $\begingroup$ Suppose v=(0,1,1,1,..) and A=I....shouldn't the integral be equivalent to to d-1 dimensional Gaussian integral, ie Pi^((d-1)/2)? I'm not that familiar with matrix square completion, but the sign looks suspicious, ie the plus in (x+...)A(x+... $\endgroup$ – Yaroslav Bulatov Sep 7 '10 at 18:16
  • 1
    $\begingroup$ David's answer is close but needs two fixes, one of which is essential. In the first step, the rhs must be multiplied by the length of the vector v. This factor will persist to the end. In a middle step, the power of the matrix A mistakenly changed: it should equal -1 instead of -2; this was fixed in the last several steps. As a quick check, suppose v is an eigenvector of A with eigenvalue \lambda. Then the normalizing factor should, apart from the usual powers of \pi, contain a factor equal to det(A)/sqrt(\lambda). That happens with the fixes I have indicated. $\endgroup$ – whuber Sep 13 '10 at 18:09

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.