# Derivative with Respect to a Variable Pauli Matrix

In one of my research problems, the following issue came up. I need to differentiate the determinant of some matrix-valued function of matrices with respect to a Pauli matrix multiplied by some real variable:

Let $\sigma^i$ be one of the three Pauli matrices :

$$\sigma^1 = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix},~ \sigma^2 = \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix}, ~ \sigma^3 = \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix}$$

Then, let $f(R;\sigma^i)$ be a matrix-valued function of Pauli matrices and some parameter $R\in\mathbb{R}$. Further, let $A^i=R\sigma^i$. The question is to compute a well-defined derivative:

$$\dfrac{\partial (\det f)}{\partial A^i} = \dfrac{\partial (\det f)}{\partial (R\sigma^i)}.$$

I have gotten as far as using the following identity

$$\dfrac{\partial (\det f)}{\partial A^i} = \det(f)\text{Tr}\left(f^{-1}\dfrac{\partial f}{\partial A^i}\right),$$

however I am not sure how to take the derivative of a matrix with respect to another matrix. Another option is to note that the determinant of $f$ is in fact a scalar, so we can use the following identity:

$$\frac{\partial \det f}{\partial A^i} = \begin{bmatrix} \frac{\partial \det f}{\partial A^i_{11}} & \frac{\partial \det f}{\partial A^i_{21}} \\ \frac{\partial \det f}{\partial A^i_{12}} & \frac{\partial \det f}{\partial A^i_{22}} \\ \end{bmatrix}.$$

However, take the example when $A^i = R\sigma^3$. Then,

$$\frac{\partial \det f}{\partial A^i} = \begin{bmatrix} \frac{\partial \det f}{\partial A^i_{11}} & \frac{\partial \det f}{\partial A^i_{21}} \\ \frac{\partial \det f}{\partial A^i_{12}} & \frac{\partial \det f}{\partial A^i_{22}} \\ \end{bmatrix}= \begin{bmatrix} \frac{\partial \det f}{\partial R} & \frac{\partial \det f}{\partial (0)} \\ \frac{\partial \det f}{\partial (0)} & -\frac{\partial \det f}{\partial R} \\ \end{bmatrix}$$

Clearly, the derivatives along the diagonal work since $\det f$ is a function of $R$, however the other two are derivatives with respect to 0 which makes no sense. If anyone can shed some light on this, it would be much appreciated.

This problem is a part of a more general formula; I have taken several special cases which circumvent the need for this specific equation and the result holds. I have no reason to suspect that it doesn't hold in general other than this issue. Thank you for the help.

Firstly $f(R,\sigma^i)$ is a quasi non-sense because the Pauli matrices are constant. In fact you must write $f(R)=F(R\sigma^j)$ for a fixed index $j$. We know that $\dfrac{\partial{\det f}}{\partial{R}}=trace(adj(f)\dfrac{\partial{f}}{\partial{R}})$.
Now $\dfrac{\partial{\det F}}{\partial{R\sigma^j}}$ is the linear application: $\alpha \sigma^j\in T\rightarrow \alpha\; trace(adj(f)\dfrac{\partial{f}}{\partial{R}})$ where $T= \mathbb{R}\times \sigma^j$.