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.
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.
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] .$$
Define the symmetric matrix $$B = \left(\frac{A+A^T}{2}\right)+xx^T$$ Using this matrix the function can be written as a quadratic form $$f = w^TBw$$ which has a well-known derivative $$\frac{\partial f}{\partial w} = 2Bw = \left(A+A^T+2xx^T\right)w$$