Imagine you are standing at the base of a mountain (State A) and you want to reach the summit (State B). You have two choices: you can take the steep, direct trail (Process I), or you can take the long, winding scenic route (Process II).
If I ask you, "How much distance did you walk?" your answer will heavily depend on the path you chose. The winding route will rack up far more miles than the direct trail. Distance, in this analogy, is a path function.
But what if I ask you, "How much did your altitude change?" It doesn't matter if you took the steep trail, the winding route, or even if you took a helicopter. Your change in altitude is simply the altitude at the summit minus the altitude at the base. Altitude is a state function.
The Thermodynamic Equivalent
In thermodynamics, we deal with similar concepts. When a gas expands or compresses from an initial state A to a final state B, it can do so via infinite possible paths on a p−V diagram.
The work done by the gas (W) is the area under the p−V curve. Just like the distance walked on the mountain, the area under the curve is different for Process I and Process II. Therefore, work is a path function.
Similarly, the heat supplied to the system (Q) also depends on the path taken.
The Magic of Internal Energy
However, the internal energy (U) of an ideal gas depends solely on its temperature, which is uniquely defined by its pressure and volume at any given point (pV=nRT).
Because internal energy only cares about where the system is, and not how it got there, it is a state function.
For Process I, the change in internal energy is:
ΔU1=UB−UA
For Process II, the change in internal energy is:
ΔU2=UB−UA
Since both processes start at the exact same state A and end at the exact same state B, the change in internal energy must be identical.
Therefore, we can confidently conclude:
ΔU1=ΔU2
This simple yet profound realization is the cornerstone of the First Law of Thermodynamics!