Prove matrix derivative identity I found the following identity in the Matrix Cookbook:
\begin{align*}
\frac{\partial }{\partial X} \text{Trace}\left( X B X ^{\mathrm{T}} \right) = XB^{\mathrm{T}} + XB,
\end{align*}
where $X\in\mathbb{R}^{n\times m}$ and $B\in\mathbb{R}^{m \times m}$. Any hints on how I prove this?

It helps to expand the matrix product:
$\begin{align*}
Trace(XBX^{T})&=\sum_{i}(XBX^{T})_{ii}=\sum_{i}\sum_{j}X_{ij}(BX^{T})_{ji}=\sum_{i}\sum_{j}X_{ij}\sum_{k}B_{jk}X^{T}_{ki}=\\
&=\sum_{i}\sum_{j}\sum_{k}X_{ij}B_{jk}X^{T}_{ki}=\sum_{i}\sum_{j}\sum_{k}X_{ij}B_{jk}X_{ik}
\end{align*}$
Then
$\begin{align*}
\frac{{\partial}}{{\partial}(X_{ij},X_{ik})}Trace(XBX^{T})&=\sum_{k}B_{jk}X_{ik}\,+\,\sum_{j}X_{ij}B_{jk}=\sum_{k}B^{T}_{kj}X_{ik}\,+\,\sum_{j}X_{ij}B_{jk}\\
&=(XB^{T})_{ij}\,+\,(XB)_{ik}
\end{align*}$
And summing over all partial derivatives gives the result.
