# Derivative of log determinant and inverse.

Hi all

I have a matrix $\Sigma$ with element $(i,j)$

$\Sigma_{i,j}= exp(-h_{i,j}\rho)$.

The matrix is positive definite and symmetric (it is a covariance matrix). Now i need to evaluated

$\frac{\partial log(det(\Sigma))}{\partial \rho}$ and $\frac{\partial \Sigma^{-1}}{\partial \rho}$

Someone can help me?

-
orion.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf –  Piyush Grover Apr 10 '13 at 21:33
I have this pdf, but i don't understand how use it to solve my problem. –  niandra Apr 10 '13 at 23:00

In general, for an invertible square matrix $\Sigma=\Sigma(\rho)$, differentiably depending on the real variable $\rho$, we have: $(\Sigma^{-1})'=-\Sigma^{-1} \Sigma' \Sigma^{-1}$, and $\big(\det(\Sigma)\big)'=\operatorname{tr} (\Sigma^{-1} \Sigma')\det(\Sigma)$, so that $\big(\log \det(\Sigma)\big)'=\operatorname{tr} (\Sigma^{-1} \Sigma')$.
Here, $\Sigma'$ is the matrix with entries $-h_{ij}e^{-\rho h_{ij}}$, the Hadamard product of the matrices $-(h_{ij})_{ij}$ and $\Sigma$; and since both $\Sigma^{-1}$ and $\Sigma'$ are symmetric, $\operatorname{tr} (\Sigma^{-1} \Sigma')$ is just their Frobenius scalar product. I do not see other simplifications, unfortunately.
No! it'isn't.It is for work. I have some problem with your answer. Why $\Sigma^{-1}=exp(\rho H)$. For what i know, this is true for a diagonal matrix, but this is not the case. P.S. $H$ is positive definite, symmetric and its diagonal has all value equals to 1 –  niandra Apr 10 '13 at 21:58
Sorry, maybe i didn't understand. Let me use an example. If H is a 2×2 matrix with element (i don't know how to write a matrix so i write its elements) (0, 1 ,1, 0) (before i made a mistake, the diagonal elements are 0 and not 1). If $\rho=2$, $\Sigma$ is (1, 0.1353353, 0.1353353 ,1 ). Using the formula $\Sigma^{-1}=exp(\rho H)$ I obtain (1, 7.389056 ,7.389056 ,1), while using a software to obtain the inversion, i have (1.0186574, -0.1378603, -0.1378603 ,1.0186574). Where is the problem? –  niandra Apr 10 '13 at 22:59
In the original question, $\Sigma\neq \exp(\rho H)$. Here, each entry is exponentiated, while the matrix exponential is defined by inserting a matrix into the power series expansion of the exponential. The problem as stated, Niandra, is a bit harder. I don't have an answer, and doubt there is a clean one. Is it possible you meant/need the matrix exponential instead? –  D. Kelleher Apr 11 '13 at 4:11