# Whether $[A,B]=0$ if $\langle[A,B]\rangle=0$ for all states in the Hilbert space?

Let $$\hat{A}$$ and $$\hat{B}$$ are two self-adjoint operators in quantum mechanics corresponding to two dynamical variables $$A$$ and $$B$$. If $$\langle[\hat{A},\hat{B}]\rangle\equiv \langle\psi|[\hat{A},\hat{B}]|\psi\rangle=0, \quad \forall\psi\in \mathcal{H}$$ where $$\mathcal{H}$$ is the Hilbert space of the problem, can we say that $$[\hat{A},\hat{B}]=0$$?

• What have you tried? What does this say if you choose $\psi$ to be elements of some complete basis? Commented Sep 2, 2023 at 17:49
• I think you should also mention that you can assume your Hilbert space to be separable, since it is a common assumption in QM. Commented Sep 4, 2023 at 20:57

I'm just fleshing out the fine answer in the comment. Assuming what you call "dynamical variables" $$\hat A, ~~\hat B$$, are hermitian operators, their commutator is antihermitean, and so $$i[\hat A, \hat B] \equiv \hat M$$ is hermitean. Whence unitarily diagonalizable, $$\hat M= U^\dagger \hat D U$$, to some diagonal operator $$\hat D$$.

If its expectation value in any orthonormal basis $$|\psi _n\rangle$$ vanishes, it must vanish itself, diagonal element by element, and hence $$\hat M$$ vanishes in the orthonormal basis $$U^\dagger |\psi _n\rangle$$; hence your commutator vanishes.

• What do you mean by a diagonal operator? Commented Sep 12, 2023 at 12:37
• @MaoWao one that maps every state to itself times a number. For matrices, a diagonal matrix. Commented Sep 12, 2023 at 13:17
• But diagonal matrices don't do that to every state, only to the standard basis vectors. Commented Sep 12, 2023 at 13:19
• Indeed, for every standard orthonormal basis vector. Commented Sep 12, 2023 at 13:25
• But a Hilbert space has no "standard orthonormal basis vector". If you just require this for some ONB, the there is no need to conjugate by a unitary -- $D$ is diagonal if and only if $U^\ast D U$ is. Moreover, in this form the statement is also not correct -- not every bounded self-adjoint operator has an ONB consisting of eigenvectors. For example, the operator of multiplication by $x$ on $L^2([0,1])$ does not. Commented Sep 12, 2023 at 13:31

Let me just mention that, in quantum mechanics, observables are oftentimes unbounded self-adjoint (or Hermitian, in the physics terminology) operators on a Hilbert space $$\mathscr{H}$$. Unbounded operators can't be defined in the whole Hilbert space, so these are actually densely defined. In this case, one has to be a bit more careful when defining the commutator $$[A,B] = AB - BA$$ since their common domain need not to be dense and could even be empty!

That being said, suppose for simplicity we have $$A$$ and $$B$$ bounded and let $$T = AB-BA$$. Then, $$\|T\| = \sup\{\langle \psi, T\psi\rangle: \|\psi\| = 1\}$$ implies that $$\|T\| = 0$$, so that $$T = 0$$.

If $$A$$ and $$B$$ are unbounded but have a common dense domain, that is, if $$AB - BA$$ is densely defined, the same result follows but we can't use the same proof as before. Instead, suppose $$T = AB-BA$$ is densely defined, with domain $$D(T) \subset \mathscr{H}$$. Suppose $$\langle \psi, T\psi\rangle = 0$$ holds for every $$\psi \in D(T)$$. Suppose further that there exist some $$\varphi \in D(T)$$ such that $$T\varphi \neq 0$$. Because $$D(T)$$ is dense in $$\mathscr{H}$$, there exists a sequence $$\{\psi_{n}\}_{n\in \mathbb{N}}$$ of elements of $$D(T)$$ such that $$\psi_{n} \to T\varphi$$. But then: $$\|T\varphi\|^{2} = \langle T\varphi,T\varphi\rangle = \lim_{n\to \infty}\langle \psi_{n},T\varphi\rangle = 0$$ from where it follows that $$T\varphi = 0$$, a contradiction!

In general, if $$T$$ is an operator in $$\mathcal H$$ with dense domain $$D(T)$$ and $$\langle \xi,T\xi\rangle=0$$ for all $$\xi\in D(T)$$, then $$T=0$$ on $$D(T)$$. This follows simply by polarization. Indeed, $$\langle \xi,T\eta\rangle=\frac 1 4 \sum_{k=0}^3 (-i)^k\langle \xi+i^k \eta,T(\xi+i^k \eta)\rangle=0$$ for $$\xi,\eta\in D(T)$$. Since $$D(T)$$ is dense, $$T\eta=0$$ for all $$\eta\in D(T)$$.