# How to interpret $\left[f(A), B\right] = \left[A, B \right]\frac{\partial f}{\partial A}$ - how to differentiate with respect to an operator?

From here and here I know the commutation relation for two operators are:

$$\left[f(A), B\right] = \left[A, B \right]\frac{\partial f}{\partial A}$$ if $$\left[A, \left[A, B \right]\right] =0$$ and $$f$$ is a reasonably behaved function.

What does $$\frac{\partial f}{\partial A}$$ mean? How can I differentiate with respect to an operator?

## 1 Answer

Formally, you treat the operator as if it were a variable.

It works because functions of operators are usually defined by their Taylor series. If we plug that into the left side, the problem reduces to calculating $$[A^n, B]$$ (since the commutator is a linear operation). By repeatedly using $$[AB,C]=A[B,C]+[A,C]B$$ we find $$[A^n,B] = \sum_{k=0}^{n-1}A^k[A,B]A^{n-k-1}.$$ Now if $$[A,[A,B]]=0$$, as you write, we can switch all $$A$$ to one side and get $$[A^n,B] = \sum_{k=0}^{n-1}[A,B]A^{n-1} =[A,B]\,n A^{n-1}$$ which on the right is exactly the usual rule for differentiation with respect to $$A$$, if $$A$$ was a variable. So for the purpose of calculating the original commutator, you can just treat it as if it was a variable and derive with respect to it. Careful though whenever $$f$$ is a function of multiple non-commuting operators.

• So it would be accurate to write it like this: $$\left[f(\hat A), \hat B\right] = \left[\hat A, \hat B \right]\frac{\partial f}{\partial A}$$ yep? – zabop Feb 20 at 19:13
• Well, yes, but if you start making hats I would also write one in the denominator of the derivative. – noah Feb 20 at 19:18
• Hmmm, I thought that I deliberately miss it out, to indicate that it is treated as variable there, not as an operator. – zabop Feb 20 at 19:20
• If you write the argument of $f$ with a hat you need it in the denominator, otherwise it's inconsistent. – noah Feb 20 at 19:21