# Does invariant mass depends of temperature? [duplicate]

From special relativity theorie we know that $E = mc^2$.

When a system acquires energy, mass becomes greater. That is clear for kinetic energy, because we have a formula that gives m as a function of $v$:

$$m = \gamma M$$

with $M$ the invariant mass.

So when the system has a greater velocity, m is greater and E is greater.

But what when we heat a system? The energy of the system also becomes greater, so m is greater too. If the system is at rest, v = 0, so m = M and E = m c² = M c². Is it right to conclude that the invariant mass M becomes greater? Is it reasonable to think that there is a formule (not already found, but maybe one day??) to calculate m as a function of the temperature to calculate m (or M) and E when heating a system?

Sorry for my bad English. I hope you understand my question.

In that case we still have $E=mc^2$, where $E$ is the total energy; thus the increase or decrease in temperature changes the rest mass of that system.