Consider a container filled with an ideal gas consisting of point masses. The force applied to the point masses is the negative of the forces applied to the wall of the container, which is of the form d F = − − n ^ ^ P d A , where n ^ ^ is the unit normal vector pointing outwards. Then the virial theorem states ⟨ ⟨ T ⟩ ⟩ = − − 1 2 ⟨ ∑ ∑ i F i ⋅ ⋅ r i ⟩ = P 2 ∫ ∫ n ^ ^ ⋅ ⋅ r d A By the divergence theorem, ∫ ∫ n ^ ^ ⋅ ⋅ r d A = ∫ ∫ ∇ ∇ ⋅ ⋅ r d V = 3 ∫ ∫ d V = 3 V . And since the average total kinetic energy ⟨ ⟨ T ⟩ ⟩ = N ⟨ ⟨ 1 2 m v 2 ⟩ ⟩ = N ⋅ ⋅ 3 2 k T , we have P V = N k T .