Evaluating the integral as a function of a matrix and a vector

75 Views Asked by At

Evaluate the integral $$ \int{e^{{-1 \over 2}x^T{Yx+z^Tx}}dx} $$ as w.r.t $Y$ (matrix) and $z$ (vector)

My attempt

I have never seen such a problem before, and I have very unsure how to start. Since I'm supposed to integrate with respect to $x$, my first instinct is to just treat $D = {Yx+z^Tx}$ as an function and just integrate as usual.

Then, I integrate $\int{e^{{-1 \over 2}x^T{D}}dx}$:

$$ \int{e^{{-1 \over 2}x^T{D}}dx} = {-2D'}\int{e^{{-1 \over 2}x^T{D}}dx} $$

But I'm not sure if this is the right approach (or if this integral is right, it's been a long time since I did an integral). Also not sure what $D'$ which is the derivative of ${Yx+z^Tx}$ is supposed to be. Since both $x$ and $z$ are vectors, I realize that the derivative of $z^Tx$ is the partial derivative with respect to $x$. But I have no idea what to do about the $Yx$ part, since $Y$ is a matrix

Any guidance would be appreciated

1

There are 1 best solutions below

3
On BEST ANSWER

I am going to present an answer that doesn't make use of the multivariate normal distribution. The only thing I will assume you know is that for $a>0$: $$\int_\mathbb{R} e^{-ax^2}\, dx = \sqrt{\frac{\pi}{a}}$$

Let's work out the case $b=0$ first. Since $A$ is symmetric and positive it can be decomposed as $A = Q^T D Q$ where $Q$ is orthogonal ($Q^TQ= I$) and $D=\textbf{diag}(\lambda_1, \dots, \lambda_n)$ is a diagonal matrix containing the (positive) eigenvalues of $A$. Then we can write $$Z(A, 0) = \int_{\mathbb{R}^n}e^{-\frac{1}{2}x^TQ^TDQx}\,dx$$ and make the change of variables $y = Qx$ with Jacobian $Q$ to get $$Z(A,0) = \int_{\mathbb{R}^n}e^{-\frac{1}{2}y^TDy}\det(Q)\,dy$$ Since $Q$ is orthogonal $\det(Q)=1$ and so the integral becomes $$Z(A,0)=\int_{\mathbb{R}^n}e^{-\frac{1}{2}\sum_{i=1}^n\lambda_iy_i^2}\,dy = \prod_{i=1}^n\sqrt{\frac{2\pi}{\lambda_i}} = \frac{(2\pi)^{n/2}}{\sqrt{\det(A)}}$$

For the general case, completing the square gives $$-\frac{1}{2}x^TAx + b^Tx = -\frac{1}{2}(x-A^{-1}b)^T A (x-A^{-1}b)+\frac{1}{2}b^TA^{-1}b$$ Repeating the same arguments as above it's easy to verify that $$\int_{\mathbb{R}^n}e^{-\frac{1}{2}(x-A^{-1}b)^TA(x-A^{-1}b)}=\frac{(2\pi)^{n/2}}{\sqrt{\det(A)}}$$ and so $$Z(A,b)=\frac{(2\pi)^{n/2}}{\sqrt{\det(A)}}e^{\frac{1}{2}b^TA^{-1}b}$$