State Variables and the Concept of an Equation of State

Fill a bicycle tire on a cold morning and the gauge reads low. Ride ten minutes and it reads higher. Nothing was added or removed. Only the temperature changed, and the pressure followed. This behavior is not an accident of rubber and air. It reflects a deep fact about matter in bulk. A fixed amount of gas confined to a fixed volume cannot have an arbitrary pressure at an arbitrary temperature. The three quantities are locked together by a functional relation called an equation of state. This article defines the state variables pressure, volume, temperature, and amount of substance. It explains why a small number of variables suffices to describe an equilibrium sample of matter. It introduces the abstract idea of an equation of state before any specific gas law is written down. Boyle's law, Charles's law, and the ideal gas equation all follow as special cases in later articles.

Key takeaways
  • A state variable is a measurable quantity that depends only on the current condition of a system, not on its history.
  • Pressure pp, volume VV, temperature TT, and amount of substance nn are the four state variables needed to describe a simple fluid at equilibrium.
  • For a fixed sample of matter at equilibrium, these four variables are not independent; fixing any three fixes the fourth.
  • An equation of state is the mathematical function f(p,V,T,n)=0f(p, V, T, n) = 0 that encodes this constraint for a given substance.
  • Different substances (ideal gas, real gas, liquid, solid) have different equations of state, but all obey the same logical structure.
  • Key idea: at equilibrium, a sample's macroscopic condition is fully pinned down by a small set of state variables connected through a single functional relation, the equation of state.
The core insight

A state variable characterizes the present condition of a system completely and reproducibly, and for any equilibrium sample of a pure substance the state variables pressure, volume, temperature, and amount are bound together by an equation of state, a function f(p,V,T,n)=0f(p,V,T,n) = 0 that means only three of the four can ever be chosen independently.

The physical picture

Consider a fixed mass of gas sealed inside a rigid metal cylinder fitted with a movable piston and a thermometer. At any instant you could, in principle, measure four things: how hard the gas pushes outward per unit area (pressure pp), how much space it occupies (volume VV), how hot it is (temperature TT), and how much substance is inside (amount of substance nn, in moles). These four numbers are called state variables because each one is a property of the gas's current condition. Neither depends on the sequence of pistons pushes, heatings, or coolings that got the gas there. Two samples of the same gas with identical pp, VV, TT, and nn are in identical thermodynamic states, indistinguishable in every macroscopic respect, no matter how differently they arrived there. This is worth contrasting with quantities that are not state variables. The heat qq supplied to the gas and the work ww done on it during some process both depend on the path taken, not just on the starting and ending states. You can raise a gas's temperature by heating it slowly at constant volume, or by compressing it quickly and briefly, and qq and ww differ between these routes even though the final TT can be the same. Pressure, volume, temperature, and amount, by contrast, are properties you could read off a set of gauges at any single moment, with no reference to the past. A second key distinction is between extensive and intensive state variables. Volume VV and amount of substance nn are extensive: double the size of the system (at fixed density and temperature) and both double. Pressure pp and temperature TT are intensive: they do not depend on how much material is present, only on its condition. Splitting a container of gas in half with a partition leaves pp and TT unchanged in each half, while VV and nn are each halved. This distinction matters because it is the intensive variables that characterize "the state" in the sense of a point on a phase diagram, while the extensive variables set the "size" of the sample. The central experimental discovery underlying this whole subject is that for a pure substance at equilibrium, pp, VV, TT, and nn are not independent. If you fix the amount of gas in the cylinder, fix its volume by clamping the piston, and fix its temperature with a thermostat, the pressure is no longer something you can dial to any value you like. It settles to one particular value, determined by the substance itself. This experimental fact, that only three of the four variables can be chosen freely, is what an equation of state expresses in mathematical form.

Figure
Four state variables of a fixed gas sample in a piston-cylinder
piston n moles gas V (piston position) T (thermometer) p (gauge reading) T f(p,V,T,n)=0 Only 3 of the 4 variables can be chosen freely. The 4th is fixed.

A second useful picture is geometric. Because an equation of state constrains the four variables, the set of physically accessible states for one mole of a substance forms a two-dimensional surface when plotted against pp, VV, and TT (with nn fixed at 1 mol). Every equilibrium state of the substance is a point on this surface; no equilibrium state can lie off it. Different gases and liquids have differently shaped surfaces, but all are surfaces, not solid volumes, because of the single constraint f(p,V,T,n)=0f(p,V,T,n)=0.

Figure
The p-V-T surface as the geometric image of an equation of state
p V T state point (p,V,T) every equilibrium state lies on this surface

The core relations

The general statement of an equation of state for a pure substance is written implicitly, since the exact functional form depends on the material:

f(p,V,T,n)=0f(p, V, T, n) = 0

where: pp = pressure, VV = volume, TT = thermodynamic temperature, nn = amount of substance, and ff is a substance-specific function determined by experiment or theory. Equivalently, because only three variables are independent, the equation of state can be solved for any one of them as a function of the other three, for instance:

p=p(V,T,n)p = p(V, T, n)

where: this expresses pressure as the dependent variable once VV, TT, and nn are all fixed. For one mole of substance (n=1n = 1), it is often convenient to use the molar volume Vm=V/nV_m = V/n, reducing the equation of state to a relation among just three intensive-like quantities:

f(p,Vm,T)=0f(p, V_m, T) = 0

where: VmV_m is volume per mole, an intensive quantity, since it no longer depends on the total sample size. A generic infinitesimal change of state, moving along the equation-of-state surface, can be expressed with partial derivatives using the chain rule of multivariable calculus:

dp=(∂p∂V)T,ndV+(∂p∂T)V,ndT+(∂p∂n)V,Tdndp = \left(\frac{\partial p}{\partial V}\right)_{T,n} dV + \left(\frac{\partial p}{\partial T}\right)_{V,n} dT + \left(\frac{\partial p}{\partial n}\right)_{V,T} dn

where: each partial derivative is the slope of the equation-of-state surface in one direction, holding the other two variables fixed.

Derivation AWhy only three of the four variables are independent

Goal. Show, from the existence of a single equation of state, that specifying any three of pp, VV, TT, nn for a pure substance at equilibrium mathematically determines the fourth.

Step 1. Start from the empirical premise that established this whole subject: for a given pure substance at internal equilibrium, no combination of pp, VV, TT, nn is ever observed to violate some fixed relation. Write this relation abstractly as

f(p,V,T,n)=0.f(p, V, T, n) = 0.

This is not an assumption invented for convenience. It is a compact restatement of a huge body of nineteenth-century experimental work, in which gases held at fixed nn and TT were compressed and their pp always came out the same for the same VV, reproducibly, regardless of how they got there.

Step 2. Suppose an experimenter fixes three of the four variables, say V=V0V = V_0, T=T0T = T_0, and n=n0n = n_0, by clamping the piston, thermostatting the cylinder, and sealing in a measured number of moles. Substitute these fixed values into the equation of state:

f(p,V0,T0,n0)=0.f(p, V_0, T_0, n_0) = 0.

Step 3. This is now a single equation in a single unknown, pp. Provided ff is a well-behaved function (continuous and monotonic in pp over the relevant range, which is true for all real substances away from phase transitions), this equation has one and only one solution for pp. Call it p∗p^*:

p=p∗(V0,T0,n0).p = p^* (V_0, T_0, n_0).

Step 4. The same argument applies no matter which three variables are chosen as the fixed ones. Fixing pp, TT, nn determines a unique VV; fixing pp, VV, nn determines a unique TT; fixing pp, VV, TT determines a unique nn. In each case the equation of state collapses from a four-variable constraint to a one-variable equation once three inputs are supplied.

Step 5. Therefore, of the four quantities pp, VV, TT, nn, only three can be treated as independently adjustable "inputs" to an equilibrium state. The fourth is always the dependent "output," computed (in principle) from the equation of state. This is true regardless of the specific chemical identity of the substance, since the argument used only the existence and well-behavedness of ff, never its detailed form.

Any 3 of {p,V,T,n} fix the equilibrium state; the 4th follows from f(p,V,T,n)=0.\boxed{\text{Any 3 of } \{p, V, T, n\} \text{ fix the equilibrium state; the 4th follows from } f(p,V,T,n)=0.}

Worked examples

Example 1 — Counting independent variables in a laboratory gas cell. A chemistry student has a rigid glass bulb of fixed volume V=1.000 LV = 1.000 \text{ L}, connected to a pressure gauge and immersed in a thermostatted water bath. The bulb is charged with exactly n=0.0400n = 0.0400 mol of a gas. Question: how many of the four state variables pp, VV, TT, nn can the student independently set, and which ones? Reasoning. The bulb is rigid, so VV is fixed by the glassware at 1.0001.000 L; it cannot be adjusted once the bulb is sealed. The amount of gas, n=0.0400n = 0.0400 mol, is fixed the moment the bulb is sealed shut; no more gas can enter or leave. That leaves the water bath thermostat as the only adjustable control: the student can dial the bath to any temperature TT within the apparatus's operating range, say from 273273 K to 373373 K. Because VV and nn are pinned by the hardware, and TT is the one remaining freely adjustable input, the pressure pp is not a free choice. It is determined by the equation of state once TT is set:

p=f−1(V=1.000 L,T,n=0.0400 mol).p = f^{-1}(V=1.000\text{ L}, T, n=0.0400 \text{ mol}).

Numeric check using the later ideal-gas relation (for context only). If this gas obeys pV=nRTpV = nRT (introduced fully in the next article), then at T=298.15T = 298.15 K,

p=nRTV=(0.0400 mol)(8.314 J K−1mol−1)(298.15 K)1.000×10−3 m3.p = \frac{nRT}{V} = \frac{(0.0400 \text{ mol})(8.314 \text{ J K}^{-1}\text{mol}^{-1})(298.15 \text{ K})}{1.000 \times 10^{-3} \text{ m}^3}.

Computing the numerator:

(0.0400)(8.314)(298.15)=99.16 J=99.16 Pa m3.(0.0400)(8.314)(298.15) = 99.16 \text{ J} = 99.16 \text{ Pa m}^3.

Dividing by the volume:

p=99.16 Pa m31.000×10−3 m3=9.916×104 Pa=0.9789 atm.p = \frac{99.16 \text{ Pa m}^3}{1.000\times10^{-3}\text{ m}^3} = 9.916 \times 10^{4} \text{ Pa} = 0.9789 \text{ atm}.

If the student instead raises the bath to T=350.0T = 350.0 K, holding VV and nn fixed, the equation of state forces a new, larger pressure:

p=(0.0400)(8.314)(350.0)1.000×10−3=1.164×105 Pa=1.149 atm.p = \frac{(0.0400)(8.314)(350.0)}{1.000\times10^{-3}} = 1.164\times10^{5} \text{ Pa} = 1.149 \text{ atm}.

The student never touched pp directly. It moved because TT moved, exactly as the equation-of-state logic predicts: with VV and nn locked, only one free variable remains, and everything else is a dependent consequence. Sanity check. Pressure increased when temperature increased at fixed volume and amount, consistent with everyday intuition (a sealed can gets more pressurized when heated). The units resolve cleanly to pascals, and the atm-equivalent values are physically reasonable for a dilute gas near room temperature.

Example 2 — Determining a fourth variable from three others without knowing ff explicitly. Two rigid, well-insulated tanks, A and B, hold the same unknown pure gas. Tank A: VA=2.000V_A = 2.000 L, TA=300.0T_A = 300.0 K, nA=0.0800n_A = 0.0800 mol. Tank B: unknown VBV_B, but TB=300.0T_B = 300.0 K, nB=0.0800n_B = 0.0800 mol, and the gauge reads pB=pAp_B = p_A (identical pressure to tank A). Question: can the student conclude VB=VAV_B = V_A without knowing the specific equation of state of this gas? Reasoning. This tests the logical content of Step 4 in the derivation above, not a specific formula. Tank A and Tank B share the same TT and the same nn. If they also share the same pp, then all three of pp, TT, nn agree between the two tanks. By the argument in Step 3–4, once pp, TT, nn are specified, the equation of state f(p,V,T,n)=0f(p,V,T,n)=0 has a unique solution for VV (assuming ff is monotonic in VV at fixed p,T,np,T,n, true away from phase transitions). Since both tanks satisfy the same triple (p,T,n)(p, T, n), they must give the same VV.

pA=pB, TA=TB, nA=nB  ⟹  VA=VB=2.000 L.p_A = p_B,\ T_A = T_B,\ n_A = n_B \implies V_A = V_B = 2.000 \text{ L}.

Numeric illustration with the ideal-gas relation. Suppose the measured pressure common to both tanks is

p=nARTAVA=(0.0800)(8.314)(300.0)2.000×10−3=199.52.000×10−3=9.978×104 Pa.p = \frac{n_A R T_A}{V_A} = \frac{(0.0800)(8.314)(300.0)}{2.000\times10^{-3}} = \frac{199.5}{2.000\times10^{-3}} = 9.978\times10^{4} \text{ Pa}.

For tank B, solve for VBV_B using the same pp, TT, nn:

VB=nBRTBpB=(0.0800)(8.314)(300.0)9.978×104=199.59.978×104=2.000×10−3 m3=2.000 L.V_B = \frac{n_B R T_B}{p_B} = \frac{(0.0800)(8.314)(300.0)}{9.978\times10^{4}} = \frac{199.5}{9.978\times10^{4}} = 2.000\times10^{-3}\text{ m}^3 = 2.000 \text{ L}.

This confirms VB=2.000V_B = 2.000 L exactly, as the equation-of-state argument required, without ever needing to look up a gas-specific constant beyond what was common to both tanks. Sanity check. The derivation predicted equality of VAV_A and VBV_B purely from equality of (p,T,n)(p,T,n), using no information about which specific gas was in the tanks. The ideal-gas arithmetic reproduces this exactly, confirming the general principle is consistent with a concrete equation of state.

Limiting cases & common traps

SituationCorrect view
"I can set pp, VV, TT, nn all independently."False at equilibrium for a pure substance; only 3 of the 4 are free, the 4th follows from f=0f=0.
Comparing two open, unsealed containersnn may not be fixed (gas can escape), so the usual 3-independent-variable counting needs re-examination.
Near a phase transition (e.g. boiling)ff may not be single-valued in VV at fixed p,T,np,T,n (liquid and vapor coexist at many volumes); the "unique fourth variable" argument in the derivation assumed monotonicity, which fails here.
Mixtures of several gasesExtra state variables (mole fractions of each component) are needed; nn alone is insufficient.
State variable vs. path quantityp,V,T,np,V,T,n depend only on the current state; heat qq and work ww depend on the path and are not state variables.

The chemist behind it

The formal idea that pp, VV, and TT for a fixed amount of gas are bound by a single functional relation, rather than being freely adjustable, crystallized gradually through the seventeenth to nineteenth centuries. Robert Boyle's 1662 experiments on trapped air columns in a J-tube first demonstrated, quantitatively, that pressure and volume trade off against each other at fixed temperature and amount, an early and concrete instance of the more abstract equation-of-state concept formalized much later by clausius and others working on the thermodynamics of gases.

Origins · 1 minRobert Boyle and how this was discovered
RB
Robert Boyle
1627–1691 · Irish natural philosopher whose pneumatic experiments first showed pressure and volume are locked together, not independently free

Wait, correction below.

Ask the tutor: How does the ideal gas law emerge as the simplest possible equation of state, and where exactly does it break down for real gases?

What exactly makes something a "state variable" rather than just a measurable quantity?

A state variable's value depends only on the present equilibrium condition of the system, never on the sequence of steps used to reach it. Pressure, volume, temperature, and amount of substance all satisfy this: read them off gauges at any instant and you get the same numbers regardless of history. Heat and work fail this test because they are measures of energy transferred along a particular path between two states, and two different paths connecting the same initial and final states generally exchange different amounts of each.

Why can't I just pick p, V, T, and n all at once for my gas sample?

Because a pure substance at equilibrium obeys an equation of state, a built-in physical constraint of the form f(p,V,T,n)=0. This constraint is not a mathematical convenience; it reflects the fact that molecules of a real substance interact with each other and with container walls in a way that fixes their bulk pressure once the volume, temperature, and amount are set. Once you fix three of the four, the fourth is no longer under your control.

Is the equation of state the same for every gas?

No. The abstract statement f(p,V,T,n)=0 is universal in structure, but the actual function f differs for every substance. Helium, carbon dioxide, and water vapor each have their own equation of state, reflecting differences in molecular size, shape, and intermolecular forces. The ideal gas law, pV=nRT, is a single simplified equation of state that approximates the true behavior of any dilute gas reasonably well, but real gases deviate from it, especially at high pressure or low temperature.

Does the equation-of-state idea apply only to gases?

No, it applies to any pure substance at equilibrium, including liquids and solids, although the functional form of f is far more complicated for condensed phases because intermolecular forces dominate. Near a phase transition, such as boiling, the equation of state can become multivalued (liquid and vapor coexisting at the same p and T but different V), which is why the "unique fourth variable" argument requires the caveat that f behaves smoothly away from such transitions.

Where this leads