# How to express the anti-commutator in the form of a density operator?

$$\newcommand{\ket}[1]{|{#1}\rangle} \newcommand{\bra}[1]{\langle{#1}|} \newcommand{\braket}[2]{\langle{#1}|{#2}\rangle} \newcommand{\acomm}[2]{\left\{#1,#2\right\}}$$Let $$\{ \ket{1} \ket{1} \ket{2} ... \}$$ be a complete set of orthonormal basis states for an infinite dimensional state space. Let $$\hat{A} \ket{n} = n\ket{n-1}$$ and $$\hat{B} \ket{n} = \ket{n+1}$$, how to express the anti-commutator $$\acomm{\hat{A}}{\hat{B}} = \hat{A}\hat{B}+\hat{B}\hat{A}$$ in the form $$\sum_{n,m=0}^{\infty}\lambda_{nm}\ket{n}\bra{m}?$$

I know that I need to look for an expression, whose effect is the same as \begin{align} \bra{m}\acomm{\hat{A}}{\hat{B}}\ket{n} =& \bra{m}\hat{A}\hat{B} + \hat{B}\hat{A}\ket{n} \nonumber\\ =& \bra{m} (\hat{A}\ket{n+1} + \hat{B}n\ket{n-1}) \nonumber\\ =& \bra{m}((n+1)\ket{n} + n\ket{n}) \nonumber\\ =& (2n+1)\braket{m}{n} \nonumber . \end{align}

But I feel very confused about how to express the anti-commutator in that specific form.

• This needs serious editing by the OP. Sep 19, 2020 at 7:12
• @ZeroTheHero What does OP mean? Sep 19, 2020 at 13:34
• OP= original poster “\ket” is not an accepted command. Need “\vert” n “\rangle” Sep 19, 2020 at 13:55

You have almost completed the job since you have computed the desired matrix elements. Any operator $$O$$ can be written as
$$O = \sum_{m,n} O_{m,n} |m\rangle \langle n| \,, \mbox{ where} \quad O_{mn} = \langle m|O|n\rangle.$$
$$\{A,B\} = \sum_{m,n} (2n+1)\delta_{m,n} |m\rangle \langle n| = \sum_{n} (2n+1)|n\rangle \langle n|.$$