# Derivative of a determinant of a matrix field

Let $A(x_1,...,x_n)$ be an $n\times n$ matrix field over $R^n$.

I am interested in the partial derivative determinant of $A$ in respect to $x_i$. In can be shown that:

$\frac{\partial{\det(A)}}{\partial{x_i}} = \det(A)\cdot\sum_{a=1}^{n}{\sum_{b=1}^{n}{ A^{-1}_{a,b} \cdot \frac{ \partial{A_{b,a}} }{ \partial{x_i} }}}$

I was able to prove this using induction and careful, boring calculations, but I was wondering if there was any intuition behind this formula?

-

## 3 Answers

Another proof, using the characteristic polynomial $$\det(A+tI) = t^n+t^{n-1}\text{Tr}(A) + t^{n-2}c_2(A) + \dots+ t c_{n-1}(A) + \det(A)$$ where $c_i(A) = \text{Tr}(\Lambda^i A)$ is the $i$-th characteristic coefficient. Namely, assume that $A$ is invertible. Then $$\det(A+tX) = t^n\det(t^{-1}A+X) = t^n\det(A(A^{-1}X + t^{-1}I)) = t^n\det(A)\det(A^{-1}X+t^{-1}I)$$ $$= t^n \det(A) \Big( t^{-n}+t^{1-n}\text{Tr}(A^{-1}X) + t^{2-n}c_2(A^{-1}X) + \dots+ t^{-1} c_{n-1}(A^{-1}X) + \det(A^{-1}X)\Big)$$ $$= \det(A)\Big(1+t\text{Tr}(A^{-1}X) + O(t^2)\Big)$$ Thus $$d\det(A)X = \partial_t\big|_0 \det(A+tX) = \partial_t\big|_0 \det(A)\Big(1+t\text{Tr}(A^{-1}X) + O(t^2)\Big)$$ $$= \det(A)\text{Tr}(A^{-1}X) = \text{Tr}(\text{Adj}(A)X)$$ Where $\text{Adj}(A)$ is the adjugate of $A$ which satifies Cramer's rule $\text{Adj}(A).A=A.\text{Adj}(A)=\det(A).I$. Since invertible matrices are dense, the formula follows.

This poof can be simplified a little: Prove it for $A=I$ first, and then use that $\det:GL(n)\to (\mathbb R\setminus 0,\cdot)$ is a group homomorphism.

Finally note, that Jacobi's formula
$$\det(e^A) = e^{\text{Tr}(A)}$$ is a consequence, by inserting $tA$ instead of $A$ and differentiating. Both sides are 1-parameter subgroups and satisfy the same ODE with the same initial condition.

EDIT: Misprints corrected; Thanks to Peter Kravchuk for pointing them out.

-
I think there is a typo in the second line of $\det(A+tX)$ –  Peter Kravchuk May 25 '13 at 9:42

your identity follows simply by using $\log({\rm det}\; A)= {\rm tr}\; (\log A)$, so

$$\frac{\partial}{\partial x_i}{\rm det}\;A= \frac{\partial}{\partial x_i} \exp({\rm tr}\;\log A)= ({\rm det}\;A) \frac{\partial}{\partial x_i}{\rm tr}\;\log A= ({\rm det}\;A)\;{\rm tr}\;\left(A^{-1}\frac{\partial}{\partial x_i}A\right)$$

this identity is known as Jacobi's formula.

-
Thanks! Do you have intuition as to why Jacboi's formula is correct? –  R S May 24 '13 at 19:27
@R S, in the matrix is invertible, then a slight additive change in $A$ can be represented as a multiplication by a matrix close to unity: $A+\delta A=A(I+A^{-1}\delta A)$. Due to the properties of the determinant, in order to evaluate the corresponding variation of $\det$, you only have to be able to compute determinants of things like $I+\epsilon$. It can be shown that $\det(I+\epsilon)=1+\mathrm{tr}\epsilon+O(\epsilon^2)$, and I think that's the reason. Or a reason.. –  Peter Kravchuk May 24 '13 at 19:59
@R S: "intuition" ? at least in the way my mind works, this one line proof is as "intuitive" as it gets... –  Carlo Beenakker May 24 '13 at 20:12
Nice proof. But this proof premises on $A$ being invertible. Can you adjust it so that it includes the case of noninvertible $A$? –  Hans Jul 25 '14 at 19:17

Suppose that you have an $n$-dimensional vector space $V$, equipped with a standard volume n-form $(x_1,\dots,x_n)$. Let $\{b_1,\dots,b_n\}$ be a standard basis such that $(b_1,\dots,b_n)=1$.

For a linear operator $A:V\to V$ we have: $$(x_1,\dots,x_n)\mathrm{tr}A=\sum_{i=1}^n(x_1,\dots,Ax_i,\dots,x_n).$$ You can check that it agrees with the standard $\mathrm{tr}A=\sum_iA_{ii}$ by setting $x=b$ and expanding $Ab_i$ in the basis.

Also, we have $$(x_1,\dots,x_n)\mathrm{det}A=(Ax_1,\dots,Ax_n),$$ can be easily compared with your favorite definition of $\det$.

Now, consider an $(n-1)$-form $\omega$. There exists a unique vector $x_\omega$ s.t. $$\omega(x_1,\dots,x_{n-1})=(x_\omega,x_1,\dots,x_{n-1}).$$ Fix some $x_0$ and let $\omega$ be $$\omega(x_1,\dots,x_{n-1})=(x_0,Ax_1,\dots,Ax_{n-1}),$$ which defines some $x_\omega$ $$(x_\omega,x_1,\dots,x_{n-1})=(x_0,Ax_1,\dots,Ax_{n-1}).$$ This procedure defines a linear map $A^{*}:V\to V$ by $x_0\mapsto x_\omega$. Let me write this as $$(A^*x_1,x_1,\dots,x_n)=(x_1,Ax_2,\dots,Ax_n),$$ now if you let $x_1=Ax_0$ you immediately obtain $AA^* =I\det A$, so by continiuty $A^*$ coincides with your favourite definition of the adjugate $\mathrm{adj}A$.

All that said, here is a nice proof of the Jacobi's formula:

For any set of $x_1,\dots,x_n$, \begin{align} \frac{\partial}{\partial\alpha}(Ax_1,\dots,Ax_n)=&\sum_{i=1}^n(Ax_1,\dots,\frac{\partial A}{\partial\alpha}x_i,\dots,Ax_n)=\\\\ \sum_{i=1}^n(x_1,\dots,A^*\frac{\partial A}{\partial\alpha}x_i,\dots,x_n)=&\mathrm{tr}\left(A^*\frac{\partial A}{\partial\alpha}\right)(x_1,\dots,x_n). \end{align} Now we only have to recall the above definition of $\det$, and immediately obtain $$\frac{\partial}{\partial\alpha}\det A=\mathrm{tr}\left(A^* \frac{\partial A}{\partial\alpha}\right).$$

Of course, for an invertible $A$ we have $A^* = A^{-1}\det A$.

-