According to matrix cookbook

$$\frac{\partial \det Y}{\partial x} = \det (Y) \text{Tr}\left( Y^{-1} \frac{\partial Y}{\partial x}\right) $$

Now assume $Y$ is a variance covariance matrix $\Sigma$, which is by definition symmetric and positive definite. Furthermore assume we derive for $x=\Sigma$. Does it follow that

$$\frac{\partial \det \Sigma}{\partial \Sigma} = \det (\Sigma) \text{Tr}\left( \Sigma^{-1} \frac{\partial \Sigma}{\partial \Sigma}\right) = \det (\Sigma) \text{Tr}( \Sigma^{-1}) ?$$

In a related post I asked a similar question and a reply seems to suggest (and the reply seems to give the correct result)

$$\frac{\partial \det \Sigma}{\partial \Sigma} = \det (\Sigma) \Sigma^{-1}.$$

So I wonder if I make a mistake in the second row of equations of if this is a special case due to the properties of $\Sigma$.

  • $\begingroup$ In the first equation, $x$ is very clearly a scalar value (since the right hand side is a scalar, and so is the determinant). $\Sigma$ very clearly isn't a scalar value, so it is not to expect that inserting $x=\Sigma$ gives any meaningful result. $\endgroup$ – celtschk Oct 23 '16 at 11:44
  • $\begingroup$ @celtschk That's it. Thanks. $\endgroup$ – tomka Oct 23 '16 at 12:08

Note, that for symmetric matrix derevative of $\partial X/\partial x_{ij}$ is equal to $$ \frac{\partial X}{\partial x_{ij}} = E_{ij} + E_{ji} - E_{ij}E_{ij} $$ So, for trace of multiplication $X^{-1}$ and $\partial X/\partial x_{ij}$ we have $$ \text {tr}(X^{-1}E_{ij}) + \text {tr}(X^{-1}E_{ji}) - \text {tr}(X^{-1}E_{ij}E_{ij}) = (X^{-1})_{ji}+(X^{-1})_{ij} - (X^{-1})_{ii} $$ and $$ \text {tr}(X^{-1}\partial X/\partial X) = X^{-T} + X^{T} - \text {diag}(X^{-1}) = 2X^{-1} - \text {diag}(X^{-1}) $$ Finally, if $X^{T} = X$, we have that $$ \frac{\det(X)}{\partial X} = \det(X)(2X^{-1} - \text {diag}(X^{-1})) $$

P.S. $E_{ij}$ - zeros matrix with 1 on $ij$ position.

  • $\begingroup$ @ M.Red: How do I verify the expression for $\partial X/\partial x_{ij}$ ? I get $E_{ij} + E_{ji}$ but where does the last term come from ? $\endgroup$ – me10240 Sep 19 '17 at 22:09

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.