The First Law of Thermodynamics

Energy cannot appear from nowhere or vanish into nothing. That single idea, applied to chemical systems, is the First Law of Thermodynamics. It says that whenever a system's internal energy changes, the change is fully accounted for. This accounting involves heat exchanged with surroundings and work done on or by the system. This article builds the quantity called internal energy (EE). It defines the sign conventions chemists use for Energy, Heat, and Work. It also shows how ΔE=q+w\Delta E = q + w lets you track energy through reactions, expansions, and compressions. Nothing is left unexplained. The power of the First Law lies in a subtlety: internal energy is a state function, but heat and work individually are not. A system can get from state A to state B by an infinite number of paths. These paths may be fast or slow, with a piston or without one. Along different paths, qq and ww will differ. Yet their sum, ΔE\Delta E, is always the same. This distinction is the conceptual seed for a later idea. It grows into Enthalpy and Enthalpy of Reaction. There, chemists trade internal energy for a more convenient bookkeeping variable. This variable suits constant-pressure laboratory conditions.

Key takeaways
  • Internal energy EE is the total kinetic and potential energy of all particles in a system; only changes in EE are measurable.
  • The First Law: ΔE=q+w\Delta E = q + w, where qq is heat added to the system and ww is work done on the system.
  • EE is a state function (path-independent); qq and ww are not — only their sum is.
  • Work of expansion against constant external pressure is w=−PΔVw = -P\Delta V.
  • For an isolated system, ΔE=0\Delta E = 0 always — energy only moves around, never appears or disappears.
  • Key idea: total energy is conserved exactly; qq and ww are simply the two channels through which energy crosses a system's boundary.
The core insight

The First Law of Thermodynamics states that the internal energy of an isolated system is constant; for any system, ΔE=q+w\Delta E = q + w, with EE path-independent and qq, ww individually path-dependent.

The physical picture

Picture a chemical system — say, gas trapped in a cylinder with a movable piston, or the contents of a coffee-cup calorimeter. That system has some internal energy EE: the sum of every kinetic energy (translational, rotational, vibrational motion of molecules) and every potential energy (bond energies, intermolecular attractions, electron configurations) inside it. You can never measure the absolute value of EE — there is no zero to calibrate against — but you can always measure a change, ΔE=Efinal−Einitial\Delta E = E_{\text{final}} - E_{\text{initial}}, because changes correspond to real, detectable energy flows. Energy crosses the boundary of a system in exactly two ways: as heat (qq), driven by a temperature difference, or as work (ww), driven by a force acting through a distance. The First Law is the bookkeeping statement that these two flows are the only ways EE can change, and that they add algebraically:

ΔE=q+w\Delta E = q + w

The sign convention (IUPAC/thermochemistry convention used throughout general chemistry) is fixed from the system's point of view:

  • q>0q > 0: heat flows into the system (endothermic input) — the system gains energy.
  • q<0q < 0: heat flows out of the system (exothermic release) — the system loses energy.
  • w>0w > 0: work is done on the system (surroundings compress it) — the system gains energy.
  • w<0w < 0: work is done by the system (it expands, pushing back the surroundings) — the system loses energy.

Every term is measured in joules (or kilojoules), and all three quantities in the equation share the same sign logic: positive means energy entering the system, negative means energy leaving.

Figure
Energy flow across a system boundary: heat and work are the only two channels
System internal energy E q > 0 (heat in) w > 0 (work done on system) q < 0 (heat out) w < 0 (system expands, does work) ΔE = q + w (joules)

A second picture makes the path-independence of EE concrete. Suppose a gas expands from an initial state (volume V1V_1, pressure P1P_1) to a final state (V2V_2, P2P_2). It can get there by two different routes on a pressure–volume diagram — a direct diagonal path or a two-step "down-then-across" path. The areas under these paths, which represent −w-w (work done by the gas), differ. Yet if the initial and final temperatures (and hence internal energies) are the same in both cases, ΔE\Delta E must be identical for both routes — meaning qq compensates exactly for whatever ww does differently.

Figure
Two different paths between the same initial and final states give different q and w, but the same ΔE
V (L) P (atm) State 1 (2.0 L, 5.0 atm) State 2 (6.0 L, 2.0 atm) Path A (direct) Path B (expand, then cool) Same ΔE for both paths — only q and w differ between A and B

The core relations

ΔE=q+w\Delta E = q + w

where: ΔE\Delta E is the change in internal energy of the system (J or kJ), qq is heat added to the system (positive if absorbed), and ww is work done on the system (positive if the surroundings compress it).

w=−Pext ΔVw = -P_{\text{ext}}\,\Delta V

where: PextP_{\text{ext}} is the (constant) external pressure resisting or driving the volume change, and ΔV=Vfinal−Vinitial\Delta V = V_{\text{final}} - V_{\text{initial}} is the volume change of the system. The negative sign encodes the convention that an expanding system (ΔV>0\Delta V > 0) does work on the surroundings, so it loses energy (w<0w < 0).

ΔEisolated system=0\Delta E_{\text{isolated system}} = 0

where: an isolated system exchanges neither heat nor work with its surroundings, so its internal energy is exactly constant — this is the strict statement of energy conservation.

Derivation ABuilding ΔE = q + w and the sign of expansion work

Goal. Show why internal energy changes must equal the sum of heat and work, and derive the specific form of work for a gas expanding or compressing against constant external pressure.

Step 1. Start from conservation of energy. Consider a system with internal energy EE, sealed off from the rest of the universe except for two possible energy-exchange channels: heat and work. Total energy — system plus surroundings — cannot change, because there is nothing outside "the universe" for energy to escape to or arrive from. So whatever energy the surroundings lose, the system gains, and vice versa.

Step 2. Define the two channels precisely. Energy transferred by a temperature difference (random molecular collisions at a boundary) is called heat, qq. Energy transferred by a force acting through a displacement (an organized, directional push) is called work, ww. Because these are the only two mechanisms available to a chemical system, the total change in the system's internal energy is their sum:

ΔE=q+w\Delta E = q + w

This is not a separate assumption — it is the definition of qq and ww as complementary categories that together exhaust every way energy can cross a boundary.

Step 3. Specialize to expansion/compression work. Suppose the system is a gas in a cylinder fitted with a frictionless piston of cross-sectional area AA, pushing against a constant external pressure PextP_{\text{ext}}. The force resisting the piston is

F=Pext A.F = P_{\text{ext}} \, A .

If the piston moves outward a distance dd, the gas has done work on the surroundings equal to force times distance:

wby gas=F⋅d=PextA⋅d.w_{\text{by gas}} = F \cdot d = P_{\text{ext}} A \cdot d .

Step 4. Convert distance into volume change. The volume swept by the piston is ΔV=A⋅d\Delta V = A \cdot d (cross-sectional area times distance moved), so

wby gas=Pext ΔV.w_{\text{by gas}} = P_{\text{ext}} \, \Delta V .

This is the magnitude of work exchanged; it is always positive when the gas expands (ΔV>0\Delta V > 0), since the gas is pushing outward and expending energy.

Step 5. Apply the sign convention for work done on the system. Chemists track ww as work done on the system, not by it — this keeps ΔE=q+w\Delta E = q + w consistent with qq also being defined as into the system. Work done on the system is the negative of work done by the system:

w=−Pext ΔV.w = -P_{\text{ext}} \, \Delta V .

When the gas expands (ΔV>0\Delta V > 0), w<0w < 0 — the system loses energy by pushing back the surroundings. When the gas is compressed (ΔV<0\Delta V < 0), w>0w > 0 — the surroundings do work on the system, and it gains energy. Both cases match physical intuition: an expanding balloon cools (loses internal energy to the push it exerts) unless heat is added to compensate.

Step 6. Combine to get the working formula. Substituting into the First Law gives the practical equation used for gas-phase and calorimetric problems:

ΔE=q−Pext ΔV.\Delta E = q - P_{\text{ext}}\,\Delta V .

Every term retains its own sign; you must substitute qq, PextP_{\text{ext}}, and ΔV\Delta V with their correct algebraic signs, not just magnitudes.

Worked examples

Example 1 — Gas expanding against constant external pressure, with heat absorbed. A gas inside a cylinder absorbs q=+622 Jq = +622\ \text{J} of heat from its surroundings while expanding from V1=2.40 LV_1 = 2.40\ \text{L} to V2=5.10 LV_2 = 5.10\ \text{L} against a constant external pressure of Pext=1.35 atmP_{\text{ext}} = 1.35\ \text{atm}. Find ΔE\Delta E for the gas, in joules.

Step 1. Find ΔV\Delta V.

ΔV=V2−V1=5.10 L−2.40 L=2.70 L\Delta V = V_2 - V_1 = 5.10\ \text{L} - 2.40\ \text{L} = 2.70\ \text{L}

Step 2. Compute work in L·atm, then convert to joules.

w=−PextΔV=−(1.35 atm)(2.70 L)=−3.645 L ⋅ atmw = -P_{\text{ext}}\Delta V = -(1.35\ \text{atm})(2.70\ \text{L}) = -3.645\ \text{L}\,\cdot\,\text{atm}

Using 1 L ⋅ atm=101.325 J1\ \text{L}\,\cdot\,\text{atm} = 101.325\ \text{J}:

w=−3.645 L ⋅ atm×101.325 JL ⋅ atm=−369.4 Jw = -3.645\ \text{L}\,\cdot\,\text{atm} \times 101.325\ \tfrac{\text{J}}{\text{L}\,\cdot\,\text{atm}} = -369.4\ \text{J}

Step 3. Apply the First Law.

ΔE=q+w=(+622 J)+(−369.4 J)=+252.6 J\Delta E = q + w = (+622\ \text{J}) + (-369.4\ \text{J}) = +252.6\ \text{J}

So the gas's internal energy rises by about 253 J253\ \text{J}: it absorbed more heat than it gave up as expansion work, so there is a net energy gain. As a sanity check on limiting behavior — if the expansion had happened into a vacuum (Pext=0P_{\text{ext}} = 0), then w=0w = 0 and ΔE\Delta E would simply equal q=+622 Jq = +622\ \text{J}; the calculated value (+253+253 J) is correctly smaller than that, since real expansion work subtracts energy.

Example 2 — Compression with heat released. A sample of gas is compressed by a piston from 8.75 L8.75\ \text{L} to 3.20 L3.20\ \text{L} at a constant external pressure of 2.20 atm2.20\ \text{atm}. During the compression, the gas releases q=−845 Jq = -845\ \text{J} of heat to its surroundings. Find ΔE\Delta E, and state whether the gas's internal energy rose or fell.

Step 1. Find ΔV\Delta V.

ΔV=3.20 L−8.75 L=−5.55 L\Delta V = 3.20\ \text{L} - 8.75\ \text{L} = -5.55\ \text{L}

Step 2. Compute work.

w=−PextΔV=−(2.20 atm)(−5.55 L)=+12.21 L ⋅ atmw = -P_{\text{ext}}\Delta V = -(2.20\ \text{atm})(-5.55\ \text{L}) = +12.21\ \text{L}\,\cdot\,\text{atm}

Convert to joules:

w=12.21 L ⋅ atm×101.325 JL ⋅ atm=+1237.2 Jw = 12.21\ \text{L}\,\cdot\,\text{atm} \times 101.325\ \tfrac{\text{J}}{\text{L}\,\cdot\,\text{atm}} = +1237.2\ \text{J}

Step 3. Apply the First Law.

ΔE=q+w=(−845 J)+(+1237.2 J)=+392.2 J\Delta E = q + w = (-845\ \text{J}) + (+1237.2\ \text{J}) = +392.2\ \text{J}

The gas's internal energy increases by about 392 J392\ \text{J}, even though it released heat — because the surroundings did substantially more work compressing it than it lost as heat. This illustrates why you cannot judge the sign of ΔE\Delta E from qq alone: work and heat must always be combined. As a check, if compression had been so gentle that no net work were transferred (ΔV→0\Delta V \to 0), ΔE\Delta E would reduce to just q=−845 Jq = -845\ \text{J} — confirming the formula collapses correctly to the no-work limit.

Limiting cases & common traps

SituationWhat happens to ΔE=q+w\Delta E = q + wCommon trap
Isolated system (no heat or work exchange)ΔE=0\Delta E = 0 exactlyConfusing "isolated" with "constant temperature" — they are not the same
Constant volume, ΔV=0\Delta V = 0w=0w = 0, so ΔE=qV\Delta E = q_VForgetting that w=0w=0 only holds if volume truly doesn't change
Expansion into a vacuum (Pext=0P_{\text{ext}}=0)w=0w = 0 regardless of ΔV\Delta VAssuming work is done whenever volume changes — it isn't, if there's nothing to push against
System does work (expands)w<0w < 0Sign-flipping: some texts define ww as work done by the system, giving ΔE=q−w\Delta E = q - w — always check which convention is in use
Cyclic process (system returns to start)ΔEcycle=0\Delta E_{\text{cycle}} = 0, but qcycle≠0q_{\text{cycle}} \neq 0 and wcycle≠0w_{\text{cycle}} \neq 0 in generalAssuming q=0q=0 and w=0w=0 separately just because ΔE=0\Delta E=0

The chemist behind it

The First Law's roots lie less in chemistry than in a mid-19th-century argument about whether heat is a substance ("caloric") or a form of energy transfer. Careful experiments — most famously the mechanical-equivalent-of-heat measurements relating mechanical work to temperature rise in water — established that heat and work are interconvertible and quantitatively equivalent, cementing energy as a single conserved quantity rather than heat being a separate indestructible fluid. This resolved centuries of confusion and gave Energy, Heat, and Work their modern, unified meaning: two different currencies of the same conserved quantity, energy. The law was rapidly absorbed into chemistry because reactions constantly exchange heat and, when gases are produced or consumed, also do pressure–volume work. Recognizing internal energy as a state function let chemists define new, more convenient state functions — enthalpy chief among them — that isolate the heat term at constant pressure, the condition under which almost all bench chemistry happens. That step is the direct bridge into Enthalpy and Enthalpy of Reaction.

Origins · 1 minJames Prescott Joule and how this was discovered
JP
James Prescott Joule
1818–1889 · Established the mechanical equivalent of heat through precise calorimetric experiments, providing the quantitative backbone that let Clausius and others formalize energy conservation as the First Law of Thermodynamics

Ask the tutor: If a reaction happens at constant pressure and releases both heat and does expansion work on the surroundings, how do chemists combine these into the single quantity called enthalpy?

Is internal energy the same thing as heat?

No. Internal energy EE is a property of the system — the total kinetic and potential energy stored in its particles at any instant. Heat qq is not a property of the system at all; it is a quantity of energy in transit across the system's boundary, driven by a temperature difference. You can ask "what is the system's internal energy right now?" but never "how much heat does the system contain?" — heat only exists while it is flowing.

Why is ΔE = q + w true for any process, not just gas expansions?

The equation is a statement of energy conservation applied to a system with only two possible transfer channels. The specific formula w=−PΔVw = -P\Delta V is just one particular case — expansion/compression work — used heavily in gas-phase chemistry. Other forms of work (electrical work in a battery, for example) plug into the same ΔE=q+w\Delta E = q + w relationship with a different expression for ww.

If ΔE is path-independent, why bother measuring q and w separately at all?

Because in the lab you can only directly measure qq (with a calorimeter) or ww (from pressure and volume changes) — never ΔE\Delta E itself. The First Law is precisely the tool that converts these two measurable, path-dependent quantities into the path-independent ΔE\Delta E you actually want, letting you compare energy changes across completely different experimental setups.

Does the First Law forbid a perpetual motion machine?

Yes, for the specific kind that would create energy from nothing. A machine that produces more work than the energy fed into it would require ΔE<q+w\Delta E < q + w to be violated during some cycle, contradicting strict conservation. (A separate law, the Second Law, forbids a different kind of perpetual motion — one that would convert heat entirely into work with no other effect — but that is a distinct and additional restriction.)

Why does chemistry usually switch from E to enthalpy H so quickly?

Because most reactions happen open to the atmosphere at constant pressure, not constant volume. At constant pressure, the −PΔV-P\Delta V work term is awkward to track separately every time, so chemists define enthalpy, H=E+PVH = E + PV, so that ΔH\Delta H equals qq directly under constant-pressure conditions. That simplification is developed fully under Enthalpy and Enthalpy of Reaction.