Derivatives of determinants and trace with respect a scalar parameter

2.7k Views Asked by At

Consider the following two matrices, $A$ and $B.$ The dimension of both $A$ and $B$ are $n\times n,$ and all element of $A$ and $B$ depends on a scalar parameter $\theta .$ Then what is derivatives of $\ln \left\vert A\right\vert $ and $tr\left( AB\right) $ wrt to $\theta ?$ $\frac{\partial \ln \left\vert A\right\vert }{\partial \theta }$ and $\frac{\partial tr\left( AB\right) }{\partial \theta }$? Any reference? Thanks

1

There are 1 best solutions below

0
On

For the first function, we have $$\eqalign{ \lambda &= \log(\det(A)) \cr\cr d\lambda &= d\log(\det(A)) \cr &= d\operatorname{tr}(\log(A)) \cr &= A^{-T}:dA \cr &= A^{-T}:\frac{dA}{d\theta}d\theta \cr\cr \frac{d\lambda}{d\theta} &= A^{-T}:\frac{dA}{d\theta} \cr &= \operatorname{tr}\Big(A^{-1}\frac{dA}{d\theta}\Big) \cr\cr }$$ where colons denote the Frobenius inner product, and the differential of the trace-log is known as Jacobi's Formula.

For the second function, $$\eqalign{ \tau &= \operatorname{tr}(AB) \cr &= A^T:B \cr\cr d\tau &= dA^T:B + A^T:dB \cr &= B^T:dA + A^T:dB \cr &= \Big(B^T:\frac{dA}{d\theta} + A^T:\frac{dB}{d\theta}\Big)\,d\theta \cr\cr \frac{d\tau}{d\theta} &= B^T:\frac{dA}{d\theta} + A^T:\frac{dB}{d\theta} \cr &= \operatorname{tr}\Big(B\frac{dA}{d\theta} + A\frac{dB}{d\theta}\Big) \cr\cr }$$