atyy said:
pervect suggested that the rest mass captured the idea of "amount of stuff". If we compare hot and cold boxes in which the molecules have more and less kinetic energy, will the scale still give only the rest masses?
In Newtonian physics, I'd just use a balance, as others have remarked. And in Newtonian physics you wouldn't expect the answer to change when you add heat to the box, so this is something new that arises in relativistic physics. We've subtly changed our philosophical idea of "stuff" - from being just matter, to being energy. So now, the amount of "stuff" in the box is the amount of energy in the box, not just the amount of gross matter. A subtle, but important, evolution from the original Newtonian idea.
In special relativity, we can define a satisfactory answer for the "amount of stuff", which we have newly interpreted as the total energy, of a system, IF the system is isolated. Due to the relativity of simultaneity, the amount of energy in a non-isolated system depends on the observer when the system is interacting with the environment. In GR, the situation is even worse - there isn't any general answer for total energy unless one has some preconditions.
Even in special relativity, the problem can be tricky. The surest way of getting the correct answer is also the most technical. The sure way is to use another geometric object the stress-energy tensor, to compute the energy, and momentum, of the system. Then, for isolated systems, one can show that E^2 - p^2 is invariant, it's independent of the "view" or coordinates or frame one takes. We say that the energy-momentum of the box transforms as a four vector, even for an extended object - but ONLY when the extended object is isolated. So E^2 - p^2, or rather its square root, turns out to be a good way to "weigh" a box.
However, the general reason why we use the stress-energy tensor is, I think, a mystery to most students. The answer goes back to geometric objects again. The stress energy tensor is a geometric object, it's a frame-independent way of thinking about the distribution, or density, of energy and momentum.
The easy way of getting the correct answer, without using the stress-energy tensor, is to compute E^2 - p^2 in the rest frame of the box. In this case, one can omit the walls of the box. But one has to presuppose the result that E^2-p^2 is invariant.
If you compute the total energy and momentum of the box in some other frame, you have to be sure to include the walls of the box. This is part of having a closed system, without a box, some collection of bouncing non-interacting particles would fly apart. There must be tension in the box to hold it together.
This tension in the walls doesn't contribute to either the total energy or the total momentum in the rest frame of the box. But in other frames (or views, as I called them eariler), it does! So to have frame independent physics, one has to include these contributions from the walls of the box.
I have posted a worked example somewhere of a "box of bouncing particles" using SR that shows that if you omit the walls and include only the energy and momentum of the particles, E^2 - p^2 of the sub-assembly (the contents of the box excluding the walls) is NOT constant, a consequence of the system being NOT isolated unless you include the walls.