integrale of the multivariate gaussian function

45 Views Asked by At

Let $A \in\mathbb{R}^{N\times N} $ be a symmetric, positive definite matrix and $b \in \mathbb{R}^N$ a vector. If $x\in \mathbb{R}^N$, evaluate the integral. $$ Z(A,b)= \int e^{-\frac{1}{2} x^TAx+b^Tx}dx$$ as a function of A and b.

My proprosition : The matrix A is symmetric,positive definite matrix it mean that A is diagonalizable, there exist a matrix P ortogonal ($P^TP=PP^T=I_N$) and a matrix D diagonal $D=diag(d_1,\cdots,d_N)$ where $d_i>0$ such that

$$ A= P^TDP$$ $x^TAx= x^TP^TDPx=(Px)^TD(Px)$.

Let $y=Px$ which implies that $x^TAx=\sum_{i=1}^{N}d_iy_i^2$ and $b^Tx=b^TP^Ty=\sum_{i=1}^{N}P_ib^T y_i$ where $P_i$ is a clumns of the matrix P. $$-\frac{1}{2}x^TAx+b^Tx=-\frac{1}{2}\sum_{i=1}^{N}d_iy_i^2 + \sum_{i=1}^{N}P_ib^T y_i$$

$$ -\frac{1}{2}d_iy_i^2 +P_ib^T y_i=-\frac{1}{2}d_i \left(y_i -\frac{1}{d_i}b^TP_i\right)^2 + \frac{1}{2d_i} (b^TP_i)^2 $$

$$ Z(A,b)= \int e^{-\frac{1}{2} x^TAx+b^Tx}dx=\int \prod_{i=1}^{N}e^{-\frac{1}{2}d_i \left(y_i -\frac{1}{d_i}b^TP_i\right)^2 + \frac{1}{2d_i} (b^TP_i)^2 }dy.$$
Let $u_i =\sqrt{d_i}\left(y_i -\frac{1}{d_i}b^TP_i\right)$. And I'm not sure about the rest.

2

There are 2 best solutions below

3
On

Let's start by proving that

$$ I = \int \exp\bigg(-\frac{1}{2}x^\top Ax\bigg) d^nx $$

As you noted we can diagonalize $A$ with an othogonal transformation. Define $D=P^\top AP=\text{diag}(\lambda_1, \dots, \lambda_n)$ and $y=P^\top x$. The integral then becomes (the Jacobian of the transformation is the identity matrix):

$$ \begin{split} I &= \int \exp\bigg(-\frac{1}{2}y^\top Dy\bigg) d^ny \\ &= \prod_i \int \exp\bigg(-\frac{1}{2}\lambda_i y_i^2\bigg) dy \\ &= \prod_i \sqrt{\frac{2\pi}{\lambda_i}} \\ &= \sqrt{\frac{(2\pi)^n}{\det(A)}} \end{split} $$

For the more general integral

$$ I_b = \int \exp\bigg(-\frac{1}{2}x^\top Ax + b^\top x\bigg) d^nx $$

we can proceed as it is customary with gaussian integral by completing the square which gives an extra exponential, so that we end up with: $$ \begin{split} I_b &= \int \exp\bigg(-\frac{1}{2}y^\top Ay + \frac{1}{2}b^\top A^{-1}b\bigg) d^ny \\ &= \sqrt{\frac{(2\pi)^n}{\det(A)}} \exp\bigg(\frac{1}{2}b^\top A^{-1}b\bigg) \end{split} $$ where we have defined $x=y+A^{-1}b$

0
On
Let $A \in\mathbb{R}^{N\times N} $ be a symmetric, positive definite matrix and $b \in \mathbb{b} \in \mathbb{R}^N$ a vector. If $x\in \mathbb{R}^N$, evaluate the integral.
$$ Z(A,b)= \int e^{-\frac{1}{2} x^TAx+b^Tx}d^Nx$$ 

We have :

$$ Z(A,b) = \int e^{-\frac{1}{2} x^T A x + b^T x} \, d^Nx $$



\begin{eqnarray*}
  -\frac{1}{2} x^T A x + b^T x &=& -\frac{1}{2} (x^T A x - 2b^T x) \\[3mm]
   &=& -\frac{1}{2} (x^T A x - 2b^T x + b^TA^{-1} b - b^TA^{-1} b) \\[3mm]
  &=& -\frac{1}{2} (x^T A x - 2b^T x + b^TA^{-1} b) + \frac{1}{2} b^TA^{-1} b \\[3mm]
     &=& -\frac{1}{2} ((x - A^{-1}b)^T A (x - A^{-1}b)) + \frac{1}{2} b^TA^{-1} b 
 \end{eqnarray*}

So we have :

\begin{eqnarray*}
   Z(A,b) &=& \displaystyle\int e^{-\frac{1}{2} ((x - A^{-1}b)^T A (x - A^{-1}b))} e^{\frac{1}{2} b^TA^{-1} b} \, d^Nx \\[3mm]
     &=&\displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle \int e^{-\frac{1}{2} ((x - A^{-1}b)^T A (x - A^{-1}b))} \, d^Nx 
 \end{eqnarray*}
Let $y=x -A^{-1}b$ then $dy=dx$, We have 

\begin{eqnarray*}
  Z(A,b) &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle\int e^{-\frac{1}{2}y^TAy} d^Ny \\[3mm]
  Z(A,b  &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle\int e^{-\frac{1}{2}y^TAy} d^Ny
 \end{eqnarray*}
$A$ is symmetrical define positive implies that $A$ is diagonalizable, its values are real positive, its eigenvectors are perpendicular and there exists an orthogonal matrix $Q$ such that $Q^TQ=QQ^T=I$, $|det(Q)|= 1$. $A=QDQ^T$, where $D=diag(d_1, \cdots,d_N)$.
\begin{eqnarray*}
  A&=&QDQ^T\\
  y^TAy&=&y^TQDQ^Ty\\
   y^TAy &=&(Q^Ty)^TD(Q^Ty)
 \end{eqnarray*}
Let's $X=Q^Ty$ we have $y=QX$ and $dy=|det(Q)|dX$.
\begin{eqnarray*}
   y^TAy &=&X^TDX\\
         &=& \displaystyle \sum_{i=1}^{N} d_ix_i^2
 \end{eqnarray*}

\begin{eqnarray*}
 Z(A,b) &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle\int e^{-\frac{1}{2}y^TAy} d^Ny\\[3mm]
         &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle\int e^{-\frac{1}{2} \sum_{i=1}^{N} d_ix_i^2} d^Ny\\[3mm] 
         &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle\int \prod_{i=1}^{N} e^{-\frac{1}{2}  d_ix_i^2} d^Ny\\[3mm] 
         &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \prod_{i=1}^{N}\displaystyle \int  e^{-\frac{1}{2}  d_ix_i^2} dy\\[3mm]  
         &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \prod_{i=1}^{N}\displaystyle \sqrt{\frac{2\pi}{d_i}} \\[3mm]
 Z(A,b) &=& \displaystyle e^{\frac{1}{2} b^TA^{-1} b} \displaystyle \sqrt{\frac{(2\pi)^N}{det(A)}}  
 \end{eqnarray*}

Where $\displaystyle\prod_{i=1}^{N} d_i=det(A) $