A simple proof of the quantum virial theorem that can be used in undergraduate courses is given. The
proof proceeds by first showing that the energy eigenvalues of a Hamiltonian remain invariant under
a scale transformation. Then invoking the Hellmann–Feynman theorem produces the final statement of
the virial theorem.