1

For a non-square matrix $X$ of size $n \times p$ ($n>p$) and another non-square matrix $A$ of size $p \times n$, what is the derivative of $\det(X^TA)$ w.r.t. $X$? i.e.,

$\frac{\partial\det(X^TA)}{\partial X}$

It'd be a matrix of size $n \times p$ while I got stuck in some intermediate steps of using chain rules.

Update: I think I got the solution. Thanks to AlexR and Bob.

Reference: The Matrix Cookbook; Section 2.1.2; Equation (45)

$\frac{\partial\det(AXB)}{\partial X} = \det(AXB){(X^{-1})}^T = \det(AXB){(X^T)}^{-1}$

This is, actually, a special case when A and B are non-singular matrices.

The more general form, according to matrix reference manual, is

(URL: http://www.ee.ic.ac.uk/hp/staff/dmb/matrix/calculus.html#deriv_det)

$\frac{\partial\det(A^TXB)}{\partial X} = \frac{\partial\det(B^TX^TA)}{\partial X} = A\operatorname{adj}(A^TXB)^TB^T = A(\det(A^TXB)(A^TXB)^{-1})^TB^T = \det(A^TXB)A(B^TX^TA)^{-1}B^T$

When $B = B^T= I$

$\frac{\partial\det(X^TA)}{\partial X} = A\operatorname{adj}(A^TX)^T = A(\det(A^TX)(A^TX)^{-1})^T = \det(X^TA)A(X^TA)^{-1}$

  • Did you find $\partial_X \det X$ already? If not, you can compute $\partial_X \log \det X$ by using $\det X = \prod_{i=1}^p \lambda_i$ where $X\in\mathbb R^{p\times p}$. Then use the generalisation of the logarithmic derivative trick to obtain what you're looking for. – AlexR May 28 '15 at 22:02
  • @AlexR. Thanks for your suggestions first. However, $\det(X)$ is not meaningful given that $X$ is not a square matrix. – Will Yongxin Yang May 28 '15 at 22:29
  • Note I write $\log \det : \mathbb R^{p\times p} \to \mathbb R$ wich is meaningful. – AlexR May 28 '15 at 22:30
  • Hi AlexR. Sorry I don't really get the idea behind $\log\det$. Can you name a reference? Cheers! – Will Yongxin Yang May 28 '15 at 22:36
  • It's used in Convex Optimisation. The matrix cookbook is a better source if you don't need to prove it. – AlexR May 28 '15 at 22:40
  • Please see my post: https://math.stackexchange.com/questions/3822397/notation-in-gradient-of-the-determinant – Xiangyu Meng Sep 12 '20 at 01:07
  • Please see my post: https://math.stackexchange.com/questions/3822397/notation-in-gradient-of-the-determinant – Xiangyu Meng Sep 12 '20 at 01:08

3 Answers3

1

We know that $\frac{\partial\det(XA)}{\partial X}=\det(XA)(X^T)^{-1} $ (see The Matrix Cookbook, for example). Thus,

$\frac{\partial\det(X^TA)}{\partial X}=\det(XA)(X)^{-1}$.

Bob
  • 438
  • Hi Bob. Thanks for your answer first. I have noticed that a similar form in The Matrix Cookbook but I don't think it's that straightforward as $X^{-1}$ suggests that X is a square matrix. – Will Yongxin Yang May 28 '15 at 22:23
0

Use a colon to denote the trace/Frobenius product, i.e. $$A:B=\operatorname{Tr}(A^TB)$$ Write the function and calculate its differential and gradient. $$\eqalign{ \phi &= \det(X^TA) = \det(A^TX) = \det(M) \\ d\phi &= \phi M^{-T}:dM = \phi(A^TX)^{-T}:A^TdX = \phi A(X^TA)^{-1}:dX \\ \frac{\partial \phi}{\partial X} &= \phi A(X^TA)^{-1} \\ }$$

greg
  • 35,825