# What are the requirements for a “test” function to show operators commute?

To show that two operators $\hat{A}$ and $\hat{B}$ commute, we can check whether $\hat{A}\hat{B}f(x)$ = $\hat{B}\hat{A}f(x)$.

My question is regarding the function $f(x)$. To check that $\hat{A}$ and $\hat{B}$ commute, can we use any function? Or are there requirements on the function we "test" commutativity with?

This relates to an exercise in a textbook which asks me to show why two operators in quantum chemistry commute. Both operators act on functions of multiple electron coordinates, e.g. $\Psi(\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{N})$, where $\mathbf{x}_{i}$ is the vector coordinate of electron $i$. One of the operators, $\hat{P}_{n}$ permutes the coordinates of the electrons (swapping the positions of two electrons, for $N$ electrons, there are $N!$ permutations), the other, $\hat{H}_{0}$, is a sum over one-electron operators, $\sum_{i}^{N} \hat{f}(i)$, where $\hat{f}(i)$ only acts on electron $i$. Whilst I know how $\hat{P}_{n}$ will act on any general function over multiple electron coordinates, I only know the outcome of the action of $\hat{H}_{0}$ on $\Psi$ which are made up of one-electron eigenfunctions, $\chi_{j}(\mathbf{x}_{i})$, of the operators $\hat{f}(i)$, e.g. determinants or products of these one-electron eigenfunctions.

If I can show that the operators commute using a test function $\Psi$ of this specific form, does this imply the operators have the general property that they commute?

Yes, you can conclude that in this case, the reason being that the determinants (or, in the bosonic case, the symmetrized products) of single-particle functions form a basis of the Fock space; more precisely, the set of all determinants or symmetrized products of all possible combinations of $n$ basis elements of a single-particle basis form a basis of the $n$-particle sector of the Fock space.
By the way, why do you know the action of $\hat H_0$ only for determinants/products? You should be able to show that $\hat H_0$ commutes with $\hat P_n$ quite generally, without applying it to any test functions.
• Without introducing a test function, I do not know how I would demonstrate commutativity. I say that I only know the action of $\hat{H}_{0}$ on determinants/products of the basis functions $\chi_{a}$ because I know that $\hat{f}_{i}\chi_{a}(\mathbf{x}_{i}) = \epsilon_{a} \chi_{a}(\mathbf{x}_{i})$ (an eigenvalue problem) but not the outcome of $\hat{f}_{i}$ acting on any arbitrary function of $\mathbf{x}_{i}$ (not necessarily an eigenfunction of $\hat{f}_{i}$). What do you mean by "commutativity for the entire space follows by linearity"? – James Womack Aug 12 '12 at 14:27