The First Law of Thermodynamics
Push the plunger on a bicycle pump and hold your thumb over the outlet. The air inside gets warmer. No flame touched it. Where did that energy come from? Your hand did work on the gas. The First Law of Thermodynamics tells you exactly how that work turns into stored internal energy. This law is the accountant of chemistry. Every reaction, every phase change, every biological process obeys one rule. Energy is never created or destroyed. It is only moved between a system and its surroundings as heat or work. Without this bookkeeping, calorimetry, thermochemistry, and enthalpy would have no foundation. This article builds the law from a definition of internal energy as a state function. You will see the equation derived from that idea. Then you will see it applied to two fully numeric examples. Finally you will see the traps that catch nearly every beginner, especially sign conventions.
- The First Law states : internal energy changes only through heat and work exchanged with the surroundings.
- Internal energy is a state function — its change depends only on initial and final states, never on the path taken.
- Heat and work are path functions; their individual values depend on how a process is carried out.
- The law is a statement of energy conservation applied to thermodynamic systems, isolated or otherwise.
- For an isolated system, and , so exactly.
- Key idea: even though heat and work separately depend on the path between two states, their sum always equals the same fixed change in internal energy.
Internal energy is a state function, so although heat and work individually depend on the path taken between two states, their sum is path-independent and equals — this single fact is what makes thermodynamic bookkeeping possible.
The physical picture
Imagine a gas sealed in a cylinder fitted with a frictionless, movable piston. The gas has some total internal energy : the sum of the kinetic energies of its molecules tumbling and colliding, plus the potential energies stored in their intermolecular interactions and bond vibrations. You cannot measure directly — there is no "energy-meter" — but you can measure how it changes when the system interacts with its surroundings. There are exactly two channels for that exchange. Heat, , is energy transferred because of a temperature difference — molecules on the hot side jostle molecules on the cold side, transferring kinetic energy through collisions. Work, , is energy transferred through organized, directional motion — a piston pushing outward against an opposing pressure, a shaft turning, an electric charge moving through a potential difference. The First Law says these two channels account for all of the change in :
The crucial subtlety is that and are not properties of the system — they are properties of the process. Compress a gas quickly and irreversibly, or slowly and reversibly, between the same two states, and and will differ between the two paths. Yet , the change in internal energy, comes out identical every time. That invariance is the operational meaning of "state function," and it is the entire reason the First Law is useful rather than merely descriptive.
Notice in the figure that Path 1 gives J, and Path 2 gives J. Different splits, same total — because only cares about endpoints.
The core relations
where is the change in internal energy, is heat absorbed by the system (positive when entering), and is work done on the system (positive when energy is added this way; this is the IUPAC sign convention used throughout physical chemistry).
where the denotes an exact differential (path-independent) and the denotes inexact differentials (path-dependent quantities that only become path-independent once summed).
where an isolated system exchanges neither heat nor work with its surroundings, so its internal energy is strictly constant.
where the internal energy returns exactly to its starting value after any cyclic process — the defining test of a state function.
Goal. Show that defining as a state function, combined with conservation of energy, forces the relation for any process.
Step 1. Start from conservation of energy. Total energy in the universe is conserved. Partition the universe into "system" plus "surroundings." Any energy that leaves the surroundings must enter the system, and vice versa. Classify all such transfers into exactly two categories: heat (transfer driven by a temperature gradient) and work (transfer driven by an organized force acting through a displacement, or equivalent generalized forces such as electrical or magnetic).
Step 2. Define internal energy operationally. Let be the total energy contained within the system — translational, rotational, vibrational, and potential energy of its particles — excluding overall bulk kinetic and potential energy of the system as a whole (those belong to mechanics, not thermodynamics). By hypothesis, is a well-defined property of the system's state: fix temperature, pressure, composition, and phase, and is fixed.
Step 3. Apply energy conservation to an infinitesimal step. During an infinitesimal change, the system receives infinitesimal heat and infinitesimal work from the surroundings. Since these are the only two channels (Step 1), and since energy conservation forbids energy from appearing or vanishing,
Step 4. Integrate along an arbitrary path. For a finite process taking the system from state 1 to state 2 along any path,
The left-hand integral evaluates to regardless of path, because is a state function (Step 2). The right-hand integrals, and individually, generally do depend on the path chosen — different routes redistribute how much energy travels as heat versus work.
Step 5. Confirm consistency via a thought experiment. Suppose two different paths between the same states 1 and 2 gave different values of . Then you could construct a cycle: go from 1 to 2 via path A, then back from 2 to 1 via path B. If , the cycle would produce a net change in despite returning the system to its original state — meaning you could extract unlimited energy by cycling forever. This contradicts both the observed constancy of state properties and energy conservation. Hence must be identical for every path connecting the same two states, cementing as a genuine state function.
Step 6. Assemble the boxed result.
valid for any process connecting two equilibrium states, with and individually path-dependent but their sum path-independent.
Worked examples
Example 1 — Foundational: electrical heating of a rigid container. A rigid, insulated metal box contains 2.00 mol of an ideal monatomic gas. An electrical heater inside the box does 350 J of electrical work on the gas (stirring/resistive heating counts as work done on the system, since it is organized electrical energy, not a temperature-driven transfer). The box is rigid, so the gas cannot expand or contract — no pressure–volume work is exchanged with the surroundings. The box is perfectly insulated, so no heat escapes. Step 1: identify q and w. Rigid walls mean the volume cannot change, so . The only work is the 350 J of electrical work done on the gas, so J (IUPAC convention: positive when done on the system). Insulated walls mean . Step 2: apply the First Law.
Step 3: sanity check via temperature rise. For a monatomic ideal gas, , so
Solve for :
A 14 K rise from 350 J of stirring in 2 mol of gas is physically reasonable — this is exactly the mechanism (mechanical/electrical work converting to thermal energy) behind Joule's classic paddle-wheel experiments that first demonstrated the mechanical equivalent of heat.
Example 2 — Applied: gas expansion doing work while absorbing heat. A sample of gas in a cylinder absorbs 750 J of heat from a hot reservoir. As it absorbs this heat, it expands against a constant external pressure and in doing so performs 480 J of work on the surroundings (pushing the piston outward). Step 1: assign signs carefully. Heat flows into the system: J. The system does work on the surroundings, so energy leaves the system through the work channel: J (IUPAC convention — work done by the system is negative ). Step 2: apply the First Law.
Step 3: interpret physically. Even though the gas gave up 480 J to push the piston, it absorbed more than enough heat (750 J) to cover that expenditure and still increase its internal energy by 270 J. If instead the gas had absorbed only 400 J of heat while doing 480 J of work, would be J — the gas would cool internally despite absorbing heat, because it "spent" more energy pushing the piston than it "earned" from the reservoir. This illustrates why alone never tells you how changes; you must always close the energy balance with . Step 4: extension check (path independence). If this same net change, J, were instead achieved by a rapid irreversible expansion doing only 300 J of work, the First Law demands J of heat absorbed — a different heat and work pair, same , exactly as path independence requires.
Limiting cases & common traps
| Situation | Consequence for the First Law |
|---|---|
| Isolated system (no heat or work exchange) | , , so exactly |
| Adiabatic process (thermally insulated only) | , so |
| Rigid, non-stirred container | (no expansion work), so |
| Cyclic process (returns to start) | over the full cycle, even though and individually |
| Ideal gas, constant temperature | since depends only on for an ideal gas |
The chemist behind it
The First Law's chemical form owes an enormous debt to Germain Hess, whose 1840 law of constant heat summation showed that the heat of an overall chemical reaction is the same regardless of the number of intermediate steps — an early, purely empirical chemical statement of path-independence for energy changes in reactions at constant pressure. Hess established this before the general First Law was even formulated by Joule, Helmholtz, and Clausius in the 1840s–1850s, making his thermochemical measurements a striking chemical anticipation of a universal physical law.
Origins · 1 minGermain Henri Hess and how this was discovered
Ask the tutor: How does defining enthalpy as simplify heat measurements at constant pressure?
Why is internal energy called a "state function" but heat and work are not?
A state function depends only on the current equilibrium state of a system — its temperature, pressure, volume, and composition — not on how the system got there. Internal energy fits this: two samples of gas at the same , , and composition have the same , regardless of history. Heat and work, by contrast, are measures of energy in transit during a specific process. The same overall change in can be achieved with many different combinations of and , so neither one alone is fixed by the endpoints — only their sum is.
Does the First Law forbid perpetual motion machines?
Yes, specifically machines of the "first kind," which would produce more energy output than they consume with no other source. Because for any process, and over any complete cycle, a device cannot output more work than the heat and work put into it over a full cycle. Any claimed device that violates this is, by definition, creating energy from nothing, which the First Law strictly forbids regardless of the mechanism proposed.
How does the First Law connect to enthalpy, which I have not covered yet?
Enthalpy is defined as , a bookkeeping convenience for processes at constant pressure, where expansion work is automatically absorbed into the definition. It is built directly on the First Law: because is a state function and , are state functions, is guaranteed to be a state function too. You will meet this formally in the next topic, but the underlying justification is exactly the state-function argument developed here.
Is w always negative when a gas expands?
Using the IUPAC convention adopted here, yes: when a system does work on its surroundings, such as gas pushing back a piston during expansion, is negative because energy leaves the system through that channel. Some older texts use the opposite convention, , where is defined as work done by the system and is positive for expansion. Always check which convention a textbook or problem uses before assigning signs, since this is the single most common source of sign errors.
Can ΔU be zero even if q and w are both nonzero?
Yes, and this happens constantly. Any cyclic process returns the system to its starting state, so over the full cycle, even though heat was absorbed and work was done at various stages along the way. Isothermal expansion of an ideal gas is another example: depends only on for an ideal gas, so if is constant, even though the gas absorbs heat and does work simultaneously, with exactly.