0

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

alfa
  • 75
  • 1
    Many useful related answers here: https://math.stackexchange.com/questions/189434/derivative-of-quadratic-form – FeedbackLooper Mar 21 '22 at 16:17
  • 1
    See many useful identities for derivatives of vector and matrix functions at https://en.m.wikipedia.org/wiki/Matrix_calculus – Plutoro Mar 21 '22 at 16:25
  • @AlexS I must have searched all the wrong keywords on Wikipedia when I needed this (or it didn't exist at the time). Thanks for sharing! – Cristian Gratie Mar 21 '22 at 16:57

1 Answers1

2

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$.

Steph
  • 3,665