Standard result for the gradient of a multidimensional Gaussian If $\vec x$ is a vector of dimension $n$ and $A$ is a symmetric matrix of dimension $n\times n$. I would like to know what is the standard result for computing the following expression?
$$\frac{\partial}{\partial {\vec x}}\exp(-{\vec x}^T\cdot A \cdot {\vec x})$$
So far, for me:
$$\frac{\partial}{\partial {\vec x}}\exp(-{\vec x}^T\cdot A \cdot {\vec x}) = -(A\cdot {\vec x} +{\vec x}^T\cdot A)\exp(-{\vec x}^T\cdot A \cdot {\vec x})$$
Am I missing something to get the exact result? 

You have a composition of:
the diagonal (linear)
$$\Delta:\Bbb R^n\longrightarrow\Bbb R^n\times\Bbb R^n$$
$$x\longmapsto(x,x)$$
a symmetric bilinear form
$$B: \Bbb R^n\times\Bbb R^n\longrightarrow\Bbb R$$
$$(x,y)\longmapsto B(x,y) = -x^TAy$$
and the exponential
$$\exp: \Bbb R\longrightarrow\Bbb R.$$
By the chain rule,
$$D(\exp\circ B\circ\Delta)(x) = \exp'(B(\Delta(x_0)))DB(\Delta(x_0))D\Delta(x_0)$$
Obviously,
$$\exp'(B(\Delta(x_0))) = \exp(B(x_0,x_0)),\qquad D\Delta(x_0) = \Delta.$$
While the differential of the bilinear form in $(x_0,y_0)$ is
$$(x,y)\longmapsto B(x,y_0) + B(x_0,y).$$
Written as row vector, $DB(\Delta(x_0))\Delta$ is
$$ -(x_0^TA +x_0^TA).$$
So the required differential in $x_0$, written as row vector is:
$$ -2\exp(-x_0^TAx_0)x_0^TA.$$
