The internal energy for a system is the total energy for that system (potential + kinetic). We are interested in tracking the internal energy as it allows us to know if energy is coming into or out of a system. If there is a change in the internal energy of a system, then energy must have been exchanged between the system and the surroundings. This energy flow is in the form of either heat or work. Therefore, we equate any change in the internal energy of a system with the sum of the heat and the work.
\[\Delta U = q + w\]
Where the change in the internal energy is \(\Delta U\) (sometimes \(\Delta E\) is used for changes in internal energy), the heat is \(q\) and the work is \(w\). The change in internal energy can be positive or negative (as can the heat and the work). The change is defined as the final internal energy minus the initial internal energy
\[\Delta U = U_f - U_i\]
So a negative change means the final energy is lower than the initial energy. This results in energy "out of the system." In words this might be stated as energy flow "out of the system" or "released by the system." A positive change indicates the system has "absorbed energy" or "increased in energy" or "taken in energy."
\(\Delta U < 0 \) Energy goes from system to surroundings
\(\Delta U > 0 \) Energy goes from surroundings to system
The same is true for the sign convention of heat.
\(q < 0 \) Heat is flowing out of the system into the surroundings. Heat is released.
\(q > 0\) Heat is flowing from the surrounding into the system. Heat is absorbed.
\(w < 0\) is work out of the system. We say the system does work on the surroundings.
\(w > 0\) is work into the system. The surroundings do work on the system.