# To prove that an operator commutes with any function of it


So I write $\hat{A} = \sum\limits_{i} a_i\ \ket{a_i}\bra{a_i}$, and $f(\hat{A}) = \sum\limits_{j} f(a_j)\ \ket{a_j}\bra{a_j}$; where $a_i$ and $\ket{a_i}$ are eigen values and eigen vectors of $\hat{A}$ respectively.

I start off with LHS $\\= \hat{A} \hat{B} \\= \sum\limits_{i} a_i\ \ket{a_i}\bra{a_i} \times \sum\limits_{j} f(a_j)\ \ket{a_j}\bra{a_j} \\= \sum\limits_{i} \sum\limits_{j} a_i\ f(a_j)\ \ket{a_i} (\bra{a_i} \ket{a_j})\bra{a_j} \\= \sum\limits_{i} \sum\limits_{j} a_i\ f(a_j)\ \ket{a_i}\ \delta_{ij}\ \bra{a_j} \\= \sum\limits_{i} \sum\limits_{j} a_i\ f(a_j)\ \ket{a_i}\bra{a_j}$

And similarly, RHS $\\=\hat{B} \hat{A} \\ = \sum\limits_{j} f(a_j)\ \ket{a_j}\bra{a_j} \times \sum\limits_{i} a_i\ \ket{a_i}\bra{a_i} \\= \sum\limits_{j} \sum\limits_{i} f(a_j)\ a_i\ \ket{a_j} (\bra{a_j} \ket{a_i})\bra{a_i} \\= \sum\limits_{j} \sum\limits_{i} f(a_j)\ a_i\ \ket{a_j}\ \delta_{ji}\ \bra{a_i} \\= \sum\limits_{j} \sum\limits_{i} f(a_j)\ a_i\ \ket{a_j}\bra{a_i}$

But I'm stuck as I see that $\ket{a_j}\bra{a_i} \ne \ket{a_i}\bra{a_j}$.

EDIT: My question is: Can this be proved using the eigen vectors of $\hat A$? (Am I supposed to knock off a summation subscript when I take the $\delta_{ij}$ product?)

• Hi gary, I'm happy to edit your post, because its not rendering properly, at least on my machine. I am used to rangle and langle for bras and kets, I would prefer your way of writing Dirac notation but I don't know how to do it.
– user108787
Aug 17 '16 at 16:51
• @count_to_10 You can use \newcommand on Stack Exchange to define \bra and \ket. Aug 17 '16 at 16:55
• @count_to_10 pardon me, i am used to having this package imported by default in my TeX. MathJax problems aside… 😅 Aug 17 '16 at 17:03
• Related meta post: meta.physics.stackexchange.com/a/6952 in reminder of using \newcommand.
– user36790
Aug 17 '16 at 17:45
• @garyF You've almost did it yourself but made a mistake. When you sum over $j$, due to Kronecker delta $\delta_{ij}$ only the terms with $j=i$ are picked up, and hence, in both lhs and rhs you end up with $\sum_{i} a_i f(a_{i})|a_{i}\rangle\langle a_{i}|$. Aug 17 '16 at 18:40

To show that a general operator $\hat{A}$ commutes with some function of $\hat{A}$, $\hat{B} = f(\hat{A})$, one must only use the fact that $\hat{A}$ commutes with itself raised to some power, $[\hat{A},\hat{A}^n] = 0$. This is done by expanding the function $f$ in a Taylor series

$$f(\hat{A}) = \sum_{n=0}^\infty \frac{\hat{A}^n}{n!}$$

Now the commutator (using the fact that the commutator is linear)

$$[\hat{A},f(\hat{A})] = [\hat{A},\sum_{n=0}^\infty \frac{\hat{A}^n}{n!}] = \sum_{n=0}^\infty \frac{1}{n!}[\hat{A},\hat{A}^n]$$

As $\hat{A}$ always commutes with itself, the commutator is zero.

• This proves the statement in question, and you get a vote up. But i was wondering if it can be done with the eigen vectors of the operator. (I derived $f(\hat{A})$ in terms of $\hat A$'s eigen vectors to start off with.) I'll edit my question to make it clearer. :-) Aug 17 '16 at 16:56
• Given your edits, the individual outer products are indeed different in the general case, but the \emph{sum} is the same over the entire spectral space. You can convince your self of this for finite dimensional operators and restricting the sums accordingly Aug 17 '16 at 17:03
• Hmm… but the \emph{sum} has different coefficients for each term, which is why i hesitated to get convinced. I spent one hour trying to do the grunt work, but proving it this way seems hard. Aug 17 '16 at 17:38
• You can exploit the fact that the sums run over the same bounds. Aug 17 '16 at 18:08
• This is not a sufficiently general proof for many reasons. It is not enough even for Hermitian matrices. For instance this way does not prove that $|A|$ commutes with $B$ if $A$ does, where both matrices are Hermitian. The original attempt of the OP is the right way. Aug 17 '16 at 18:49