For a single particle system we have: $$E^2 - (pc)^2 = (mc^2)^2.$$ In my lecture notes it has also been stated that for a system of several particles: $$\left(\sum E\right)^2 - \left(\sum p\right)^2c^2 = invariant.$$ But does this invariant have any physical meaning? I can see that it has units of energy squared, so it has to be an energy quantity that doesn't change with inertial frame. Could it be the freely available kinetic energy? How do you prove that?
We can write Jhonny's equation as $$(\sum E_i)^2−c^2(\sum p_i)^2= M^2c^4$$ By exact analogy with a single particle, we call M the rest mass of the system.
It's vital to note that M is not equal to $\sum m_i$.
You get a more positive insight by considering the CM frame of reference, the inertial frame in which the systems's momentum (vector sum of momenta of bodies) is zero. The invariant $(\sum E_i)^2−c^2(\sum p_i)^2$ is therefore simply equal to $(\sum E^*_i)^2$ in which the star indicates CM frame. So $$Mc^2= \sum E^*_i.$$ To sum up, the invariant, $(\sum E_i)^2−c^2(\sum p_i)^2$ is equal to $M^2c^4$ in which M is the invariant mass of the system, and is the mass equivalent of the sum of the bodies' energies in the CM frame.
m is called the invariant mass of the system.
The invariant mass, rest mass, intrinsic mass, proper mass, or in the case of bound systems simply mass, is that portion of the total mass of an object or system of objects that is independent of the overall motion of the system. More precisely, it is a characteristic of the system's total energy and momentum that is the same in all frames of reference related by Lorentz transformations.
If you have a single proton there, it is the invariant mass of the proton. The mass of the proton does not change with the Lorentz frames.The same is true with the total fourvector of a complex system, which is your second formula. Its square root gives the invariant mass of the system.