Jacobi's formula
In matrix calculus, Jacobi's formula expresses the derivative of the determinant of a matrix A in terms of the adjugate of A and the derivative of A.[1]
If A is a differentiable map from the real numbers to n × n matrices, then
- [math]\displaystyle{ \frac{d}{dt} \det A(t) = \operatorname{tr} \left (\operatorname{adj}(A(t)) \, \frac{dA(t)}{dt}\right ) = \left(\det A(t) \right) \cdot \operatorname{tr} \left (A(t)^{-1} \cdot \, \frac{dA(t)}{dt}\right ) }[/math]
where tr(X) is the trace of the matrix X. (The latter equality only holds if A(t) is invertible.)
As a special case,
- [math]\displaystyle{ {\partial \det(A) \over \partial A_{ij}} = \operatorname{adj}(A)_{ji}. }[/math]
Equivalently, if dA stands for the differential of A, the general formula is
- [math]\displaystyle{ d \det (A) = \operatorname{tr} (\operatorname{adj}(A) \, dA). }[/math]
The formula is named after the mathematician Carl Gustav Jacob Jacobi.
Derivation
Via Matrix Computation
We first prove a preliminary lemma:
Lemma. Let A and B be a pair of square matrices of the same dimension n. Then
- [math]\displaystyle{ \sum_i \sum_j A_{ij} B_{ij} = \operatorname{tr} (A^{\rm T} B). }[/math]
Proof. The product AB of the pair of matrices has components
- [math]\displaystyle{ (AB)_{jk} = \sum_i A_{ji} B_{ik}. }[/math]
Replacing the matrix A by its transpose AT is equivalent to permuting the indices of its components:
- [math]\displaystyle{ (A^{\rm T} B)_{jk} = \sum_i A_{ij} B_{ik}. }[/math]
The result follows by taking the trace of both sides:
- [math]\displaystyle{ \operatorname{tr} (A^{\rm T} B) = \sum_j (A^{\rm T} B)_{jj} = \sum_j \sum_i A_{ij} B_{ij} = \sum_i \sum_j A_{ij} B_{ij}.\ \square }[/math]
Theorem. (Jacobi's formula) For any differentiable map A from the real numbers to n × n matrices,
- [math]\displaystyle{ d \det (A) = \operatorname{tr} (\operatorname{adj}(A) \, dA). }[/math]
Proof. Laplace's formula for the determinant of a matrix A can be stated as
- [math]\displaystyle{ \det(A) = \sum_j A_{ij} \operatorname{adj}^{\rm T} (A)_{ij}. }[/math]
Notice that the summation is performed over some arbitrary row i of the matrix.
The determinant of A can be considered to be a function of the elements of A:
- [math]\displaystyle{ \det(A) = F\,(A_{11}, A_{12}, \ldots , A_{21}, A_{22}, \ldots , A_{nn}) }[/math]
so that, by the chain rule, its differential is
- [math]\displaystyle{ d \det(A) = \sum_i \sum_j {\partial F \over \partial A_{ij}} \,dA_{ij}. }[/math]
This summation is performed over all n×n elements of the matrix.
To find ∂F/∂Aij consider that on the right hand side of Laplace's formula, the index i can be chosen at will. (In order to optimize calculations: Any other choice would eventually yield the same result, but it could be much harder). In particular, it can be chosen to match the first index of ∂ / ∂Aij:
- [math]\displaystyle{ {\partial \det(A) \over \partial A_{ij}} = {\partial \sum_k A_{ik} \operatorname{adj}^{\rm T}(A)_{ik} \over \partial A_{ij}} = \sum_k {\partial (A_{ik} \operatorname{adj}^{\rm T}(A)_{ik}) \over \partial A_{ij}} }[/math]
Thus, by the product rule,
- [math]\displaystyle{ {\partial \det(A) \over \partial A_{ij}} = \sum_k {\partial A_{ik} \over \partial A_{ij}} \operatorname{adj}^{\rm T}(A)_{ik} + \sum_k A_{ik} {\partial \operatorname{adj}^{\rm T}(A)_{ik} \over \partial A_{ij}}. }[/math]
Now, if an element of a matrix Aij and a cofactor adjT(A)ik of element Aik lie on the same row (or column), then the cofactor will not be a function of Aij, because the cofactor of Aik is expressed in terms of elements not in its own row (nor column). Thus,
- [math]\displaystyle{ {\partial \operatorname{adj}^{\rm T}(A)_{ik} \over \partial A_{ij}} = 0, }[/math]
so
- [math]\displaystyle{ {\partial \det(A) \over \partial A_{ij}} = \sum_k \operatorname{adj}^{\rm T}(A)_{ik} {\partial A_{ik} \over \partial A_{ij}}. }[/math]
All the elements of A are independent of each other, i.e.
- [math]\displaystyle{ {\partial A_{ik} \over \partial A_{ij}} = \delta_{jk}, }[/math]
where δ is the Kronecker delta, so
- [math]\displaystyle{ {\partial \det(A) \over \partial A_{ij}} = \sum_k \operatorname{adj}^{\rm T}(A)_{ik} \delta_{jk} = \operatorname{adj}^{\rm T}(A)_{ij}. }[/math]
Therefore,
- [math]\displaystyle{ d(\det(A)) = \sum_i \sum_j \operatorname{adj}^{\rm T}(A)_{ij} \,d A_{ij}, }[/math]
and applying the Lemma yields
- [math]\displaystyle{ d(\det(A)) = \operatorname{tr}(\operatorname{adj}(A) \,dA).\ \square }[/math]
Via Chain Rule
Lemma 1. [math]\displaystyle{ \det'(I)=\mathrm{tr} }[/math], where [math]\displaystyle{ \det' }[/math] is the differential of [math]\displaystyle{ \det }[/math].
This equation means that the differential of [math]\displaystyle{ \det }[/math], evaluated at the identity matrix, is equal to the trace. The differential [math]\displaystyle{ \det'(I) }[/math] is a linear operator that maps an n × n matrix to a real number.
Proof. Using the definition of a directional derivative together with one of its basic properties for differentiable functions, we have
- [math]\displaystyle{ \det'(I)(T)=\nabla_T \det(I)=\lim_{\varepsilon\to0}\frac{\det(I+\varepsilon T)-\det I}{\varepsilon} }[/math]
[math]\displaystyle{ \det(I+\varepsilon T) }[/math] is a polynomial in [math]\displaystyle{ \varepsilon }[/math] of order n. It is closely related to the characteristic polynomial of [math]\displaystyle{ T }[/math]. The constant term ([math]\displaystyle{ \varepsilon = 0 }[/math]) is 1, while the linear term in [math]\displaystyle{ \varepsilon }[/math] is [math]\displaystyle{ \mathrm{tr}\ T }[/math].
Lemma 2. For an invertible matrix A, we have: [math]\displaystyle{ \det'(A)(T)=\det A \; \mathrm{tr}(A^{-1}T) }[/math].
Proof. Consider the following function of X:
- [math]\displaystyle{ \det X = \det (A A^{-1} X) = \det (A) \ \det(A^{-1} X) }[/math]
We calculate the differential of [math]\displaystyle{ \det X }[/math] and evaluate it at [math]\displaystyle{ X = A }[/math] using Lemma 1, the equation above, and the chain rule:
- [math]\displaystyle{ \det'(A)(T) = \det A \ \det'(I) (A^{-1} T) = \det A \ \mathrm{tr}(A^{-1} T) }[/math]
Theorem. (Jacobi's formula) [math]\displaystyle{ \frac{d}{dt} \det A = \mathrm{tr}\left(\mathrm{adj}\ A\frac{dA}{dt}\right) }[/math]
Proof. If [math]\displaystyle{ A }[/math] is invertible, by Lemma 2, with [math]\displaystyle{ T = dA/dt }[/math]
- [math]\displaystyle{ \frac{d}{dt} \det A = \det A \; \mathrm{tr} \left(A^{-1} \frac{dA}{dt}\right) = \mathrm{tr} \left( \mathrm{adj}\ A \; \frac{dA}{dt} \right) }[/math]
using the equation relating the adjugate of [math]\displaystyle{ A }[/math] to [math]\displaystyle{ A^{-1} }[/math]. Now, the formula holds for all matrices, since the set of invertible linear matrices is dense in the space of matrices.
Via Diagonalization
Both sides of the Jacobi formula are polynomials in the matrix coefficients of A and A'. It is therefore sufficient to verify the polynomial identity on the dense subset where the eigenvalues of A are distinct and nonzero.
If A factors differentiably as [math]\displaystyle{ A=BC }[/math], then
- [math]\displaystyle{ \mathrm{tr}(A^{-1}A')= \mathrm{tr}((BC)^{-1}(BC)')= \mathrm{tr}(B^{-1}B')+ \mathrm{tr}(C^{-1}C'). }[/math]
In particular, if L is invertible, then [math]\displaystyle{ I=L^{-1}L }[/math] and
- [math]\displaystyle{ 0=\mathrm{tr}(I^{-1}I')= \mathrm{tr}(L(L^{-1})')+ \mathrm{tr}(L^{-1}L'). }[/math]
Since A has distinct eigenvalues, there exists a differentiable complex invertible matrix L such that [math]\displaystyle{ A = L^{-1}DL }[/math] and D is diagonal. Then
- [math]\displaystyle{ \mathrm{tr}(A^{-1}A')= \mathrm{tr}(L(L^{-1})')+ \mathrm{tr}(D^{-1}D')+ \mathrm{tr}(L^{-1}L')= \mathrm{tr}(D^{-1}D'). }[/math]
Let [math]\displaystyle{ \lambda_i }[/math], [math]\displaystyle{ i=1,\ldots,n }[/math] be the eigenvalues of A. Then
- [math]\displaystyle{ \frac{\det(A)'}{\det(A)} = \sum_{i=1}^n \lambda_i'/\lambda_i = \mathrm{tr}(D^{-1}D')= \mathrm{tr}(A^{-1}A'), }[/math]
which is the Jacobi formula for matrices A with distinct nonzero eigenvalues.
Corollary
The following is a useful relation connecting the trace to the determinant of the associated matrix exponential:
[math]\displaystyle{ \det e^{B} = e^{\operatorname{tr} \left(B\right)} }[/math]
This statement is clear for diagonal matrices, and a proof of the general claim follows.
For any invertible matrix [math]\displaystyle{ A(t) }[/math], in the previous section "Via Chain Rule", we showed that
- [math]\displaystyle{ \frac{d}{dt} \det A(t) = \det A(t) \; \operatorname{tr} \left(A(t)^{-1} \, \frac{d}{dt} A(t)\right) }[/math]
Considering [math]\displaystyle{ A(t) = \exp(tB) }[/math] in this equation yields:
- [math]\displaystyle{ \frac{d}{dt} \det e^{tB} =\operatorname{tr}(B) \det e^{tB} }[/math]
The desired result follows as the solution to this ordinary differential equation.
Applications
Several forms of the formula underlie the Faddeev–LeVerrier algorithm for computing the characteristic polynomial, and explicit applications of the Cayley–Hamilton theorem. For example, starting from the following equation, which was proved above:
- [math]\displaystyle{ \frac{d}{dt} \det A(t) = \det A(t) \ \operatorname{tr} \left(A(t)^{-1} \, \frac{d}{dt} A(t)\right) }[/math]
and using [math]\displaystyle{ A(t) = t I - B }[/math], we get:
- [math]\displaystyle{ \frac{d}{dt} \det (tI-B) = \det (tI-B) \operatorname{tr}[(tI-B)^{-1}] = \operatorname{tr}[\operatorname{adj} (tI-B)] }[/math]
where adj denotes the adjugate matrix.
Remarks
- ↑ (Magnus Neudecker), Part Three, Section 8.3
References
- Magnus, Jan R.; Neudecker, Heinz (1999). Matrix Differential Calculus with Applications in Statistics and Econometrics (Revised ed.). Wiley. ISBN 0-471-98633-X. https://books.google.com/books?id=0CXXdKKiIpQC.
- Bellman, Richard (1997). Introduction to Matrix Analysis. SIAM. ISBN 0-89871-399-4. https://books.google.com/books?id=QVCflvTPYE8C.
Original source: https://en.wikipedia.org/wiki/Jacobi's formula.
Read more |