normalization factor for restricted density 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
$$\frac{\pi^{(d-1)/2}}{d}$$
 A: 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).
A: 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}}}$
