# Show that if $A(t) \in \mathbb{R ^{n×n}}$ is a differentiable function of $t$ then $\frac{d(det A(t))}{dt}$ [duplicate]

This question already has an answer here:

Let $\mathbb{R^{ n×n}}$ be the space of n × n real matrices. Show that if $A(t) \in \mathbb{R ^{n×n}}$ is a differentiable function of $t$ then $\frac{d(det A(t))}{dt}$ is the sum of the determinants of $n$ matrices, in which the $i$th matrix is $A(t)$ except that the $i$th row is differentiated. Use this result to prove that the directional derivative of the determinant function at the matrix $A \in \mathbb{R ^{n×n}}$ along the direction $B \in \mathbb{R^{ n×n}}$ is given by $$(det)^{'} (A; B) = tr(Adj(A)B) = \langle Adj(A)^{T} , B \rangle$$ where $Adj(A)$ is the adjoint of $A$, and where the inner product on $\mathbb{R^{n×n}}$ is the trace inner product given by $\langle X, Y \rangle = tr(X^{T} Y )$ Conclude that $$D(det)(A) = Adj(A) ^T$$.

## marked as duplicate by Davide Giraudo, user1551, loup blanc, draks ..., kjetil b halvorsenDec 17 '15 at 19:15

• multi-posted question. Use the search button. – loup blanc Dec 17 '15 at 18:03
• @loupblanc the duplicate doesn't seem to match up. One is how to derive the determinant and the other is asking why a textbook gives two conflicting definitions. A better fit surely exists? – The Great Duck Dec 4 '18 at 2:25
• @The Great Duck , yes the given reference (R) is not the best one; in particular, in (R), it would have been better to write "for every $k$, $M_{i,k}$ does not depend on $X_{i,j}$". Anyway, a standard reference for the Jacobi's formula is en.wikipedia.org/wiki/Jacobi%27s_formula – loup blanc Dec 4 '18 at 10:59

(After writing the answer, I noticed that the question mentioned rows rather than columns. Since $\det A = \det A^T$ , it doesn't matter which we choose, so I will avoid the rewrite!)

Since $\det A$ is a polynomial in the entries of $A$ it is clear that $\det$ is smooth, so we can compute the derivative by any means.

Let $[A]_{\bullet j}$ denote the $j$th column of $A$. We can write $\det$ as a multilinear function of the columns $[A]_{\bullet 1},...,[A]_{\bullet n}$, that is, we have $\det A = M([A]_{\bullet 1},...,[A]_{\bullet n})$ for some multilinear $M$, (with $(x_1,...,x_n) \mapsto M(x_1,...,x_n)$).

Since $M(x_1+h,...,x_n) = M(x_1,...,x_n) + M(h,...,x_n)$, we see that ${\partial M(x_1,...,x_n) \over \partial x_1}(h) = M(h,x_2,...,x_n)$, and similarly for the other columns.

Now let $\phi(t) = \det A(t) = M([A]_{\bullet 1}(t),...,[A]_{\bullet n}(t))$, then using the chain rule, we have \begin{eqnarray} {d \phi(t) \over dt} &=& \sum_{k=1}^n {\partial M([A]_{\bullet 1}(t),...,[A]_{\bullet n}(t)) \over \partial x_k}( {d [A]_{\bullet k}(t) \over dt} )\\ &=& \sum_{k=1}^n M([A]_{\bullet 1}(t),...,{d [A]_{\bullet k}(t) \over dt},...,[A]_{\bullet n}(t)) \end{eqnarray} Notice that $M([A]_{\bullet 1}(t),...,{d [A]_{\bullet k}(t) \over dt},...,[A]_{\bullet n}(t))$ is the determinant of $A$ with the $k$th column replaced by ${d [A]_{\bullet k}(t) \over dt}$.

Consider the determinant of the matrix $A$ with the $k$th column replaced by the $b$. Note that $M([A]_{\bullet 1},...,b,...,[A]_{\bullet n}) = \sum_{i=1}^n [b]_i M([A]_{\bullet 1},...,e_i,...,[A]_{\bullet n})$, where $e_i$ is the $i$th unit vector. We have $M([A]_{\bullet 1},...,e_i,...,[A]_{\bullet n}) = (-1)^{i+k}\det A_{ik}$, where $A_{ik}$ is the $(i,k)$ minor of $A$, and so $M([A]_{\bullet 1},...,b,...,[A]_{\bullet n}) = \sum_{i=1}^n [b]_i (-1)^{(k+i)} \det A_{ik} = \sum_{k=1}^n [b]_i [\operatorname{adj} A]_{ki}$.

If $A(t) = A+tB$, then ${d [A]_{\bullet k}(t) \over dt} = [B]_{\bullet k}$, and we have \begin{eqnarray} {d \phi(t) \over dt} &=& \sum_{k=1}^n M([A]_{\bullet 1},...,[B]_{\bullet k},...,[A]_{\bullet n}) \\ &=& \sum_{k=1}^n \sum_{k=1}^n [B]_{ik} [\operatorname{adj} A]_{ki} \\ &=& \langle (\operatorname{adj} A)^T, B \rangle \\ &=& \operatorname{tr} ( (\operatorname{adj} A) B) \end{eqnarray} The last part of the question is a little ambiguous, as $D \det(A)$is a map $D \det(A): \mathbb{R}^{n \times n} \to \mathbb{R}^{n \times n}$ which doesn't have a convenient 'matrix' representation (that is, we cannot write the derivative in the form $h \mapsto Ah$ for some matrix $A$).

The above shows that $d \det (A,B) = \langle (\operatorname{adj} A)^T, B \rangle$, where $d$ is the directional derivative. If we let $\eta(t)=A+tB$, we have $d \det (A,B) = D (\det \circ \eta)(0) = D \det (A)(B) = \langle (\operatorname{adj} A)^T, B \rangle$. If we choose $B=E_{ij}$ (the matrix of zeros except for a one in the $i,j$ position), then we see that $D \det (A)(E_{ij}) = [(\operatorname{adj} A)^T]_{ij}$. Presumably this is the desired conclusion.

Alternative: Here is a simpler derivation. As above, we note that $\det$ is smooth, so we only need to compute the derivative, not show that it exists. As above, we note that $D \det(A)(B) = d \det(A,B)$.

Suppose $A$ is invertible. Then $\det(A+tB) = \det A \det (I+ tA^{-1} B)$, so we have $d \det(A,B) = D \det(A)(B) = (\det A) D \det(I)(A^{-1} B)$.

To compute $D \det(I)(H)$, note that $D \det(I)(E_{ij}) = \delta_{ij}$ (where $\delta$ is the Kronecker delta), and so $D \det(I)(H) = \sum_i\sum_j [H]_{ij} D \det(I)(E_{ij}) = \sum_k [H]_{kk} = \operatorname{tr} H$.

Hence, if $A$ is invertible, $D \det(A)(B) = (\det A) \operatorname{tr} (A^{-1} B) = \operatorname{tr} ((\det A)A^{-1} B)= \operatorname{tr} ((\operatorname{adj}A) B)$. If $A$ is not invertible, then let $A_n \to A$ where $A_n$ are invertible, then since $\operatorname{tr},\operatorname{adj}$ are continuous, we see that $D \det(A)(B) = \lim_n D \det(A_n)(B) = \lim_n \operatorname{tr} ((\operatorname{adj}A_n) B) = \operatorname{tr} ((\operatorname{adj}A) B)$.