Derivative of the determinant with respect to the vector

derivativesdeterminantmatrix-calculusmultivariable-calculusscalar-fields

There is a vector $\boldsymbol{v}=[x, y, z]^T$ and a matrix $\boldsymbol{A}(x,y,z)$.

How is the derivative of a determinant of a matrix with respect to a vector calculated, i.e.:

$\frac{d|\boldsymbol{A}|}{d\boldsymbol{v}}=?$

Here are some calculations from Mathcad Prime. Here $A$ and $M$ are a matrix-function and a matrix of arbitrary numbers, and $v$ is a parameter vector. And $q$ is the function to be differentiated with respect to the vector $v$.

enter image description here

I differentiate the function $q$ with respect to each of the parameters $x,y,z$. I need to find a union operation that "packs" all in the function $f(trace(\cdot),\otimes,\partial_v A)$, I think, it probably includes the Kronecker product, tensor, etc. That's what I need to find if it exists.

EDIT №2:

enter image description here

Best Answer

Jacobi's formula for the derivative of the determinant is usually stated as follows:

Theorem. For a path $t\mapsto A(t)$ of matrices, one has \begin{equation} \partial_t\det A(t)=\mathrm{Tr}\left(\mathrm{adj}(A(t))\,\dot{A}(t)\right). \end{equation}

This Wikipedia page explains where this formula comes from. To use this result for your question, consider your parameter-dependent matrix as a matrix-valued function $A:\mathbb{R}^3\to M_{n\times n}(\mathbb{C})$. The derivative $\partial_{v}A$ is the directional derivative of this function, so for any point $p\in\mathbb{R}^3$ we want to compute \begin{equation} \partial_v\det A(p)=\partial_t\Bigr|_{t=0}\det A(p+t\,v). \end{equation} Let $B(t)=A(p+t\,v)$ and we can apply Jacobi's formula to get \begin{equation} \partial_v\det A(p)=\partial_t\Bigr|_{t=0}\det B(t)=\mathrm{Tr}\left(\mathrm{adj}(B(0))\,\partial_t\Bigr|_{t=0}B(t)\right)=\mathrm{Tr}\left(\mathrm{adj}(A)\,\partial_vA\right)(p). \end{equation}

A more geometric way to think about this: "$\det$" is a function from the set of $n$ by $n$ matrices to the complex (or real) numbers. Jacobi's formula is telling us what the differential of this function is, namely \begin{equation} \begin{split} \mathrm{d}(\mathrm{det})_A:T_AM_{n\times n}(\mathbb{C})&\to\mathbb{C}\\ \dot{A}&\mapsto\mathrm{Tr}\left(\mathrm{adj}(A)\,\dot{A}\right). \end{split} \end{equation} What you want to compute is the differential of $\det$ composed with some function $A:\mathbb{R}^3\to M_{n\times n}(\mathbb{C})$, and the differential of the composition is the composition of the differentials \begin{equation} \mathrm{d}\big((x,y,z)\mapsto\det A(x,y,z)\big)_p(v)=\mathrm{d}(\mathrm{det})_{A(p)}\left(\partial_vA\right)=\mathrm{Tr}\left(\mathrm{adj}(A)\,\partial_vA\right)(p). \end{equation}

For example, assume that $A(x,y,z)$ is the simple matrix-valued function $$A(x,y,z)=\begin{pmatrix} x & 0 & 0 \\ 0 & y & 0\\ 0& 0 & z\end{pmatrix}.$$ Then the determinant is $\det A(x,y,z)= x y z$. Let's fix the vector $v=(a,b,c)$, then the derivative of the determinant is $\partial_v\left(\det A(x,y,z)\right)=ayz+bxz+cxy$. We can check that this agrees with the formula above: since $$\partial_vA(x,y,z)= \begin{pmatrix} a & 0 & \\ 0 & b & 0\\ 0& 0 & c\end{pmatrix}$$ we get \begin{equation} \begin{split}\partial_v&\left(\det A(x,y,z)\right)=\det (A)\,\mathrm{Tr}\left(A^{-1}\partial_vA\right)=\\ &=xyz\,\mathrm{Tr}\left( \begin{pmatrix} x^{-1} & 0 & 0 \\ 0 & y^{-1} & 0\\ 0& 0 & z^{-1}\end{pmatrix}\begin{pmatrix} a & 0 & \\ 0 & b & 0\\ 0& 0 & c\end{pmatrix} \right)=ayz+bxz+cxy. \end{split} \end{equation}