[Math] Differentiation of summation of summation

derivativessummation

According to http://www.atmos.washington.edu/~dennis/MatrixCalculus.pdf, (45) and (46) (p. 6),

differention of
$$\alpha = \sum_{j=1}^n\sum_{i=1}^n a_{ij} x_i x_j $$

with respect to the k-th element of x yields:

$$\frac{\partial\alpha}{\partial x_k} = \sum_{j=1}^n a_{kj} x_j + \sum_{i=1}^n a_{ik} x_i $$

Note that a does not depend on x.

How is this result obtained?

From differentiation with summation symbol, I understood how to derive one summation.
The function above seems to be of form f(g(x)) to me, so I would apply the chain rule.
But how can the result contain a + then, indicating some form of the product rule was used?

Best Answer

Much simpler: $$ \frac{\partial}{\partial x_k} \sum_{i, j} a_{i j} x_i x_j = \sum_{i, j} a_{i j} \left( \frac{\partial x_i}{\partial x_k} x_j + x_i \frac{\partial x_j}{\partial x_k} \right) = \sum_j a_{k j} x_j + \sum_i a_{i k} x_i $$

Related Question