I am trying to differentiate ${\rm tr}(A(X\otimes I_n))$ with respect to $X$. What I have in mind is using chain rule but I am not sure if its correct in matrix calculus
$$ \partial\frac{{\rm tr}(A(X\otimes I_n))}{\partial X}=\partial\frac{{\rm tr}(A(X\otimes I_n))}{\partial (X\otimes I_n)}\frac{\partial X\otimes I_n}{\partial X} $$
Is this correct? And if so can somebody send me a reference that justifies the step that I take?
Thank you.
You can prove the chain rule for matrix calculus in the exact way you prove it for ordinary calculus, as seen here. The only necessary change is to divide by $|H|$ in the definition of the derivative and to multiply by $|H|$ and $|K|$ in the formulae given for $g(X+H)$ and $f(Y+K)$, respectively. So, yes, this will work fine.