I found the following identity:

$$ \frac{\partial( \det (X^T A X ))}{\partial X} = 2\det(X^TAX)AX(X^TAX)^{-1} $$

on the matrix cookbook. It is equation 47 on page 8. Note that $X$ is an $n \times m$ matrix and $A$ is a symmetric $n \times n$ matrix.

I could not find the identity in their cited references. Does anyone know of a textbook or paper that has this identity?

NOTE: I asked this question on Mathoverflow and was advised to repost it here.

  • $\begingroup$ This may help: psi.toronto.edu/matrix/calculus.html, also this one psi.toronto.edu/matrix/calculus.html $\endgroup$ – chaohuang Aug 29 '12 at 16:30
  • $\begingroup$ Thanks, I was looking for a textbook or paper so I can cite it, but I E-mailed Mike Brooks -- the author of the page you recommended -- for a (citable) reference $\endgroup$ – dblazevski Aug 29 '12 at 16:36
  • $\begingroup$ You can also cite online links. $\endgroup$ – chaohuang Aug 29 '12 at 16:38
  • $\begingroup$ True, but I'd prefer to have a more standard reference that has been through a review process, one that may even include a derivation. $\endgroup$ – dblazevski Aug 29 '12 at 16:40
  • 1
    $\begingroup$ I looked in vain for a similar result back in 1997, and ended up writing it up for myself. (But this was for teaching, not research.) My formula can be written as $(d/dt)\ln\det\Phi(t)=\operatorname{tr}(\Phi(t)^{-1}\dot\Phi(t)$, where $\Phi$ is a matrix valued function of a single variable and the dot denotes a derivative. Your result should be derivable from that, with $\Phi=X^TAX$ and $t$ being the various components of $X$ in turn. $\endgroup$ – Harald Hanche-Olsen Aug 29 '12 at 18:24

Of course we must assume $X^T A X$ is invertible for this equation to make sense.

Take $\tilde{X} = X + t Y$. Then $$\eqalign{\tilde{X}^T A \tilde{X} &= X^T A X + t (Y^T A X + X^T A Y) + O(t^2)\cr &= \left(I + t (Y^T A X + X^T A Y)(X^T A X)^{-1}\right) X^T A X + O(t^2)\cr}$$ so $ \det(\tilde{X}^T A \tilde{X}) = \det(I + tM) \det(X^T A X) + O(t^2)$ where $M = (Y^T A X + X^T A Y)(X^T A X)^{-1}$. Now $\det(I+tM) = \det(\exp(tM)) + O(t^2) = \exp(\text{tr}(tM)) + O(t^2) = 1 + t\; \text{tr}(M) + O(t^2)$. We have $$ \eqalign{\text{tr}(M) &= \text{tr}(Y^T A X (X^T A X)^{-1} + X^T A Y (X^T A X)^{-1})\cr &= \text{tr}(Y^T A X (X^T A X)^{-1}) + \text{tr}((X^T A X)^{-1} X^T A Y)\cr &= 2 \text{tr}(Y^T A X (X^T A X)^{-1})}$$ Taking $Y = E_{ij}$, the matrix with $1$ in entry $(i,j)$ and $0$ everywhere else, this says $$ \frac{\partial}{\partial X_{ij}} \det(X^T A X) = 2 \text{tr}(E_{ji} A X (X^TAX)^{-1}) \det(X^T A X) = 2 \det(X^T A X) (A X (X^T A X)^{-1})_{ij} $$ which is the meaning of $$ \frac{\partial}{\partial X} \det(X^T A X) = 2 \det(X^T A X) A X (X^T A X)^{-1} $$

  • $\begingroup$ Thank you very much! I tried using the chain rule (applied to $D_x (det(x)) = det(x) x^{-T}$ and index notation, but was left with headache. $\endgroup$ – dblazevski Aug 29 '12 at 18:30

The requested formula is absolutely incorrect. Let $\phi:X\rightarrow X^TAX=U\rightarrow \det(X^TAX)$. The hypothesis $X^TAX$ invertible is useless. $U'_X:H\rightarrow 2X^TAH$ and $\phi'(X):H\rightarrow tr(adj(U)U'(H))$ (where $adj(U)$ is the classical adjoint of $U$). Finally $\phi'(X)(H)=2tr(adj(X^TAX)X^TAH)$. In particular $\phi'(X)=0$ iff $adj(X^TAX)X^TA=0$.


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.