Jacobi's Formula
Formula
Let $A = A(t)$ be a differentiable matrix function. The derivative of the determinant $\det A(t)$ is given by:
$$ \dfrac{\mathrm{d}}{\mathrm{d} t} \det A(t) = \Tr \Big( (\operatorname{adj}A(t)) \dfrac{\mathrm{d}A(t)}{\mathrm{d}t} \Big) = \det A(t) \cdot \Tr\left( A^{-1}(t) \dfrac{\mathrm{d}A(t)}{\mathrm{d}t} \right) $$
This is known as Jacobi’s formula. In the form of a total differential, it can be written as follows. The second equality holds when $A$ is an invertible matrix.
$$ \mathrm{d}(\det A) = \Tr \Big( (\operatorname{adj}A) \mathrm{d}A \Big) = \det A \cdot \Tr(A^{-1} \mathrm{d}A) $$
Here, $\operatorname{adj}$ denotes the adjugate matrix, $\Tr$ represents the trace, and $\mathrm{d}A$ refers to the matrix differential.
Proof
For simplicity, denote $A = A(t)$, and let $A = [A_{ij}]$. The Laplace expansion of a matrix is as follows:
$$ \det A = \sum\limits_{j} A_{ij} [\operatorname{adj}A]_{ji} \qquad \text{for fixed }i $$
Consider the determinant as a multivariable function $\det(A) = F(A_{11}, A_{12}, \dots, A_{nn})$ with $n^{2}$ variables, then its total differential is:
$$ \mathrm{d} (\det A) = \sum_{i,j} \dfrac{\partial F}{\partial A_{ij}}\mathrm{d}A_{ij} $$
Upon calculating the partial derivatives, we find:
$$ \begin{align*} \dfrac{\partial F}{\partial A_{ij}} &= \dfrac{\partial }{\partial A_{ij}}\left( \sum\limits_{k} A_{ik} [\operatorname{adj}A]_{ki}\right) \\ &= \sum\limits_{k} \left( \dfrac{\partial A_{ik}}{\partial A_{ij}} [\operatorname{adj}A]_{ki} + A_{ik}\dfrac{\partial }{\partial A_{ij}}[\operatorname{adj}A]_{ki} \right) \\ &= \sum\limits_{k} \dfrac{\partial A_{ik}}{\partial A_{ij}} [\operatorname{adj}A]_{ki} + \sum\limits_{k}A_{ik}\dfrac{\partial }{\partial A_{ij}}[\operatorname{adj}A]_{ki} \\ &= [\operatorname{adj}A]_{ji} + \sum\limits_{k}A_{ik}\dfrac{\partial }{\partial A_{ij}}[\operatorname{adj}A]_{ki} \\ \end{align*} $$
However, considering the definition of the cofactor, for all $k$, $[\operatorname{adj}A]_{ki}$ does not include $A_{ij}$, hence the partial derivative with respect to $A_{ij}$ is $0$.
$$ \dfrac{\partial F}{\partial A_{ij}} = [\operatorname{adj}A]_{ji} \tag{1} $$
Thus, we obtain:
$$ \begin{align*} \mathrm{d}(\det A) &= \sum\limits_{i,j} [\operatorname{adj}A]_{ji} \mathrm{d}A_{ij} \\ &= \sum\limits_{i} \sum\limits_{j} [\operatorname{adj}A]_{ji} \mathrm{d}A_{ij} \\ &= \sum\limits_{j} [(\operatorname{adj}A) \mathrm{d}A]_{jj} \\ &= \Tr \Big( (\operatorname{adj}A) \mathrm{d}A \Big) \end{align*} $$
The third equality holds due to the matrix product representation, and the fourth equality is due to the definition of the trace. $\mathrm{d}A$ is the matrix differential.
Meanwhile, if $A$ is an invertible matrix, then $\operatorname{adj}A = (\det A) A^{-1}$, and $\Tr(kA) = k\Tr(A)$, giving us:
$$ \mathrm{d}(\det A) = \Tr \Big( (\operatorname{adj}A) \mathrm{d}A \Big) = \Tr \Big( (\det A) A^{-1} \mathrm{d}A \Big) = \det A \Tr \Big( A^{-1} \mathrm{d}A \Big) $$
On the other hand, $\dfrac{\mathrm{d} (\det A)}{\mathrm{d}t}$, by the chain rule, is given by:
$$ \dfrac{\mathrm{d} (\det A)}{\mathrm{d}t} = \dfrac{\mathrm{d} (\det A)}{\mathrm{d}A} \cdot \dfrac{\mathrm{d}A}{\mathrm{d}t} $$
According to $(1)$, it is $\dfrac{\mathrm{d} (\det A)}{\mathrm{d}A} = (\operatorname{adj}A)^{\mathsf{T}}$ and $AB = \Tr(A ^{\mathsf{T}}B)$, thus:
$$ \dfrac{\mathrm{d} (\det A)}{\mathrm{d}t} = (\operatorname{adj}A)^{\mathsf{T}} \dfrac{\mathrm{d}A}{\mathrm{d}t} = \Tr \left( (\operatorname{adj}A) \dfrac{\mathrm{d}A}{\mathrm{d}t} \right) = \det A \cdot \Tr \left( A^{-1} \dfrac{\mathrm{d}A}{\mathrm{d}t} \right) $$
■