I've seen two different results on the derivatives of determinants of matrices:
$$\frac{\partial |X|}{\partial X_{ij}}=X_{ij}.\tag1$$
$$\frac{\partial\det(X)}{\partial X}=|X|(X^{-1})^{T}.\tag2$$
These seem to imply different things. Which is right and why? Can't find it proven anywhere.