State Functions and Path Functions

Climb a mountain by the steep north face or the gentle switchback trail. Either way, you end at the same summit, and your net change in altitude is identical. But your legs know the difference: the sweat and fatigue depend entirely on the path you took. This simple contrast — altitude versus exertion — is the heart of one of thermodynamics' most powerful ideas. Chemists need this distinction constantly. It tells us why internal energy and enthalpy can be tabulated in reference books, while heat and work cannot. It explains why chemists invent clever indirect routes, like Hess's law cycles, to calculate reaction enthalpies without ever running the reaction directly. This article defines state functions and path functions precisely. It introduces the mathematical tool that separates them: exact versus inexact differentials. You will see the physical picture, the core relations, and two fully worked examples. The ideas here set up everything that follows on work, heat, and internal energy.

Key takeaways
  • A state function depends only on the current state of a system, not on how that state was reached.
  • A path function depends on the specific route taken between two states.
  • Pressure, temperature, volume, internal energy, and enthalpy are state functions.
  • Heat and work are path functions; they are not properties of a state at all.
  • Exact differentials integrate to a state-function difference; inexact differentials do not.
  • Key idea: if a quantity's change is the same for every path between two fixed endpoints, it is a state function, and its infinitesimal change is an exact differential.
The core insight

A state function is a property whose value is fixed once the state of the system is fixed, so its change between two states is path-independent and given by simple subtraction of endpoint values, whereas quantities like heat and work depend on the process itself and must be calculated by integrating along the actual path taken.

The physical picture

Consider one mole of an ideal gas that starts at p1=1.00p_1 = 1.00 bar, V1=24.79V_1 = 24.79 L, T1=298T_1 = 298 K, and ends at p2=2.00p_2 = 2.00 bar, V2=12.40V_2 = 12.40 L, T2=298T_2 = 298 K (an isothermal compression). There are infinitely many ways to get from state 1 to state 2: a single-step compression against constant external pressure, a slow reversible compression, or a two-step process that first cools then reheats. The temperature, pressure, and volume at the end are identical in every case, so quantities built from them — internal energy UU, enthalpy HH, entropy SS — end up with the same total change no matter which route was used. Contrast this with the work done on the gas. Squeezing it in one abrupt step against a large constant external pressure does more work on the surroundings' account books than compressing it slowly and reversibly in tiny increments (this is developed quantitatively in the discussion of reversible versus irreversible work). The heat exchanged along the way differs correspondingly, because the First Law ties them together. Neither heat nor work has a "value" that belongs to state 1 or state 2 alone — they are properties of the journey, not the destination. A useful way to think about this: state functions are like altitude on a mountain — a single number attached to each location. Path functions are like the distance walked or the calories burned — they depend on the trail chosen, even between the same two endpoints. Systems, surroundings, and boundaries (covered earlier) define what we track; state versus path functions tell us how the properties of that system behave.

Figure
Two paths between the same two states, same ΔU, different q and w
Same start and end state, two different paths State 1: p₁=1.00 bar, V₁=24.79 L State 2: p₂=2.00 bar, V₂=12.40 L Path A (single-step): w_A, q_A Path B (two-step): w_B, q_B ΔU = q_A + w_A = q_B + w_B, but q_A ≠ q_B and w_A ≠ w_B individually

The core relations

ΔX=X2−X1(same for every path, if X is a state function)\Delta X = X_2 - X_1 \quad \text{(same for every path, if } X \text{ is a state function)}

where: XX stands for any state function such as UU, HH, SS, pp, VV, or TT; the change depends only on endpoints 1 and 2.

∮dX=0\oint dX = 0

where: the cyclic integral of an exact differential vanishes because the system returns to its starting state.

q=∫pathδq,w=∫pathδwq = \int_{\text{path}} \delta q, \qquad w = \int_{\text{path}} \delta w

where: δq\delta q and δw\delta w denote inexact differentials of heat and work; the notation δ\delta (rather than dd) flags that these are not exact differentials of any state function.

ΔU=q+w\Delta U = q + w

where: this is the First Law; ΔU\Delta U is path-independent even though qq and ww individually are not.

dX=(∂X∂p)Tdp+(∂X∂T)pdTis exact if(∂∂T(∂X∂p)T)p=(∂∂p(∂X∂T)p)TdX = \left(\frac{\partial X}{\partial p}\right)_T dp + \left(\frac{\partial X}{\partial T}\right)_p dT \quad \text{is exact if} \quad \left(\frac{\partial}{\partial T}\left(\frac{\partial X}{\partial p}\right)_T\right)_p = \left(\frac{\partial}{\partial p}\left(\frac{\partial X}{\partial T}\right)_p\right)_T

where: this is the Euler reciprocity (mixed second-derivative) test for exactness, applicable to any state function X(p,T)X(p,T).

Derivation AWhy exactness guarantees path independence

Goal. Show that if dXdX is an exact differential, the integral of dXdX between two fixed states is identical for every path connecting them, while an inexact differential δq\delta q generally is not.

Step 1. Suppose XX is a well-defined function of two independent variables, say X(p,V)X(p, V), describing the state of a closed system with fixed composition. Its total differential is by definition

dX=(∂X∂p)Vdp+(∂X∂V)pdV.dX = \left(\frac{\partial X}{\partial p}\right)_V dp + \left(\frac{\partial X}{\partial V}\right)_p dV.

Because XX is a genuine mathematical function of pp and VV, this differential automatically satisfies Euler's reciprocity relation: the mixed partial derivatives are equal regardless of order of differentiation. This is a property of any well-behaved function, not an extra assumption.

Step 2. Integrate dXdX along an arbitrary path Γ\Gamma from state 1 (p1,V1)(p_1, V_1) to state 2 (p2,V2)(p_2, V_2):

∫ΓdX=X(p2,V2)−X(p1,V1).\int_\Gamma dX = X(p_2, V_2) - X(p_1, V_1).

This follows directly from the fundamental theorem of calculus for line integrals: because dXdX is the differential of an actual scalar function XX, the integral telescopes to the difference of the function's values at the endpoints. The specific route taken by Γ\Gamma never enters the right-hand side.

Step 3. Therefore, for two different paths Γ1\Gamma_1 and Γ2\Gamma_2 joining the same states 1 and 2,

∫Γ1dX=∫Γ2dX=X2−X1,\int_{\Gamma_1} dX = \int_{\Gamma_2} dX = X_2 - X_1,

so the change in XX is identical for both paths. Equivalently, going around any closed loop (state 1 back to state 1) gives ∮dX=0\oint dX = 0.

Step 4. Now consider heat, δq\delta q. There is no function q(p,V)q(p, V) whose differential reproduces δq\delta q in general — heat is defined operationally as energy transferred by virtue of a temperature difference, and its magnitude depends on how the process is carried out (reversibly or irreversibly, at constant pp or constant VV, and so on). No reciprocity relation of the form in Step 1 holds for δq\delta q written as a combination of dpdp and dVdV; the "mixed partial derivative" test fails. Consequently

∫Γ1δq≠∫Γ2δqin general,\int_{\Gamma_1} \delta q \neq \int_{\Gamma_2} \delta q \quad \text{in general},

even though both integrals start and end at the same states 1 and 2. The same argument applies to δw\delta w.

Step 5. Combine with the First Law, dU=δq+δwdU = \delta q + \delta w. Experiment (Joule's and later, more precise, calorimetric work) shows that dUdU is exact — the sum δq+δw\delta q + \delta w always integrates to the same ΔU\Delta U for a given pair of states, even though the two pieces individually vary path by path. This is the deep empirical content of the First Law: heat and work are individually path functions, but a specific linear combination of them is not.

ΔU=∫ΓdU=U2−U1 (any path),qΓ and wΓ individually depend on Γ\boxed{\Delta U = \int_{\Gamma} dU = U_2 - U_1 \ \text{(any path)}, \qquad q_\Gamma \text{ and } w_\Gamma \ \text{individually depend on } \Gamma}

Worked examples

Example 1 — Confirming path independence of ΔU\Delta U for an ideal gas, two different routes. Take 1.00 mol of an ideal monatomic gas (CV,m=32RC_{V,m} = \tfrac{3}{2}R) at T1=300T_1 = 300 K, V1=10.0V_1 = 10.0 L. It is taken to T2=300T_2 = 300 K, V2=20.0V_2 = 20.0 L (isothermal expansion, so ΔT=0\Delta T = 0) by two different routes. Route A: reversible isothermal expansion. For an ideal gas, UU depends only on TT, so

ΔUA=nCV,m ΔT=(1.00 mol)(32)(8.314 J K−1mol−1)(0 K)=0 J.\Delta U_A = n C_{V,m}\,\Delta T = (1.00\ \text{mol})\left(\tfrac{3}{2}\right)(8.314\ \text{J K}^{-1}\text{mol}^{-1})(0\ \text{K}) = 0\ \text{J}.

The reversible work is

wA=−nRTln⁡V2V1=−(1.00)(8.314)(300)ln⁡(20.010.0)=−(2494.2 J)(0.6931)=−1729 J.w_A = -nRT\ln\frac{V_2}{V_1} = -(1.00)(8.314)(300)\ln\left(\frac{20.0}{10.0}\right) = -(2494.2\ \text{J})(0.6931) = -1729\ \text{J}.

From the First Law, qA=ΔUA−wA=0−(−1729 J)=+1729q_A = \Delta U_A - w_A = 0 - (-1729\ \text{J}) = +1729 J. Route B: free expansion (against zero external pressure) then isothermal. Suppose instead the gas first expands freely (irreversibly) from 10.0 L to 20.0 L doing no work (w=0w = 0, and for an ideal gas q=0q=0 too, since TT is unchanged and there's no restoring pressure), landing at the same final state.

ΔUB=nCV,m ΔT=0 J(same final T),\Delta U_B = n C_{V,m}\,\Delta T = 0\ \text{J} \quad (\text{same final } T),
wB=0 J,qB=ΔUB−wB=0 J.w_B = 0\ \text{J}, \qquad q_B = \Delta U_B - w_B = 0\ \text{J}.

Check: ΔUA=ΔUB=0\Delta U_A = \Delta U_B = 0 J — identical, confirming UU is a state function. But wA=−1729w_A = -1729 J while wB=0w_B = 0 J, and qA=+1729q_A = +1729 J while qB=0q_B = 0 J — completely different. This is exactly the behavior expected: the state function's change is route-independent; the path functions are not.

Example 2 — Using path independence to find an unmeasurable ΔH via a Hess's-law cycle. Suppose we want ΔH\Delta H for the direct reaction

C(graphite)+12O2(g)⟶CO(g)\text{C(graphite)} + \tfrac{1}{2}\text{O}_2(g) \longrightarrow \text{CO}(g)

which cannot be measured cleanly by direct combustion (some CO always further oxidizes to CO₂ in a bomb calorimeter). Because HH is a state function, we may instead combine two measurable reactions that connect the same overall reactants and products, regardless of the mechanistic path. Given (standard enthalpies of combustion/formation, 298 K):

(i)C(graphite)+O2(g)→CO2(g),ΔHi∘=−393.5 kJ mol−1\text{(i)}\quad \text{C(graphite)} + \text{O}_2(g) \rightarrow \text{CO}_2(g), \qquad \Delta H_i^\circ = -393.5\ \text{kJ mol}^{-1}
(ii)CO(g)+12O2(g)→CO2(g),ΔHii∘=−283.0 kJ mol−1\text{(ii)}\quad \text{CO}(g) + \tfrac{1}{2}\text{O}_2(g) \rightarrow \text{CO}_2(g), \qquad \Delta H_{ii}^\circ = -283.0\ \text{kJ mol}^{-1}

Reverse reaction (ii) to put CO₂ on the left and CO on the right (reversing flips the sign):

CO2(g)→CO(g)+12O2(g),ΔH=+283.0 kJ mol−1.\text{CO}_2(g) \rightarrow \text{CO}(g) + \tfrac{1}{2}\text{O}_2(g), \qquad \Delta H = +283.0\ \text{kJ mol}^{-1}.

Add this to reaction (i). The CO₂ produced in (i) is exactly consumed here, and the O2\text{O}_2 partially cancels (1−12=121 - \tfrac12 = \tfrac12 mol O₂ net), leaving

C(graphite)+12O2(g)→CO(g),\text{C(graphite)} + \tfrac{1}{2}\text{O}_2(g) \rightarrow \text{CO}(g),
ΔH∘=ΔHi∘+(−ΔHii∘)=(−393.5 kJ mol−1)+(+283.0 kJ mol−1)=−110.5 kJ mol−1.\Delta H^\circ = \Delta H_i^\circ + (-\Delta H_{ii}^\circ) = (-393.5\ \text{kJ mol}^{-1}) + (+283.0\ \text{kJ mol}^{-1}) = -110.5\ \text{kJ mol}^{-1}.

Sanity check: the accepted literature value for ΔfH∘(CO,g)\Delta_f H^\circ(\text{CO}, g) is −110.5-110.5 kJ mol⁻¹, matching perfectly. This works only because HH is a state function: the enthalpy change for going from graphite plus oxygen to CO is the same whether the reaction proceeds directly (impossible to measure) or via the two-step cycle through CO₂ (both steps independently measurable). If HH were a path function like qq alone, this substitution trick would be mathematically illegitimate.

Limiting cases & common traps

SituationCorrect view
Ideal gas, isothermal processΔU=0\Delta U = 0 always, but qq and ww are generally nonzero and route-dependent
Cyclic process (system returns to start)ΔU=ΔH=ΔS=0\Delta U = \Delta H = \Delta S = 0, but net qq and net ww need not be zero
Constant-pressure processqp=ΔHq_p = \Delta H only under these specific conditions — this makes qq look state-function-like, but it is a special-case equality, not a general one
Constant-volume processqV=ΔUq_V = \Delta U, again only under these specific conditions, with no non-expansion work
Reversible vs irreversible between same statesΔU\Delta U, ΔH\Delta H, ΔS\Delta S identical; qrev≠qirrevq_{rev} \neq q_{irrev} and wrev≠wirrevw_{rev} \neq w_{irrev}

The chemist behind it

The formal separation of state functions from path functions grew out of nineteenth-century arguments about heat engines and the nature of heat itself, but it was Rudolf Clausius who gave the concept its sharpest mathematical form. Building on Sadi Carnot's engine analysis and James Joule's mechanical-equivalent-of-heat experiments, Clausius recognized that while heat and work individually depend on process details, their sum — internal energy — behaves as a true function of state. He pushed the idea further by identifying an inexact differential, δqrev/T\delta q_{rev}/T, that becomes exact when divided by temperature along a reversible path, defining what he named entropy. That later development builds directly on the exact/inexact distinction introduced here.

Origins · 1 minRudolf Clausius and how this was discovered
RC
Rudolf Clausius
1822–1888 · German physicist who formalized the First and Second Laws and coined the term "entropy"

Ask the tutor: Can you show me how reversible versus irreversible compression of the same gas gives different work values, even though ΔU is identical?

What exactly makes a differential "exact"?

A differential dXdX is exact if it is the total differential of some genuine function XX of the state variables — meaning its line integral between two points is path-independent and depends only on the endpoints. Mathematically, this is tested via Euler reciprocity: mixed second partial derivatives of XX must be equal regardless of the order of differentiation. If no such underlying function exists, the differential is "inexact," written with δ\delta instead of dd, and its integral genuinely depends on the path chosen, as is the case for heat and work.

Is enthalpy always a state function, even for irreversible processes?

Yes. Enthalpy is defined as H=U+pVH = U + pV, and since UU, pp, and VV are all state functions, any combination of them is also a state function, regardless of whether the process connecting two states is reversible or irreversible. The change ΔH\Delta H between two equilibrium states is fixed by those states alone. What changes with reversibility is whether qpq_p (heat at constant pressure) numerically equals ΔH\Delta H, which requires no non-expansion work being done.

Why can't we just define a "state function" version of heat?

Heat is fundamentally a mode of energy transfer across a boundary, not a property possessed by a system in a given state. A system does not "contain" heat; it contains internal energy. Asking how much heat a system "has" is like asking how much distance a mountain "has" rather than how much distance a hiker walked to reach its summit. Only under the special lens of reversible transfer divided by temperature does a path-dependent quantity like δqrev\delta q_{rev} become the exact differential of a new state function, entropy.

How does this connect to Hess's law?

Hess's law is simply the statement that enthalpy (and internal energy) are state functions, applied to chemical reactions. Because ΔH\Delta H for going from reactants to products depends only on the identities and states of reactants and products, not on the reaction mechanism, chemists can add up enthalpies of intermediate steps — even hypothetical ones — to get the enthalpy of an overall reaction. This is exactly the calculation used in Example 2 to find ΔfH∘\Delta_f H^\circ of carbon monoxide.

Does path independence mean the process itself doesn't matter physically?

Not at all. The process matters enormously for heat, work, entropy production, and efficiency — reversible and irreversible paths between the same two states can have wildly different qq and ww, and only reversible paths achieve the maximum possible work extraction. Path independence applies strictly to state functions like UU, HH, and SS. The physical journey is still where all the interesting engineering and chemistry happens; it just doesn't affect the endpoint values of state properties.

Before this

Where this leads