1

How to get the first derivative of $f(X) = \log \det (XX^TA^{-1})$ with respect to $X$?

Where $X \in R^{n \times r}$, $A \in R^{n \times n}$, $A^{-1}$ is the inverse of $A$

jason
  • 829

1 Answers1

4

Presumably $X$ has full row rank and $\det(A)>0$, otherwise $\det(XX^TA^{-1})\le0$ and its real logarithm does not exist. Perturb $X$ by a small $dX$, then the first-order change in the log determinant is given by \begin{align} d\log\det(XX^TA^{-1}) &=d\left(\log\det(XX^T)-\log\det(A)\right)\\ &=d\log\det(XX^T)\\ &=\operatorname{tr}\left((XX^T)^{-1}\,d(XX^T)\right)\ \text{ (Jacobi's formula)}\\ &=\operatorname{tr}\left((XX^T)^{-1}[(dX)X^T+X(dX)^T]\right)\\ &=2\operatorname{tr}\left((XX^T)^{-1}X(dX)^T\right)\ \text{ (tracial property)}. \end{align} Therefore $$ \frac{d\log\det(XX^TA^{-1})}{dX} :=\left(\frac{\partial\log\det(XX^TA^{-1})}{\partial x_{ij}}\right)_{i,j\in\{1,\ldots,n\}} =2(XX^T)^{-1}X=2(X^+)^T, $$ where $X^+$ denotes the Moore-Penrose pseudo inverse of $X$.

user1551
  • 139,064
  • So the solution doesn't contain the matrix $A$ ? I find a relative topic in https://math.stackexchange.com/questions/1953518/gradient-of-log-detax?rq=1. It has two answer: $(X^TA^T)^{-1}X^T$ and $A^{-T}$. Are their equalivent? – jason Mar 30 '18 at 14:17
  • @jason $\log\det A^{-1}$ is a constant. Its derivative is zero. As for the other question you mentioned, the two answers are the same because the $X$ in that question is nonsingular. – user1551 Mar 30 '18 at 14:22