We start with the moment of inertia about the origin for the system of particles, which is defined as
Differentiate using the chain rule. Note that a vector dotted into itself yields its magnitude square.
This lets us make the connection that
So after differentiating we get
Differentiating again yields
In short form
When dealing with a system of particles we found that the kinetic energy associated with a system of particles was
Plugging in T into (6) gives us
Next we need to tackle the term. We first bring in the potential energy through its connection with force. This part is named the Virial of Claussius.
This gives us the equality
Now due to Newton's 3rd law that states for every action there is an opposite and equal reaction we have the forces on the ith particle in our system given by
where .
So when we go to sum up all the forces we notice 'force pairing' such that
Plugging this into the virial of Claussius yields
Now we need to take the gradient of the potential energy to get the force. This is a tedious calculation which can be found here (insert link)
Inserting this into (13) gives
The two keys in understanding the above equation is to note that
and that
So now we add the numerators of (15) to get
Next we expand (17) to see that it is equal to (18) and this cancels a power of 2 in the denominator of (15) to finally yeild the expression for potential energy
So going back to (8) we see
From the energy equation of the system, E = T - U and the key to finish up the virial theorem is to note that the momemt of inertia does not change on average with time ("After one dynamical timescale, the time derivative of I is constant so the second derivative is zero
This leads to
plugging this into the energy equation gives us the result of the virial theorem which states that the total energy of a stationary system (no significant dynamical evolution) is one-half the potential energy of the system.