2
$\begingroup$

What's the derivative of $f(w)$ with respect to the vector $w$?

$f(w)=\mathrm{tr}(ww'A) + x^{\prime}ww'x$

Note:

$x,w$ are vectors and $A$ is a square matrix.

${}'$ indicates transpose

Thanks.

1 Answers 1

1

It is usually good to write it out explicitly in coordinates. As far as I understand your notation, you have $f(w) = \sum_{ij} w_i w_j A_{ji} + \sum_{ij} x_i w_i w_j x_j.$

Taking the derivative with respect to $w_k$, we have $\frac{\partial f(w)}{\partial w_k} = \sum_j[ w_j (A_{jk} + A_{kj}) + 2 x_k w_j x_j] .$