ConceptThe first law of thermodynamics
The first law of thermodynamics says a system's internal energy can only change by heat crossing its boundary or work being done on or by it, and the change equals exactly the heat added minus the work done by the system: delta-U = Q - W.