# The Virial Theorem

We will now derive the quantum mechanical virial theorem. For a Hamiltonian of the form,

$\hat{H}=\frac{\hat{\mathbf{p}}^2}{2m}+\hat{V}(\hat{\mathbf{r}})=\hat{K}+\hat{V}(\hat{\mathbf{r}}),$

this theorem gives the expectation value of the kinetic energy in a stationary state in terms of the potential energy. To derive this relation, we consider the expectation value of $\hat{\mathbf{r}}\cdot\hat{\mathbf{p}}.$ The time derivative of this expectation value is

\begin{align} \frac{d}{dt}\langle\hat{\mathbf{r}}\cdot\hat{\mathbf{p}}\rangle&=-\frac{i}{\hbar}<[\hat{\mathbf{r}}\cdot\hat{\mathbf{p}},\hat{H}]>=-\frac{i}{2m\hbar}\langle[\hat{\mathbf{r}}\cdot\hat{\mathbf{p}},\hat{\mathbf{p}}^2]\rangle-\frac{i}{\hbar}\langle[\hat{\mathbf{r}}\cdot\hat{\mathbf{p}},\hat{V}(\hat{\mathbf{r}})]\rangle \\ &=\frac{\langle\hat{\mathbf{p}}^2\rangle}{m}-\langle\hat{\mathbf{r}}\cdot\nabla\hat{V}(\hat{\mathbf{r}})\rangle=2\langle\hat{K}\rangle-\langle\hat{\mathbf{r}}\cdot\nabla\hat{V}(\hat{\mathbf{r}})\rangle. \end{align}

For a stationary state, the expectation value of $\hat{\mathbf{r}}\cdot\hat{\mathbf{p}}$ is constant in time. This gives us the relation,

$2\langle\hat{K}\rangle=\langle\hat{\mathbf{r}}\cdot\nabla\hat{V}(\hat{\mathbf{r}})\rangle.$

This is the virial theorem.

As an example of its application, let us consider the isotropic three-dimensional harmonic oscillator,

$\hat{V}(\hat{\mathbf{r}})=\tfrac{1}{2}m\omega^2\hat{r}^2.$

The right-hand side of the virial theorem is given by

$\hat{\mathbf{r}}\cdot\nabla\hat{V}(\hat{\mathbf{r}})=m\omega^2\hat{r}^2=2\hat{V}(\hat{\mathbf{r}}).$

Therefore,

$\langle\hat{K}\rangle=\langle\hat{V}\rangle.$