# Calculation of a quantum-mechanical commutator in three dimensions

I needed to work out the commutator $[\hat{H}, \hat{\vec{r}} \ ]$, where

$\hat{H} = -\frac{\hbar^2}{2m} \nabla^2 + \hat{U}$

is the Hamiltonian operator and $\hat{\vec{r}}$ is the 3D position vector operator. It is difficult to find any textbook or online source that explicitly goes through the calculation of this three-dimensional case (in fact, I have not been able to find any) so I am recording my calculation step-by-step in this note.

The commutator $[\hat{H}, \hat{\vec{r}} \ ]$ is a vector operator with components

$[\hat{H}, \hat{x} \ ] = \hat{H} \ \hat{x} - \hat{x} \ \hat{H}$

$[\hat{H}, \hat{y} \ ] = \hat{H} \ \hat{y} - \hat{y} \ \hat{H}$

and

$[\hat{H}, \hat{z} \ ] = \hat{H} \ \hat{z} - \hat{z} \ \hat{H}$

To evaluate these, note that the momentum operator (in position space) is

$\hat{\vec{p}} = -i \ \hbar \nabla$

and so we have

$\hat{H} = -\frac{\hbar^2}{2m} \nabla^2 + \hat{U}$

$= \frac{1}{2m} \hat{\vec{p}} \cdot \hat{\vec{p}} + \hat{U}$

$= \frac{1}{2m}(\hat{p}_x^{2} + \hat{p}_y^{2} + \hat{p}_z^{2}) + \hat{U}$

Looking at the $x$-component of $[\hat{H}, \hat{\vec{r}} \ ]$ we therefore have

$[\hat{H}, \hat{x} \ ] = \hat{H} \ \hat{x} - \hat{x} \ \hat{H} = \frac{\hat{p}_x^{2} \hat{x} + \hat{p}_y^{2} \hat{x} + \hat{p}_z^{2} \hat{x}}{2m} + \hat{U} \ \hat{x} - \big(\frac{\hat{x} \hat{p}_x^{2} + \hat{x} \hat{p}_y^{2} + \hat{x} \hat{p}_z^{2}}{2m} + \hat{x} \ \hat{U}\big)$

$= \frac{1}{2m}([\hat{p}_x^2, \hat{x} \ ] + [\hat{p}_y^2, \hat{x} \ ] + [\hat{p}_z^2, \hat{x} \ ]) + [\hat{U}, \hat{x} \ ]$

Since multiplication is commutative we have $[\hat{U}, \hat{x} \ ] = 0$. I will now show that we also have

$[\hat{p}_y^2, \hat{x} \ ] = [\hat{p}_z^2, \hat{x} \ ] = 0$

To see this, let us first work out in detail the effect of $[\hat{p}_y, \hat{x} \ ]$ on a wavefunction $\Psi$. We have

$[\hat{p}_y, \hat{x} \ ] \Psi = - i \ \hbar \frac{\partial (\hat{x} \Psi)}{\partial y} + \hat{x }i \ \hbar \frac{\partial \Psi}{\partial y}$

$= - i \ \hbar \hat{x} \frac{\partial \Psi}{\partial y} - i \ \hbar \Psi \frac{\partial \hat{x}}{\partial y} + \hat{x} i \ \hbar \frac{\partial \Psi}{\partial y}$

$= - i \ \hbar \Psi \frac{\partial \hat{x}}{\partial y} = 0$

where the last equality follows from the fact that $\hat{x}$ does not depend on $y$. Thus, $[\hat{p}_y, \hat{x} \ ] = 0$.

We can now easily show that $[\hat{p}_y^2, \hat{x} \ ] = 0$ because using the basic result for commutators that

$[AB, C] = A[B, C] + [A, C]B$

(easy to prove by writing out the terms in full) we find that

$[\hat{p}_y^2, \hat{x} \ ] = \hat{p}_y \ [\hat{p}_y, \hat{x} \ ] + [\hat{p}_y, \hat{x} \ ] \ \hat{p}_y = 0$

Identical arguments show that $[\hat{p}_z^2, \hat{x} \ ] = 0$. Thus, we can conclude that

$[\hat{H}, \hat{x} \ ] = \hat{H} \ \hat{x} - \hat{x} \ \hat{H} = \frac{1}{2m} [\hat{p}_x^2, \hat{x} \ ]$

It now only remains to work out $[\hat{p}_x^2, \hat{x} \ ]$ and we can do this by first working out in detail the effect of $[\hat{p}_x, \hat{x} \ ]$ on a wavefunction $\Psi$ (this is of course the `canonical commutation relation’ of quantum mechanics). We have

$[\hat{p}_x, \hat{x} \ ] \Psi = - i \ \hbar \frac{\partial (\hat{x} \Psi)}{\partial x} + \hat{x } i \ \hbar \frac{\partial \Psi}{\partial x}$

$= - i \ \hbar \hat{x} \frac{\partial \Psi}{\partial x} - i \ \hbar \Psi \frac{\partial \hat{x}}{\partial x} + \hat{x} i \ \hbar \frac{\partial \Psi}{\partial x}$

$= - i \ \hbar \Psi \frac{\partial \hat{x}}{\partial x} = - i \ \hbar \Psi$

where the last equality follows from the fact that $\hat{x}$ is the same as multiplying by $x$ so its derivative with respect to $x$ equals $1$. Thus, $[\hat{p}_x, \hat{x} \ ] = - i \ \hbar$. Then we find that

$[\hat{p}_x^2, \hat{x} \ ] = \hat{p}_x \ [\hat{p}_x, \hat{x} \ ] + [\hat{p}_x, \hat{x} \ ] \ \hat{p}_x = -2 i \ \hbar \hat{p}_x$

and we can conclude that

$[\hat{H}, \hat{x} \ ] = \hat{H} \ \hat{x} - \hat{x} \ \hat{H} = \frac{1}{2m} [\hat{p}_x^2, \hat{x} \ ] = - \frac{i \ \hbar}{m} \hat{p}_x$

Identical arguments show that

$\hat{H} \ \hat{y} - \hat{y} \ \hat{H} = \frac{1}{2m} [\hat{p}_y^2, \hat{y} \ ] = - \frac{i \ \hbar}{m} \hat{p}_y$

and

$\hat{H} \ \hat{z} - \hat{z} \ \hat{H} = \frac{1}{2m} [\hat{p}_z^2, \hat{z} \ ] = - \frac{i \ \hbar}{m} \hat{p}_z$

Thus, we finally reach our desired expression for the Hamiltonian-position commutator in three dimensions:

$[\hat{H}, \hat{\vec{r}} \ ] = - \frac{i \ \hbar}{m} \hat{\vec{p}}$

As an application of this result we will consider the problem of working out the expectation of position and velocity for a quantum particle. In three-dimensional space the quantum wave function is

$\Psi = \Psi(x, y, z, t)$

and we obtain the probability density function as

$\rho(x, y, z, t) = \Psi^{*} \Psi$

The wavefunction $\Psi$ satisfies the time-dependent Schrödinger equation

$i \hbar \frac{\partial \Psi}{\partial t} = -\frac{\hbar^2}{2m}\big(\frac{\partial^2 \Psi}{\partial x^2} + \frac{\partial^2 \Psi}{\partial y^2} + \frac{\partial^2 \Psi}{\partial z^2}\big) + U\Psi$

where $U = U(x, y, z, t)$ is some potential energy function. We can write the Schrödinger equation in operator form using Dirac notation as

$\hat{H} |\Psi \rangle = i \hbar \frac{\partial}{\partial t} |\Psi \rangle$

where

$\hat{H} = -\frac{\hbar^2}{2m} \nabla^2 + \hat{U}$

is the Hamiltonian operator (the Hamiltonian form of total energy) and

$i \hbar \frac{\partial }{\partial t}$

is the total energy operator. Note that the complex conjugate of the wavefunction $\Psi^{*}$ satisfies the Schrödinger equation written in Dirac notation as

$\langle \Psi | \hat{H} = - \langle \Psi | i \hbar \frac{\partial}{\partial t}$

In quantum mechanics we find the expected position $\langle \vec{r}(t) \rangle$ of the particle by integrating the position operator $\hat{\vec{r}}$ over all space, sandwiched between $\Psi^{*}$ and $\Psi$. Thus, letting $\mathrm{d}V \equiv \mathrm{d} x \mathrm{d} y \mathrm{d} z$ we have

$\langle \vec{r}(t) \rangle = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \Psi^{*} \ \hat{\vec{r}} \ \Psi \text{d}V \equiv \langle \Psi \ | \hat{\vec{r}} \ | \Psi \rangle$

where in the last term I have switched to using Dirac notation which will be useful shortly. The expected velocity can then be obtained by differentiating this integral with respect to $t$. We get

$\langle \vec{v}(t) \rangle = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \big[ \frac{\partial \Psi^{*}}{\partial t} \ \hat{\vec{r}} \ \Psi + \Psi^{*} \ \hat{\vec{r}} \ \frac{\partial \Psi}{\partial t} \big] \text{d}V + \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \Psi^{*} \ \frac{\partial \hat{\vec{r}}}{\partial t} \ \Psi \text{d}V$

The second triple integral on the right-hand side is zero because the position operator does not depend on time. The integrand in the first triple integral can be manipulated by using the operator form of the Schrödinger equation and Dirac notation to write

$\frac{\partial \Psi}{\partial t} = \frac{\partial}{\partial t} | \Psi \rangle = \frac{1}{i \ \hbar} \ \hat{H} \ | \Psi \rangle$

and

$\frac{\partial \Psi^{*}}{\partial t} = \langle \Psi | \frac{\partial}{\partial t} = -\frac{1}{i \ \hbar} \ \langle \Psi | \hat{H}$

Thus, we have

$\langle \vec{v}(t) \rangle = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \big[ \frac{\partial \Psi^{*}}{\partial t} \ \hat{\vec{r}} \ \Psi + \Psi^{*} \ \hat{\vec{r}} \ \frac{\partial \Psi}{\partial t} \big] \text{d}V$

$= - \frac{1}{i \ \hbar} \langle \Psi |\hat{H} \ \hat{\vec{r}} \ | \Psi \rangle + \frac{1}{i \ \hbar} \langle \Psi | \hat{\vec{r}} \ \hat{H} | \Psi \rangle$

$= \frac{i}{\hbar} \langle \Psi | \hat{H} \ \hat{\vec{r}} \ - \hat{\vec{r}} \ \hat{H} \ | \Psi \rangle$

$= \frac{i}{\hbar} \langle \Psi | \ [\hat{H}, \hat{\vec{r}} \ ] \ | \Psi \rangle$

$= \frac{1}{m} \langle \Psi | \ \hat{\vec{p}} \ | \Psi \rangle$

$= \big \langle \frac{\hat{\vec{p}}}{m} \big \rangle$

where the last two equalities follow from the fact that $[\hat{H}, \hat{\vec{r}} \ ]$ is the commutator of $\hat{H}$ and $\hat{\vec{r}}$, which is equal to $-\frac{i \hbar}{m} \hat{\vec{p}}$ as we saw above. Therefore the expected velocity of a quantum particle looks a lot like the velocity of a classical particle (momentum divided by mass). The idea that quantum mechanical expectations exhibit Newtonian-like behaviour is the essence of the Ehrenfest Theorem of quantum mechanics.