Derivative of function of vector

61 Views Asked by At

$X$ is $n \times n$ symmetric matrix (constants), $y$ is $n \times 1$ vector.

What is the first derivative / differential of

$$f(y)=\exp(-\frac{1}{2}y'Xy) $$

1

There are 1 best solutions below

0
On

Consider the scalar variable $$\eqalign{ s &= X:yy^T \cr }$$and its differential $$\eqalign{ ds &= X:(dy\,y^T+y\,dy^T) \cr &= (Xy+X^Ty):dy \cr &= 2\,Xy:dy \cr }$$ where colon denotes the double-dot (aka Frobenius) product.


Write the function in terms of this new variable. Now finding the differential and gradient is simple $$\eqalign{ f &= \exp(-s/2) \cr \cr df &= -\frac{1}{2}f\,ds \cr &= -f\,Xy:dy \cr \cr \frac{\partial f}{\partial y} &= -f\,Xy \cr }$$