TITLE: Is there an explicit formula for the hessian of "Determinant"?
QUESTION [29 upvotes]: Let $f: G= \mbox{GL}(n,\mathbb{R}) \to \mathbb{R}$ be the determinant function.
Then $\mbox{Hess} (f)$ is a two linear map on $M_{n}(\mathbb{R})\simeq T_{e}(G)$ where $e$ is the neutral element of $G$, the identity matrix.
What is an explicit formula for this Hessian? (In terms of matrix terminologies)

REPLY [52 votes]: The formula you're looking for can be obtained by differentiating Jacobi's formula
$$ \frac{\mathrm{d}}{\mathrm{d}t} \det A(t) = \det A(t) \cdot \operatorname{tr}\left( A^{-1} \frac{\mathrm{d}A}{\mathrm{d}t} \right) $$
with respect to a second parameter, say $s$:
\begin{multline}
\frac{\partial^2}{\partial s \partial t} \det A(s,t) =
\det A(s,t) \cdot \bigg[
\operatorname{tr}\left( A^{-1} \frac{\partial A}{\partial s} \right) \operatorname{tr}\left( A^{-1} \frac{\partial A}{\partial t} \right) \\
+ \operatorname{tr}\left( A^{-1} \frac{\partial^2 A}{\partial s \partial t} \right)
- \operatorname{tr}\left( A^{-1} \frac{\partial A}{\partial s} A^{-1} \frac{\partial A}{\partial t} \right)
\bigg]
\end{multline}
Now take $s = A_{ij}$ and $t = A_{kl}$, so $\frac{\partial A}{\partial s} = E_{ij}$ is the matrix with a one in its $(i,j)$-entry, and zeros elsewhere. Similarly $\frac{\partial A}{\partial t} = E_{kl}$, and $\frac{\partial^2 A}{\partial s \partial t} = 0$. The desired Hessian is then
\begin{align*}
\operatorname{Hess}(\det)_A(U,V) &= U_{ij} V_{kl} (\det A)\bigg[
\operatorname{tr}\left( A^{-1} E_{ij} \right)
\operatorname{tr}\left( A^{-1} E_{kl} \right) - \operatorname{tr}\left( A^{-1} E_{ij} A^{-1} E_{kl} \right)
\bigg] \\
&= U_{ij} V_{kl} (\det A)\bigg[
(A^{-1})_{mn} (E_{ij})_{nm} (A^{-1})_{pq} (E_{kl})_{qp} \\
&\hspace{4cm} - (A^{-1})_{mn} (E_{ij})_{np} (A^{-1})_{pq} (E_{kl})_{qm}
\bigg] \\
&= U_{ij} V_{kl} (\det A)\bigg[
(A^{-1})_{mn} \delta_{in} \delta_{jm} (A^{-1})_{pq} \delta_{kq} \delta_{lp} \\
&\hspace{4cm} - (A^{-1})_{mn} \delta_{in} \delta_{jp} (A^{-1})_{pq} \delta_{kq} \delta_{lm}
\bigg] \\
&= U_{ij} V_{kl} (\det A)\bigg[
(A^{-1})_{ji} (A^{-1})_{lk} - (A^{-1})_{li} (A^{-1})_{jk}
\bigg] \\
&= \det A \bigg[
U_{ij} (A^{-1})_{ji} V_{kl} (A^{-1})_{lk} - U_{ij} (A^{-1})_{jk} V_{kl} (A^{-1})_{li}
\bigg] \\
&= \det A \bigg[
\operatorname{tr}(U A^{-1}) \operatorname{tr}(V A^{-1}) - \operatorname{tr}(U A^{-1} V A^{-1})
\bigg] \\
\end{align*}
with the Einstein summation convention in full force throughout. By evaluating  this formula at $A = e,$ the $n \times n $ identity matrix, we obtain the desired special case
$$ \operatorname{Hess}(\det)_e(U,V) = \operatorname{tr}(U) \operatorname{tr}(V) - \operatorname{tr}(U V). $$