Why is the derivative of $\frac{\partial{Tr(AXB)}}{\partial{X}}$ for symmetric matrix X equal to the asymmetric result?

164 Views Asked by At

I'm a bit confused of the fact that an online matrix calculus calculator (https://www.matrixcalculus.org/matrixCalculus) gives the same result for the derivative w.r.t. a symmetric matrix $X$ and a matrix $X$ without symmetry:

$$\frac{\partial{Tr(A^{T}XB)}}{\partial{X}} = AB^{T}$$

For an unstructured matrix we would apply formula (101) in the matrix cookbook (https://www.math.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf). In 2.8.2 they say we need to apply the following rule for symmetric matrices:

$$ \frac{\partial{f}}{\partial{X}} = \frac{\partial{f}}{\partial{X}} + {\bigg[\frac{\partial{f}}{\partial{X}} \bigg]}^T - diag \bigg(\frac{\partial{f}}{\partial{X}}\bigg) \\ \implies AB^{T} + BA^{T} - diag(AB^{T}) $$

What do I miss here?