Derivative of a determinant with respect to a matrix

851 Views Asked by At

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!

1

There are 1 best solutions below

1
On

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.