Given $n\times n$ matrix $A$, find (with proof) the gradient $\nabla_X \mbox{tr} (XAX)$. The matrix $A$ does not depend on $X$.
I know that the final answer is of the form:
$$\frac{\partial \mbox{tr} }{\partial X_{ij}}= \sum_k A_{jk}X_{ki}+\sum_k X_{jk} A_{ki}=(AX+XA)_{ji}$$
Is there a way to write out the partial derivative of the individual entries of the matrices?