How does a gas change its internal energy when it absorbs heat and does work?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

According to the first law of thermodynamics, the change in the internal energy (ΔU) of a gas is determined by the balance between the heat absorbed by the system and the work performed by it.12

When a gas absorbs heat (Q) from its surroundings and does work (W) on its surroundings, the change in its internal energy is expressed by the equation:

ΔU=Q−W

In this relationship, the internal energy acts as a state function, meaning its change depends only on the initial and final states of the system. Conversely, heat and work are not state functions; their values depend on the specific path or process taken to reach the final state. Essentially, the first law functions as a strict energy accounting system where the change in internal energy represents the net result of energy "deposits" (heat added to the gas) and "withdrawals" (work done by the gas).132