3

Can someone tell me the derivative of the following determinant ($\Psi\in\mathbb{R}^{p\times p}$, $Z\in\mathbb{R}^{p\times q}$, $\alpha\in\mathbb{R}^q$)

  1. $\frac{\partial}{\partial \Psi} \log|\Psi+(Z\alpha)(Z\alpha)^T|=?$
  2. $\frac{\partial}{\partial \alpha} \log|\Psi+(Z\alpha)(Z\alpha)^T|=?$

$\Psi$ is a symmetric positive definite matrix. Thank you very much!

  • Welcome to Stackexchange. You'll find that simple "Here's the statement of my exercise, solve it for me" posts will be poorly received. What is better is for you to add context: What you understand about the problem, what you've tried so far, etc. Something to both show you are part of the learning experience and to help us guide you to the appropriate help. You can consult "How to ask a good question?" for further guidance. – Matthew Leingang Aug 21 '15 at 13:19
  • Thanks! I´m trying to find the derivative of a special likelihood function and these two points are part of it. The derivative $\frac{\partial}{\partial \Psi}\log|\Psi|$ is $(\Psi^{-1})^T$. You can look it up for example in "The Matrix Cookbook". But what to do here? How do i apply a chain rule here? Thank you very much for any hint! – math1982 Aug 21 '15 at 13:46
  • relevant? Prove $\frac{\partial \rm{ln}|X|}{\partial X} = 2X^{-1} - \rm{diag}(X^{-1})$.. Here I say 'We first note that for the case where the elements of X are independent, a constructive proof involving cofactor expansion and adjoint matrices can be made to show that $\frac{\partial ln|X|}{\partial X} = X^{-T}$ (Harville). This is not always equal to $2X^{-1}-diag(X^{-1})$. The fact alone that X is positive definite is sufficient to conclude that X is symmetric and thus its elements are not independent.' – BCLC Apr 16 '21 at 10:01

1 Answers1

1

It's been quite a while since this question was posted so there may not be much use with this answer. However, I stumbled upon needing to perform a very similar derivative myself recently so figured I'd post it here to help in the future.

The first question is to evaluate the following:

$$% {{\partial }\over{\partial \Psi}} \log \left| {\bf F}\left( \Psi \right)\right| % $$

where ${\bf F}\left( \Psi \right)$ is some matrix function of the matrix variable $\Psi$. For your example ${\bf F }\left(\Psi\right) = \Psi + (Za)(Za)^{T}$. As mentioned in the comments the chain rule is the correct way to proceed. Namely, the fact that

$$% {{\partial }\over{\partial \Psi}} \log \left| {\bf F}\left( \Psi \right)\right| = \left| {\bf F}\left( \Psi \right)\right|^{-1} {{\partial \left| {\bf F}\left( \Psi \right)\right|}\over{\partial \Psi}} % $$

From this stage, the determinant needs to be calculated. A few of the books I've seen performing this derivative seem to skip the general formulation of how to form this derivative explicitly for a matrix function argument. It is

$$% {{\partial \left| {\bf F}\left( \Psi \right)\right|}\over{\partial \Psi}} = \left| {\bf F}\left( \Psi \right)\right| \mbox{tr} \left( {\bf F}\left(\Psi\right) ^{-1} {{\partial {\bf F}\left( \Psi \right)}\over{\partial \Psi}}\right) % $$

Therefore executing this identity for your problem (and noting the symmetry of the $\Psi$ variable) gives

\begin{align}% {{\partial }\over{\partial \Psi}} \log \left| {\bf F}\left( \Psi \right)\right| &= {\bf F}\left(\Psi\right) ^{-1} + {\bf F}\left(\Psi\right) ^{-1^{T}} - \mbox{diag}\left({\bf F}\left(\Psi\right) ^{-1}\right) \\ &= 2{\bf F}\left(\Psi\right) ^{-1} - \mbox{diag}\left({\bf F}\left(\Psi\right) ^{-1}\right) % \end{align}

The second example follows from this with the exact same machinery. Noting that the derivative of a trace with respect to a scalar will still give a scalar.

p32fr4
  • 119
  • 1
    relevant? Prove $\frac{\partial \rm{ln}|X|}{\partial X} = 2X^{-1} - \rm{diag}(X^{-1})$.. Here I say 'We first note that for the case where the elements of X are independent, a constructive proof involving cofactor expansion and adjoint matrices can be made to show that $\frac{\partial ln|X|}{\partial X} = X^{-T}$ (Harville). This is not always equal to $2X^{-1}-diag(X^{-1})$. The fact alone that X is positive definite is sufficient to conclude that X is symmetric and thus its elements are not independent.' – BCLC Apr 16 '21 at 10:01