Second derivative of matrix inverse

52 Views Asked by At

Let $A \colon \mathbb R^d \to \mathbb R^{n\times n}$ be a matrix-valued function of vectorial input, and assume that $A(x)$ is always invertible. I want to compute $$ \partial_{ij}{A^{-1}} = \frac{\partial^2 (A^{-1})}{\partial x_i\partial x_j}. $$ For the first derivative, I apply $$ \partial_i (A^{-1}A)=0, $$ to obtain $$ \partial_iA^{-1}=-A^{-1}(\partial_iA) A^{-1}. $$ Deriving the right-hand side with respect to $x_j$ with the product rule, I obtain $$\tag{1} \partial_{ij}A^{-1}=-(\partial_jA^{-1})(\partial_i A)A^{-1}-A^{1}(\partial_{ij} A)A^{-1}-A^{-1}(\partial_i A)(\partial_jA^{-1}). $$ If instead I start from $$ \partial_{ij}(A^{-1}A)=0, $$ derive first w.r.t. $x_i$ and then with respect to $x_j$, I obtain a different expression: $$\tag{2} \partial_{ij}A^{-1}=-(\partial_jA^{-1})(\partial_i A)A^{-1}-A^{-1}(\partial_{ij} A)A^{-1}-(\partial_i A^{-1})(\partial_j A)A^{-1}. $$ Which is correct between (1) and (2), and why?$

Edit: steps to get to (2)

Differentiating with respect to $x_i$ $$ \partial_j ((\partial_iA^{-1})A + A^{-1}\partial_i A)=0, $$ Differentiating with respect to $x_j$ $$ (\partial_{ij}A^{-1})A+(\partial_iA^{-1})(\partial_jA)+(\partial_jA^{-1})(\partial_iA)+A^{-1}(\partial_{ij}A)=0. $$ Now bringing all terms but the first and multiplying by $A^{-1}$ on the right gives (2).

1

There are 1 best solutions below

0
On BEST ANSWER

(1) and (2) are equivalent. Using twice the formula for the first derivative on the third term on the right-hand side of (2), we have \begin{align} (\partial_i A^{-1})(\partial_j A) A^{-1} &= -A^{-1}(\partial_i A)A^{-1}(\partial_j A) A^{-1} \\ &= -A^{-1}(\partial_i A)(\partial_j A^{-1}), \end{align} which is the third term at the right-hand side of (1). The first and second terms coincide.