# Calculate the product of two Gaussian PDF's

I'm trying to understand the origin of the formulas for the $\mu$ and the $\sigma^2$ from this side (stanford):

As I have understood actually the product of two Gaussian PDF's is not again a Gaussian PDF. But with the formula from the stanford website I again get a Gaussian PDF.

Where I need help is:

1. Understand the origin of the two formulas $(\mu, \sigma^2)$
2. Is the center of the product of two PDF's and the center of a PDF calculated via the two formulas in the same place?

Write $g_{\mu,\sigma^2}$ for the gaussian density with mean $\mu$ and variance $\sigma^2$, that is, $$g_{\mu,\sigma^2}(x)=\frac1{\sqrt{2\pi\sigma^2}}\exp\left(-\frac1{2\sigma^2}(x-\mu)^2\right).$$ Then the function $g_{\mu_1,\sigma_1^2}\cdot g_{\mu_2,\sigma_2^2}$ is proportional to $g_{\mu,\sigma^2}$, where the parameters $\mu$ and $\sigma^2$ are uniquely determined by the two relations $$(\sigma_1^2+\sigma_2^2)\mu=\mu_1\sigma_2^2+\mu_2\sigma_1^2,\qquad \frac1{\sigma^2}=\frac1{\sigma_1^2}+\frac1{\sigma_2^2}.$$ This stems from the fact that one can write $$\frac1{\sigma_1^2}(x-\mu_1)^2+\frac1{\sigma_2^2}(x-\mu_2)^2=\frac1{\sigma^2}(x-\mu)^2+C,$$ for the values of $\mu$ and $\sigma^2$ given above, where $C$ is independent on $x$.