How to calculate the following
$$ \frac{\partial}{\partial x} \log (\det X(x))$$
where $X$ is a matrix in $\mathbb{R}^{n\times n}$ which is a function of $x\in \mathbb{R}^d$?
How to calculate the following
$$ \frac{\partial}{\partial x} \log (\det X(x))$$
where $X$ is a matrix in $\mathbb{R}^{n\times n}$ which is a function of $x\in \mathbb{R}^d$?
The gradient of $\log \det X$ with respect to the entries of $X$ is $X^{-1}$, so the total derivative with respect to $x$ is $\sum_i \sum_j (X^{-1}(x))_{ij} (X'_{ij}(x))$. Here, $X_{ij}(x)$ denotes the $i,j$-entry of $X(x)$, and $X'_{ij}$ denotes the derivative of this entry with respect to $x$. $X^{-1}(x)$ denotes the matrix inverse of $X(x)$.
\begin{equation} \frac{\partial}{\partial x}\log(\det(X(x))) = \frac{1}{\det(X(x))} \mathrm{Tr}\left(\mathrm{Adj}(X(x)) \mathrm{d} X(x)\right) \end{equation} Edit:
"d" implies the gradient operator in the covariant form, which acts on the provided (1,1)-tensor in the usual way, making it a (2,1)-tensor.