I'm trying to solve the equation:
$\nabla c(-2x^T Dc + c^Tc) = 0$
where:
$\nabla c$ represents the gradient with respect to $c$, $x$ is a row vector, $D$ is a matrix, $c$ is a vector.
In my solving process, I encountered a difficulty in the partial derivative with respect to $c$ of the term $-2x^T Dc$, which seems to become $-2D^Tx$. I don't fully understand how this expression is derived.
Could you kindly explain the step or provide some guidance on how to obtain this specific partial derivative? I appreciate any help or clarification you can provide.
Thank you very much!
$x^\top D c$ can be written explicitly as $\sum_i \sum_j D_{ij} x_i c_j$.
The partial derivative with respect to $c_k$ is $$\frac{\partial}{\partial c_k} \sum_i \sum_j D_{ij} x_i c_j = \sum_i D_{ik} x_k.$$
The gradient with respect to the vector $c$ is a vector containing the partial derivatives with respect to $c_k$, i.e. $$\nabla_c \sum_i \sum_j D_{ij} x_i c_j = \begin{bmatrix} \frac{\partial}{\partial c_1} \sum_i \sum_j D_{ij} x_i c_j \\ \vdots \\ \frac{\partial}{\partial c_n} \sum_i \sum_j D_{ij} x_i c_j \end{bmatrix} = \begin{bmatrix} \sum_i D_{i1} x_i \\ \vdots \\ \sum_i D_{in} x_i \end{bmatrix} = D^\top x. $$