# Thread: Integration In multidimensional domain

1. ## Integration In multidimensional domain

How to resolve?:

$\int_{X} \exp{ \left( -\frac{X^{T}QX}{2} \right)}\left( -\frac{X^{T}QX}{2} \right)dX$

where $X$ is a vector $[x_{1},...,x_{n}]^T$ and $Q$ a n*n matrix. The integral should be calculated over $\mathbb{R}^n$..

In analogy with the 1dimensional case, I supposed to consider the argument as a sort of $Qx^2$, and resolve the integral by parts , dividing the last term and trying to obtain the derivate of the term $\left( -\frac{X^{T}QX}{2} \right)$.
But I am not shure how to proceed in the multidimensional domain. Is my thought valid? Someone can help me?
Thanks
Pollo

2. To simplify the question (and reduce to a more classical one), you could consider diagonalizing $Q$.

This is not always possible, but for every $X$, $X^TQ X=X^T\frac{Q+Q^T}{2}X$, hence you can replace $Q$ by $A=\frac{Q+Q^T}{2}$, which is real and symmetric. As a consequence, $A$ diagonalizes in an orthonormal basis. Let $\lambda_1,\ldots,\lambda_n$ be its eigenvalues. Changing from one orthonormal basis to another doesn't change the volume (this is a rotation, perhaps plus a symmetry, anyway it is an orthogonal transformation), hence your integral becomes, using this change of basis:
$\int \frac{1}{2}\left(\sum_{i=1}^n \lambda_i x_i^2\right) \exp\left(-\frac{1}{2}\sum_{i=1}^n \lambda_i x_i^2\right) dx_1\cdots dx_n$.
(I swapped the factors to avoid confusion) You can expand the first sum so that you get the sum of $n$ integrals, and then integrate each of them rather simply. I think the integral converges iff the $\lambda_i$'s are positive.

One question remains: what is the connection between the $\lambda_i$'s and $Q$? Don't you in fact assume that $Q$ itself is symmetric (and positive)?

I think what you finally get is: $\frac{1}{2}(2\pi)^{n/2}{\rm Tr}(A)$, which is also $\frac{1}{2}(2\pi)^{n/2}{\rm Tr}(Q)$. The previous question becomes: for which $Q$ does the integral converge? (or: for which $Q$ is $A$ positive?) I don't know the answer. Does anyone?

3. Thanks for the response. The fact is: this integral came out from a more general problem of Information Theory: I need to prove that a gaussian vector $X$ having a covariance matrix $Q$, and then having a probability function
$f(X)=\frac{1}{\sqrt{(2\pi)^n\det{(Q)}}}\exp\left(-\frac{X^{T}Q^{-1}X}{2}\right)$
has entropy
$h(X)=\frac{1}{2}\log\left((2\pi e)^n\det(Q)\right)$

where the general definition of the entropy is
$h(X)=\int_{X}-f(X)\log(f(X))dX$

then, developing the formula, and exploiting the property of the probability function $\int_{X}f(X)dX=1$, I stop when I have to calculate the purposed integral.

4. Originally Posted by pollo
covariance matrix $Q$
Hence $Q$ is symmetric (and probably positive, if the distribution is not degenerate), and you can reread what I wrote with $Q$ instead of $A$.

I made a mistake in my (unwritten) computation: in fact I get $\frac{1}{2}(2\pi)^{n/2}n$. I think this coincides with your result (this term gives the " $e$").