alan123hk said:
I'm a bit lost, there seems to be some contradiction here, can we perform additions of different masses in a system? Does this mean we can perform additions of different masses if they represent different energies?
You can't add masses. But
as long as you stick to a single reference frame, you can add energies.
You can (almost always) find a reference frame in which the system of interest has zero momentum. You can call it the system's rest frame, but "center of momentum" frame is more accurate.
An object's mass is equal to its total energy (divided by c squared) in its center of momentum frame.
Energy is not invariant. It changes depending on the reference frame that you choose. A baseball considered in its rest frame has less total energy than a baseball considered in a different frame of reference. In any other frame, it has non-zero kinetic energy.
If you divide a system into pieces, the mass of each piece will be equal to the energy of that piece in the center of momentum frame for that piece. If you add the energies... you've just tried to add non-invariant quantities drawn from a bunch of different reference frames. That's like adding apples, bananas and pears. The total is not meaningful.
If you are going to add non-invariant quantities, you have to pick a reference frame first.
Edit:
There is a corner case where the definition of "mass" as a system's total energy in its rest frame fails: a massless particle moving at the speed of light (for instance, a pulse in a well collimated light beam). Such an entity has no center of momentum frame, so the definition fails.
There is an alternate definition of mass that succeeds: $$m^2 = \frac{E^2}{c^4} - \frac{p^2}{c^2}$$or$$m=\sqrt{\frac{E^2}{c^4}-\frac{p^2}{c^2}}$$If ##m=0## then ##E=pc##. And vice versa.
If you chase this down, you can motivate it with four-vectors. Take a system and pick a reference frame. Any reference frame. Write down the three components of the system momentum and add a fourth component for its energy. This is the system's energy-momentum four-vector. The components of this vector will not be invariant. They will obviously depend on the choice of reference frame.
Use units where c=1 and take the magnitude of the energy-momentum four-vector using a "magnitude" rule that treats the contribution of the momentum as negative and energy as positive.$$|\vec{V}| = \sqrt{{V_e}^2 - {V_x}^2 - {V_y}^2 - {V_z}^2}$$By no coincidence, this matches the formula for mass above.
This number will turn out to be independent of reference frame. No matter what frame you choose, it will be the same number.
Mass is the invariant magnitude of an object's energy-momentum four-vector.