I have a $n$ element vector $V$ and a symmetric $n\times n$ matrix $M$ (all of real elements).
I calculate a score as $({ V^TMV })^{1/2}$
Now is there a formula that would give me:
- the derivative of the score according to one coordinate of the vector
- the second derivative of the score according to one coordinate of the vector
Just by definition: $$S=\sqrt{\sum_{ij}m_{ij}v_iv_j}.$$ $$\partial_{x_k}S = \frac {1}{2S }\partial_{x_k}\sum_{ij}m_{ij}v_iv_j=\frac {1}{2S } \left(\sum_{ j}m_{kj} v_j+\sum_{i }m_{ik}v_i \right) =\frac {1}{S}(MV)_k. $$
Can you write the second derivative now?