# derivative of a determinant of a matrix with respect to an element that appears many times in the matrix

I've been trying to find material on matrix calculus but it seems hard to find ones with understandable proofs.

I'm doing research work and I am trying to verify some computation. Suppose that I have a matrix $A= \left( \begin{array}{ccc} \beta_{11} + c\beta_{12} +\beta_{13} & -c\beta_{12} & -\beta_{13} \\ -c\beta_{12} & c\beta_{12}+\beta_{22}+\beta_{23} & -\beta_{23} \\ -\beta_{13} & \beta_{23} & -\beta_{13}+\beta_{23}+\beta_{33} \end{array} \right)$ where $c$ is a constant, how do I evaluate $\frac{d}{d\beta_{12}}\det{(A)}$?

From what I have searched, if $A= \left( \begin{array}{ccc} \beta_{11} & \beta_{12} & \beta_{13} \\ \beta_{21} & \beta_{22} & \beta_{23} \\ \beta_{31} & \beta_{32} & \beta_{33} \end{array} \right)$ , i.e. no 2 elements are identical, then $\frac{d}{d\beta_{12}}\det{(A)}=\det{(A)}\cdot A^{-1}_{12}$.

What about the former case? Is there some sort of product rule like in 1-variable calculus?

I forgot to mention, the above is just a simplified case of the problem I'm working on. For my case, the matrix $A$ has dimension 300x300

Thanks!

-
I mean you can straight up write out the determinant and take a partial derivative...it's just a 3x3 matrix so this isn't terrible. – uncookedfalcon Dec 13 '12 at 8:39
Use Jacobi's formula. – copper.hat Dec 13 '12 at 8:42
hi guys thanks for the reply but I edited the question. The 3x3 matrix above is just a simplification to the actual problem I'm working on... – Tomas Jorovic Dec 13 '12 at 8:49

You can use the fact that $$\frac{\partial \det A}{\partial \alpha} = \det A \,\mathop{\rm tr} \left(A^{-1} \frac{\partial A}{\partial \alpha}\right),$$if $A$ is invertible.

Or more generally, you can use Jacobi's formula $$\frac{\partial \det A}{\partial \alpha}= \mathop{\rm tr} \left(\mathop{\rm adj}(A) \frac{\partial A}{\partial \alpha}\right).$$

-

In your example, $\beta_{12}$ appears in a rank one fashion; row reductions may be done to find an equivalent formulation with only one appearance of the variable. If this is a common attribute to your general problem, that may be the way to go. In your example the first step would be the row reduction with respect to the variable $\beta_{12}$: $$\pmatrix{1 & 0 & 0 \\ 1&1&0 \\ 0&0&1}\left( \begin{array}{ccc} \beta_{11} + c\beta_{12} +\beta_{13} & -c\beta_{12} & -\beta_{13} \\ -c\beta_{12} & c\beta_{12}+\beta_{22}+\beta_{23} & -\beta_{23} \\ -\beta_{13} & \beta_{23} & -\beta_{13}+\beta_{23}+\beta_{33} \end{array} \right)=\left( \begin{array}{ccc} \beta_{11} + c\beta_{12} +\beta_{13} & -c\beta_{12} & -\beta_{13} \\ \beta_{11} + \beta_{13} & \beta_{22}+\beta_{23} & -\beta_{13} -\beta_{23} \\ -\beta_{13} & \beta_{23} & -\beta_{13}+\beta_{23}+\beta_{33} \end{array} \right)$$

$\beta_{12}$ now only appears in the first row. From here you could column reduce with respect to $\beta_{12}$ in order to use your formula regarding the single appearance of $\beta_{12}$.

You may also notice that when the variable appears in only one row that a similar formula regarding the dot product with the respective column of the inverse is possible.

-