How to vectorize Multivariate Gaussian distribution? I was going through Chuong B Do' notes on The Multivariate Gaussian Distribution. The multivariate Gaussian distribution according to it, is given as follows:
$p(x; \mu, \Sigma) = \frac{1}{(2\pi)^{n/2}|\Sigma|^{1/2}} \exp(-\frac{1}{2}(x − \mu)^{T}\Sigma^{−1}(x − \mu))$
While attempting to come up to this conclusion myself I got stuck at,
$P(x_1,x_2) = P(x_1)P(x_2) = \frac{1}{2\pi\sigma^{2}}\exp(-\frac{1}{2\sigma^{2}}((x_1 - \mu_{X_1})^{2} + (x_2 - \mu_{X_2})^{2}))$
How can I relate the two equation or rather generalize the second one to reach to first?
 A: There are errors in your second expression in particular terms involving $\sigma$.
Assuming $X_1, X_2$ are independent normal with variance $\sigma^2$.
Here $\Sigma = \begin{bmatrix} \sigma^2 & 0  \\ 0  & \sigma^2\ \end{bmatrix}=\sigma^2I_2$, then $|\Sigma|=\sigma^4$ and $|\Sigma|^\frac12=\sigma^2$ 
\begin{align}
P(x_1, x_2) &= \prod_{i=1}^2 P(x_i) \\
&=\prod_{i=1}^2 \frac1{\sqrt{2\pi}\sigma} \exp\left(-\frac1{2\sigma^2} (x_i-\mu_i)^2\right) \\
&= \frac1{2\pi\sigma^2} \exp\left(-\frac12\sum_{i=1}^2\frac1{\sigma^2} (x_i-\mu_i)^2\right) \\
&= \frac1{2\pi\sigma^2} \exp\left(-\frac12\left(\frac1{\sigma^2} (x_1-\mu_1)^2+\frac1{\sigma^2} (x_2-\mu_2)^2\right)\right) \\
&= \frac1{2\pi\sigma^2} \exp\left(-\frac12\begin{bmatrix} x_1-\mu_1,   & x_2-\mu_2\end{bmatrix}\begin{bmatrix} \frac1{\sigma^2} & 0   \\ 0& \frac1{\sigma^2}\end{bmatrix}\begin{bmatrix} x_1-\mu_1 \\    x_2-\mu_2\end{bmatrix}\right) \\
&= \frac1{(2\pi)^{2/2}\sigma^2}\exp \left(-\frac12(x-\mu)^T\Sigma^{-1} (x-\mu) \right)
\end{align}
