Bayesian Regression Simplifying the posterior In a linear regression model ${\bf y} = {\bf x}^T {\bf w} + \epsilon$, assuming Gaussian noise ($\epsilon\sim N(0,\sigma_n^2)$), and Gaussian priors on the weights (${\bf w}\sim N({\bf 0}, \Sigma_p))$, I want to show that the posterior distribution for the weights given data $X,{\bf y}$ is also Gaussian, with:
$$p({\bf w}|X,{\bf y})\sim N\left(\bar{\bf w}=\frac{1}{\sigma_n^2}A^{-1}X{\bf y}, A^{-1}\right)$$
Where $A = \sigma_n^{-2}X X^T + \Sigma_p^{-1}$.
However I am stumped at how to come up with the said mean. This is how far I have reached.

how do I proceed from here to finally obtain $A$.
 A: Think of the expression inside the exponential as a quadratic in $\mathbf w$, and complete the square! You should get
$$ - \frac{1}{2\sigma^2} (\mathbf y - \mathbf x^T \mathbf w)^T (\mathbf y - \mathbf x^T \mathbf w) - \frac 1 2 \mathbf w^T \mathbf \Sigma^{-1} \mathbb w = -\frac 1 2 \left(\mathbf w - \mathbf A^{-1}\mathbf x \mathbf y^T \right)^T \mathbf A\left(\mathbf w - \mathbf A^{-1}\mathbf x \mathbf y^T \right) + c$$
where
$$ \mathbf A = \mathbf  \Sigma^{-1} + \frac{1}{\sigma^2}\mathbf x \mathbf x^{T}$$
and $c$ is the "constant term" (i.e. an unimportant number that is independent of $\mathbf w$.)
To verify this, just multiply both sides out and check that the terms containing $\mathbf w$ agree. The terms not involving $\mathbf w$ don't matter.
Having completed the square, we get
$$ p(\mathbf w | \mathbf x, \mathbf y)\propto \exp\left(  -\frac 1 2 \left(\mathbf w - \mathbf A^{-1}\mathbf x \mathbf y^T \right)^T \mathbf A\left(\mathbf w - \mathbf A^{-1}\mathbf x \mathbf y^T \right) \right).$$
Notice how the constant $c$ has been absorbed into the constant of proportionality. This expression is the probability density function for the multivariate Gaussian with mean $\mathbf A^{-1}\mathbf x\mathbf y^T$ and variance $\mathbf A^{-1}$.
