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.