  The virial theorem is related to the dilatation properties of bound states.
This is realized, in particular, by the Landau-Lifshitz formulation of the
relativistic virial theorem, in terms of the trace of the energy-momentum
tensor. We construct a Hamiltonian formulation of dilatations in which the
relativistic virial theorem naturally arises as the condition of stability
against dilatations. A bound state becomes scale invariant in the
ultrarelativistic limit, in which its energy vanishes. However, for very
relativistic bound states, scale invariance is broken by quantum effects and
the virial theorem must include the energy-momentum tensor trace anomaly. This
quantum field theory virial theorem is directly related to the Callan-Symanzik
equations. The virial theorem is applied to QED and then to QCD, focusing on
the bag model of hadrons. In massless QCD, according to the virial theorem, 3/4
of a hadron mass corresponds to quarks and gluons and 1/4 to the trace anomaly.
