2
$\begingroup$

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$?

$\endgroup$
  • 1
    $\begingroup$ Do you know how to express a determinant as a sum? It will be a step in the right direction (Jacobi's formula). Also know that "inner times outer" applies here as well. $\endgroup$ – Michael Paris Jul 23 '18 at 6:26
  • $\begingroup$ @MichaelParis, no, I don't know. Would you please explain a little? $\endgroup$ – user85361 Jul 23 '18 at 6:53
  • 1
    $\begingroup$ en.m.wikipedia.org/wiki/Jacobi%27s_formula. The determinant of a matrix has a couple of useful representations as a sum, one of which can be used to simplify your expression $\endgroup$ – Michael Paris Jul 23 '18 at 6:57
1
$\begingroup$

\begin{equation} \frac{\partial}{\partial x}log(det(X(x))) = \frac{1}{det(X(x))} tr\left(adj(X(x)) dX(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.

$\endgroup$
  • $\begingroup$ Do we have $X(x) \frac{\partial}{\partial x}log(det(X(x)))= tr(\frac{\partial}{\partial x}X(x))$ $\endgroup$ – user85361 Jul 23 '18 at 7:17
  • $\begingroup$ Is the result a vector or a matrix? What is the dimension of the result? $\endgroup$ – user85361 Jul 23 '18 at 7:29
  • $\begingroup$ It's just in \mathrm{R} $\endgroup$ – Michael Paris Jul 23 '18 at 7:34
  • $\begingroup$ $\mathrm{R}$? How it is possible that a derivative with respect to a vector becomes only in $\mathrm{R}$.? $\endgroup$ – user85361 Jul 23 '18 at 7:39
  • $\begingroup$ Oh, my bad. Should be in R^d then. Didn't notice that x \in R^d. $\endgroup$ – Michael Paris Jul 23 '18 at 7:41
1
$\begingroup$

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)$.

$\endgroup$
  • $\begingroup$ Thank you. Although it must be very easy, I'm a little confused. Could you please show it in matrix notation form? $\endgroup$ – user85361 Jul 23 '18 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.