How to calculate $\dfrac{\mathrm{d}v^{T}Mv}{\mathrm{d}v} $, where $v$ is a vector and $M$ is a matrix?

96 Views Asked by At

I tried applying the product rule, but I do not know how to calculate each derivative. Which formula do I need to use here?

1

There are 1 best solutions below

0
On BEST ANSWER

Let denote the scalar $\phi(\mathbf{v}) =\mathbf{v}^T \mathbf{M} \mathbf{v} =\mathbf{v}: \mathbf{M} \mathbf{v}$ where the colon operator : denotes the Frobenius inner product. See wikipedia

Taking the differential yields

$$ d\phi =d\mathbf{v}:\mathbf{M} \mathbf{v} + \mathbf{v} : \mathbf{M} d\mathbf{v} = \left( \mathbf{M}+\mathbf{M}^T \right) \mathbf{v} : d\mathbf{v} $$ By definition, the LHS term $\left( \mathbf{M}+\mathbf{M}^T \right) \mathbf{v}$ is the gradient of $\phi$.