Gradient of trace of Kronecker product Consider the following equation
$$
f(X)=\operatorname{tr}[(X \otimes I_N)^{-1}B],
$$
where $X$ is positive-definite with dimension $L$, and $I_N$ is an identity matrix of dimension $N$. $B$ is also positive-definite.
The goal is to compute the gradient of $f$ over $X$, but I have not found a way to do that yet.
My first trial was to reformulate the term to get rid of the $\otimes$ operation, however, this could not be achieved by combining the properties of the Kronecker product and trace.
 A: First, decompose $B$ into a sum of the form
$$
B = \sum_{i,j = 1}^N B_{ij} \otimes E_{ij},
$$
where each $B_{ij}$ has size $L \times L$ and $E_{ij}$ denotes the $N \times N$ matrix with a $1$ as its $i,j$ entry and zeros elsewhere.  Then, rewrite the function as
$$
\begin{align}
f(X) &= \operatorname{tr}[(X^{-1} \otimes I_N) B] =
\sum_{i,j = 1}^N \operatorname{tr}[(X^{-1} \otimes I_N)(B_{ij} \otimes E_{ij})]
\\ & = \sum_{i,j=1}^N \operatorname{tr}[(X^{-1}B_{ij}) \otimes E_{ij}]
= \sum_{i,j = 1}^N \operatorname{tr}(X^{-1}B_{ij}) \operatorname{tr}(E_{ij})
\\ & = \sum_{i=1}^N \operatorname{tr}(X^{-1}B_{ii}) = \operatorname{tr}\left(X^{-1}\sum_{i=1}^N B_{ii}\right)
\\ & = \operatorname{tr}(X^{-1} \operatorname{tr}_2(B)),
\end{align}
$$
where $\operatorname{tr}_2$ denotes a partial trace. From there, you have a matrix whose derivative can be looked up in a standard reference; see for instance this wikipedia table. The "numerator layout" derivative in this case will be
$$
\frac{\partial f}{\partial X} = -X^{-1}\operatorname{tr}_2(B) X^{-1}.
$$
The "gradient" of your function, as the term is typically used in this context (i.e. the direction of steepest ascent), will be the transpose of the above expression.
