In short
The first law of thermodynamics is energy conservation, written for a system that can exchange energy with its surroundings in exactly two ways — as heat Q (driven by a temperature difference) or as work W (driven by a volume change against pressure). If U is the system's internal energy — the total kinetic and potential energy of all its molecules — then the change \Delta U over any process equals the heat added minus the work done by the system:
Sign conventions (used consistently in this article and throughout padho-wiki): Q > 0 when heat flows into the system; W > 0 when the system does work on its surroundings (by expanding). The work done by a gas that changes volume from V_1 to V_2 is
which is just the area under the process curve on a pressure-volume diagram. Internal energy U is a state function — it depends only on the current state of the system (for an ideal gas, on T alone) — while Q and W are path functions: two different paths between the same endpoints can have different Q and W, but their difference Q - W is always the same \Delta U. A pressure cooker sealed on a hot stove absorbs Q > 0 from the flame, does W = 0 on its rigid walls, and so its internal energy — and its temperature, and its pressure — climb until the regulator lifts. That regulator is the first law made audible.
A pressure cooker sits on your kitchen flame in Pune. Inside, two cups of water, a fistful of rajma, and a few hundred grams of steam already pushing against the lid. The flame below is pumping energy in; no matter is leaving (the lid is sealed); and yet the temperature climbs, the pressure climbs, and eventually the weight on top lifts with a loud hiss. Where is the energy going? Not out — the lid is holding. Not into motion of the whole cooker — it is sitting still. It is going into the gas and water inside, raising their internal energy, which shows up as a rise in temperature and pressure. The regulator hisses because the gas is now strong enough to lift a metal weight; what you hear is the gas doing mechanical work on that weight.
This is the first law of thermodynamics at work, and it is the most useful single equation in physical chemistry, engineering, climate science, biology, and large parts of astrophysics. It says only one thing — energy is conserved — but it says it for systems that cannot be treated as single rigid objects. A gas in a cylinder does not have "a position" or "a velocity". It has a state: a pressure, a volume, a temperature, an amount of stuff. And the first law tracks, cleanly and without mysticism, exactly how the energy stored in that state changes when you heat the gas or push on its piston.
The job of this article is to make the equation \Delta U = Q - W feel inevitable. You will see where the internal energy U comes from (microscopic kinetic plus potential energy of the molecules), where the work W = \int P\, dV comes from (push-times-distance, summed over a moving piston), why Q and W individually depend on how you take the system from one state to another, while \Delta U does not, and how to read off each of those quantities for the four processes an Indian class-11 textbook will throw at you. By the end, a JEE problem that gives you two of Q, W, \Delta U and asks for the third will be a matter of reading the sign conventions and adding.
Systems, surroundings, and the thing you are tracking
Before any book-keeping, you need to know what you are counting. A thermodynamic system is whatever you draw the boundary around — the gas inside a cylinder, the water inside a pressure cooker, the air inside a balloon, the chamber of a car engine at one moment in its cycle. The surroundings is everything else that can exchange energy with the system through that boundary — the piston above the gas, the flame below the cooker, the walls of the balloon, the cold outside air. The boundary is the imaginary surface you are drawing between the two.
Three kinds of boundary matter for the first law:
- A rigid boundary does not move, so the system cannot change volume, so it cannot do pressure-volume work. A sealed steel can on a stove: the walls don't budge, so W = 0 no matter how hot the can gets.
- A movable boundary (typically a piston) lets the system change volume. The gas pushes the piston out a little, and that push-times-distance is exactly the work W.
- An adiabatic boundary lets no heat through, so Q = 0. A thermos flask's vacuum wall is a real-world attempt at this. A very rapid compression is also adiabatic — there is simply not enough time for heat to leak across the boundary.
A boundary can combine these: a thermos piston (moving but adiabatic), a rigid but perfectly heat-conducting wall (fixed volume, free heat flow). The first law will handle all combinations with the same one equation.
Internal energy — what is actually in the cylinder
Drop a thermometer into the pressure cooker in your kitchen and it reads, say, 395 K once the regulator is hissing. What does that number mean, microscopically? You already saw in kinetic theory that for an ideal gas, temperature is proportional to the average translational kinetic energy per molecule:
Each of the N molecules in the cooker has, on average, that much kinetic energy. But molecules can also rotate and vibrate (see degrees of freedom and equipartition); each active quadratic degree of freedom contributes another \frac{1}{2} k_B T of kinetic-or-potential energy per molecule. Real gases have weak intermolecular forces, which store a little potential energy too.
Add it all up and you get the internal energy U of the system:
For an ideal monatomic gas (helium, neon, argon) where molecules have only three translational degrees of freedom and no intermolecular forces:
Why: multiply the per-molecule average \frac{3}{2} k_B T by the number of molecules N = n N_A; use N_A k_B = R to get the per-mole form.
For an ideal diatomic gas at room temperature (nitrogen, oxygen — this is the air around you), there are three translational plus two active rotational degrees of freedom, so:
Why: each of the five active quadratic degrees of freedom gets \frac{1}{2} k_B T per molecule by equipartition; five times \frac{1}{2} is \frac{5}{2}.
Two facts follow from these formulas and will be used all over thermodynamics:
-
For any ideal gas, U depends on T alone — not on P, not on V separately. Doubling the pressure of a gas at constant temperature does not change its internal energy, because the molecules are still moving at the same average speed. Only raising T raises U.
-
U is a state function. Give me n, T, and the type of gas, and I can tell you U without asking how you got there. It does not matter whether you reached 395 K by heating quickly or slowly, by compressing then cooling then heating again, or by any other route. Two paths ending in the same (n, T) give the same U.
This second fact is the technical underpinning of the whole first law. Two paths between the same endpoints can involve wildly different Q and W, but the difference Q - W is pinned down — it has to equal \Delta U, and \Delta U depends only on the endpoints.
Heat Q — energy flow driven by temperature difference
Heat is energy transferred across a system boundary because of a temperature difference. When you put a cold pot of water on a hot flame, energy flows from flame to pot; when you put a hot chai cup on a cold marble slab, energy flows from cup to slab. The flow is always "downhill" in temperature, and it stops when the two temperatures match (this is the zeroth law of thermodynamics, already in your bones from daily experience).
The units of heat are joules in SI. Indian textbooks and older physics papers often use the calorie (1 cal = 4.186 J), defined historically as the heat needed to raise the temperature of 1 g of water by 1 K at 15 °C. You will also see the kilocalorie ("food calorie") in nutrition — a samosa, roughly 260 kcal, carries about 260 \times 4186 \approx 1.09 \times 10^6 joules of chemical potential energy, of which any portion released as heat is a Q into your body.
Sign convention (critical — used throughout this wiki). Q is positive when heat flows into the system and negative when heat flows out. This is the modern physics convention, used by all Indian CBSE and NCERT textbooks and by JEE; some older chemistry texts use the opposite sign for W but the same sign for Q, so watch the source when cross-reading.
A typical calibration: to raise the temperature of 1 kg of water by 1 K requires about 4186 J; to raise the temperature of 1 kg of aluminium by 1 K requires only about 900 J; to raise the temperature of 1 kg of air at constant volume by 1 K requires about 718 J. These numbers are specific heats, and they will return in full detail in isobaric and isochoric processes along with the Mayer relation C_P - C_V = R.
Work W — energy flow driven by volume change
Picture the cylinder and piston in the figure above. Gas at pressure P pushes upward on the piston; the piston has area A, so the gas exerts a force F = PA on it. If the piston moves outward by an infinitesimal distance dx, the gas does an infinitesimal amount of mechanical work on it:
Why: A\, dx is the tiny volume swept out by the piston as it moves. The work done by the gas on the piston is force times distance, which reorganises into pressure times the volume change.
Integrate over a finite change in volume from V_1 to V_2:
Why: during the process, pressure is generally a function of volume (the gas changes state as the piston moves). Summing up P\, dV over the whole process gives the total work.
Geometrically, W is the area under the process curve on a pressure-volume diagram — a fact that deserves a section of its own (see PV diagrams and work). The sign falls out cleanly from the integral:
- Expansion (V_2 > V_1): the gas pushes the piston outward; the integral is positive; W > 0; the gas does positive work on the surroundings.
- Compression (V_2 < V_1): the piston pushes in against the gas; the integral is negative; W < 0; the surroundings do positive work on the gas, equivalently the gas does negative work on the surroundings.
Two special cases deserve to be at your fingertips because they appear in every thermodynamics problem:
Isobaric (constant pressure). If P is constant, pull it out of the integral:
Isochoric (constant volume). If the volume does not change, dV = 0 everywhere and
A rigid sealed container can absorb heat without doing any work — all the heat goes into raising U and hence the temperature. This is exactly what happens in the pressure cooker before the regulator lifts.
Isothermal and adiabatic work require a bit more algebra (one involves \int dV/V and produces a \ln; the other requires the relation PV^\gamma = \text{const}) and are derived in full in thermodynamic processes — isothermal and adiabatic.
The sign-convention warning that catches everyone
The variable W in the first law — "\Delta U = Q - W" — is defined as work done by the system on the surroundings. This is the physics convention. You will occasionally see a chemistry textbook write \Delta U = Q + W with W defined as work done on the system; the two forms are algebraically identical, but if you mix sources you will get a sign error every time. For this article and everywhere in padho-wiki physics, stick with:
The first law — energy conservation, rewritten
Now put the pieces together. Over any process, the system's internal energy can change only through the two boundary channels: heat in, and work out. Energy is conserved, so
In differential form, for an infinitesimal step:
(A side note on notation: many texts write \delta Q and \delta W with deltas, not d, to emphasise that Q and W are path functions and the infinitesimals are not exact differentials. The physics is the same; this article uses ordinary d and flags the distinction where it matters.)
The fact worth carving into your memory. \Delta U between two states depends only on those two states. Q and W individually depend on the path — on how you got from one state to the other. But their difference Q - W equals \Delta U, which is path-independent. That is the whole technical content of the first law.
Why should you believe this? Two arguments, both worth holding in your head at once:
-
Microscopic: U is a function of the molecular configuration — in the ideal gas case, of T alone. Heat and work are just two ways of changing that molecular configuration. Heat does it by transferring energy through molecular collisions at the boundary; work does it by moving the boundary through distance. Both end up as molecular kinetic + potential energy in the system. Energy is neither created nor destroyed, so the totals balance.
-
Experimental: James Joule's 1843 paddle-wheel experiment — a falling weight turned a paddle inside an insulated vat of water, raising the water's temperature by exactly the amount that would require a known Q by direct heating. Mechanical work converted into internal energy in a measurable, reproducible ratio. This is the ancestor of every calorimetry experiment in every Indian school lab, and it is how physicists first became sure that heat and work are the same kind of thing — both are energy in transit across a boundary.
A live simulation — heat flows in, work flows out, internal energy climbs
Sign conventions in one table
One mistake students make in every thermodynamics exam is getting a sign wrong. The right habit is to set up a little table before plugging numbers in, and never to rely on the phrasing of the problem.
| Process | Q | W | \Delta U |
|---|---|---|---|
| Heat added, no volume change | + | 0 | + (equals Q) |
| Heat added, gas expands | + | + | Could be +, 0, or - |
| Heat removed, no volume change | - | 0 | - (equals Q) |
| Heat removed, gas is compressed | - | - | Could be +, 0, or - |
| Insulated (adiabatic) expansion | 0 | + | - (equals -W) |
| Insulated (adiabatic) compression | 0 | - | + (equals -W) |
The second and fourth rows are interesting: when both Q and W are positive (or both negative), their difference can go either way, and you need the actual numbers to decide. An isothermal process of an ideal gas is the extreme case: \Delta U = 0 because T is constant, so every joule of heat added comes out as work done by the gas (Q = W exactly).
Worked examples
Example 1: Pressure cooker before the regulator lifts
A pressure cooker in a Lucknow kitchen contains n = 0.4 mol of air (ignore the water and rajma for this idealisation) at 300 K. The cooker is rigid (ignore the slight flex of the steel) and sealed. The flame adds Q = 2500 J of heat before the regulator starts to lift. Treat the air as an ideal diatomic gas. Find the final temperature and pressure inside the cooker, assuming the initial pressure was 1 atm \approx 1.01 \times 10^5 Pa. (The rigid-wall idealisation means we track only the isochoric stage, before the regulator opens.)
Step 1. Identify the process and what the first law says for it.
The walls are rigid, so V is constant; therefore W = \int P\, dV = 0. The first law \Delta U = Q - W collapses to
Why: when the gas cannot change volume, the only boundary channel for energy is heat. Every joule that enters through the flame goes directly into internal energy.
Step 2. Relate \Delta U to \Delta T for a diatomic ideal gas.
From the equipartition result above:
Why: U is linear in T for an ideal gas, so \Delta U is just the slope times \Delta T. The slope here is \frac{5}{2} n R because air is (approximately) a diatomic gas with 5 active degrees of freedom at ordinary temperatures.
Step 3. Solve for \Delta T.
Why: plug in \Delta U = Q = 2500 J, n = 0.4 mol, R = 8.314 J mol⁻¹ K⁻¹, and divide. The arithmetic is deliberately clean so you can check each multiplication.
Step 4. Final temperature.
Step 5. Final pressure from the ideal gas law at constant volume.
For an ideal gas at constant n and V, P/T is constant (Gay-Lussac's law), so
Why: constant V and constant n turn PV = nRT into P \propto T, so doubling the temperature doubles the pressure. This is the physics of why the regulator lifts — above a certain internal pressure, the weight on top is no longer heavy enough to hold the lid shut.
Result. T_2 \approx 601 K, P_2 \approx 2.02 \times 10^5 Pa (about 2 atm). W = 0, Q = \Delta U = 2500 J.
What this shows. An isochoric (rigid-walled) process is the purest form of the first law: Q and \Delta U are equal. No energy is wasted on mechanical work because there is no moving piston. The feel of a sealed pressure cooker heating on the flame — temperature climbing, pressure climbing, everything bottled up — is Q = \Delta U made tangible. When the regulator finally lifts, the process switches over to approximately isobaric expansion, and some of the heat now pays for the work lifting the regulator weight.
Example 2: A bicycle pump (approximately adiabatic compression)
You pump up a cycle tyre in Delhi on a summer morning. In one quick downstroke, the pump compresses n = 0.01 mol of air (a realistic small sample) from initial volume V_1 = 2.5 \times 10^{-4}\text{ m}^3 (250 cm³) to final volume V_2 = 1.0 \times 10^{-4}\text{ m}^3 (100 cm³). The stroke is fast enough that essentially no heat leaks out through the pump wall during the compression: Q \approx 0. The work done on the gas during this adiabatic compression is W_{\text{on gas}} = 37 J (given — it would come from integrating P\, dV for an adiabatic path, see the next chapter). Starting temperature is 300 K. Find \Delta U and the final temperature. Use C_V = \frac{5}{2} R for air.
Step 1. Convert the given work to "work done by the gas".
W_{\text{on gas}} = +37 J means the surroundings did 37 J of work on the gas. The first law uses W = work done by the gas, so
Why: the pump's piston did positive work on the gas (pushed it in); equivalently, the gas did negative work on the piston. Flipping the sign keeps us in the convention used by \Delta U = Q - W.
Step 2. Apply the first law.
Why: no heat leaves, so every joule of work done on the gas is stored as internal energy. This is why a bicycle pump gets warm when you use it — not from friction, but from the adiabatic heating of the air inside.
Step 3. Convert \Delta U to \Delta T.
For a diatomic ideal gas, \Delta U = n C_V\, \Delta T = n \cdot \frac{5}{2} R\, \Delta T, so
Why: invert the U = \frac{5}{2} n R T relation on changes. A small sample (0.01 mol) heats up a lot for 37 J because the denominator is small — which matches the lived experience of a pump barrel getting hot after vigorous pumping.
Step 4. Final temperature.
Result. \Delta U = +37 J, T_2 \approx 478 K. The bicycle pump barrel really does get hot — not searing, because the hot air exchanges heat with the steel barrel almost immediately (the Q = 0 assumption breaks down after the stroke is over), but warm enough that you feel it against your palm. In serious industrial compressors (jet engines, diesel engines), the same effect is exploited on a much larger scale: adiabatic compression of intake air heats it to ignition temperatures.
What this shows. When Q = 0, the first law becomes \Delta U = -W — all work done on the gas ends up as internal energy, and the gas gets hotter. This is the single mechanism behind a diesel engine: compress air adiabatically hard enough and it becomes hot enough to ignite the fuel spray, no spark plug required.
Common confusions
-
"Heat is a kind of energy stored in a body." No — internal energy U is stored in a body; heat Q is energy in transit across a boundary because of a temperature difference. A hot cup of chai does not "contain heat"; it contains internal energy. When you bring a cold spoon into contact with it, some of that internal energy flows to the spoon as heat until their temperatures equalise. After the flow stops, there is no "heat" anywhere; there is just internal energy sitting in the chai and in the spoon.
-
"Work and heat are opposite things." They are not opposite; they are the two channels through which the internal energy of a system can change. Neither one lives inside the system. Both are categories of energy-in-flight. The first law's minus sign between them is a sign convention, not a philosophical opposition.
-
"\Delta U = Q + W." This is the chemistry-textbook form in some Indian classrooms, in which W is defined as work done on the system. The equation is algebraically identical to the physics form \Delta U = Q - W with the physics-style W, but the variable means the opposite thing. Fix one convention and stay in it for every problem. This wiki uses W = work done by the system throughout.
-
"In an isothermal process \Delta U = 0 because Q = 0." No — because T is constant, U (which for an ideal gas depends only on T) is constant, so \Delta U = 0. Q is not zero — it is exactly equal to W, both positive (for expansion) or both negative (for compression). Adiabatic and isothermal are two different things: adiabatic means Q = 0; isothermal means \Delta T = 0.
-
"The first law tells you which way a process goes." It does not. The first law is only an energy-accounting rule — it rules out a process that would violate energy conservation but allows many processes that never happen (like a cup of chai spontaneously freezing to ice while the room warms up). The second law is the one that picks a direction for natural processes, and it is the subject of second law of thermodynamics.
-
"W = P\Delta V always." Only when P is constant. In general W = \int P\, dV, and P depends on V along the process. For an isothermal ideal-gas compression, for instance, W = nRT \ln(V_2/V_1), not P\, \Delta V.
If you came here to understand what \Delta U = Q - W means and can now read a PV diagram, you have what you need. What follows is for readers who want to see why U must be a state function (not an assumption but a theorem), and how the first law handles cyclic processes — which is the doorway to heat engines.
Why is U a state function? A sketch of the argument
The first law as written — \Delta U = Q - W — defines U only up to an additive constant, in the following sense. Pick any reference state of the system (say, T_0 = 273.15 K, V_0 = 1\text{ m}^3, one mole of the gas). Assign U in that state any value you like, say zero. Now for any other state (T, V, n), run any process connecting the reference state to it, measure Q and W, and compute
The claim is that this is well-defined — that the answer U does not depend on which process you use to connect the reference to (T, V, n). If it did, you could cheat: use Path A to go from State 1 to State 2 (giving \Delta U_A), and Path B to come back (giving \Delta U_B), with \Delta U_A \ne -\Delta U_B. The round trip would give a net change in U without returning to the original state — but that is a contradiction, because U is by construction a property of the state, and you did return to the original state.
So the assertion "U is a state function" is equivalent to "\oint (dQ - dW) = 0 around any closed cycle" — the integral of dQ - dW around any closed loop in state space is zero. That is not a definition; it is a claim about nature. It has been tested by every calorimetry experiment ever done, including Joule's paddle-wheel. No counterexample has been found, and the existence of U as a state function is one of the two pillars of thermodynamics (the other being the existence of S, the entropy, from the second law — see entropy introduction).
Cyclic processes and the preview of heat engines
A cyclic process is one where the system returns to its original state after some sequence of steps. Since U depends only on the state, \oint dU = 0 for any cycle. The first law then gives:
Why: the closed-loop integral of an exact differential is zero; that leaves the sum of heat and the sum of work equal around the cycle. The net heat absorbed by the system in a full cycle equals the net work it performs in that cycle.
This is the single most important consequence of the first law for engineering. A heat engine is a device that runs in a cycle, absorbing heat from a hot source, doing net mechanical work, and rejecting some heat to a cold sink. The first law says its net work output cannot exceed the net heat input — you cannot build a perpetual motion machine of the first kind. The second law will sharpen this further: not only is W_{\text{net}} \le Q_{\text{in}}, but W_{\text{net}} \le (1 - T_C/T_H) Q_{\text{in}}. That factor 1 - T_C/T_H is the Carnot efficiency — see heat engines and Carnot cycle.
The enthalpy H — a useful bookkeeping trick
In constant-pressure processes (the default in a chemistry lab or an open beaker on a Bunsen burner), the combination U + PV is a convenient new state function:
Then, for a constant-pressure process,
Why: at constant P, W = P\, \Delta V exactly; substituting cancels the work term, leaving \Delta H equal to the heat absorbed. This is why chemists tabulate "enthalpies of reaction" at 1 atm — they are directly measurable calorimetrically under the usual lab condition.
Enthalpy becomes ubiquitous in chemistry (\Delta H for reactions), meteorology (moist-air thermodynamics), and thermodynamic tables for steam turbines. The first law remains the parent result; enthalpy is a convenient re-packaging for a specific kind of process.
What counts as "work" in a more general system
In this article, work has meant pressure-volume work: dW = P\, dV. That is the dominant work term for a gas in a cylinder, but not the only possibility. A more general first law allows any kind of external work:
where the extra terms describe surface work (against surface tension \sigma over area change dA), electrical work (moving charge dq against voltage E), magnetic work (changing magnetisation dM against field H), and so on. For each kind of work there is a conjugate pair of variables (an intensive one that stays uniform and an extensive one that is added up). The bookkeeping generalises cleanly, and this generalised first law is what is used in statistical mechanics textbooks and in real engineering on thermodynamic systems involving electromagnetism, surfaces, or chemical reactions.
For everything you will see in class 11, class 12, or JEE, dW = P\, dV is enough. But it is worth knowing that the first law is much more than just gas physics — it is the conservation of energy rewritten for any system you can draw a boundary around.
Where this leads next
- Thermodynamic Processes — Isothermal and Adiabatic — the two benchmark paths between states, and the work integrals (W = nRT \ln V_2/V_1 for isothermal, W = (P_1 V_1 - P_2 V_2)/(\gamma - 1) for adiabatic) that every thermo problem uses.
- Isobaric and Isochoric Processes — the two constant-P and constant-V paths, the specific heats C_P and C_V, and the Mayer relation C_P - C_V = R.
- PV Diagrams and Work — the geometric reading of work as area under a curve; cyclic processes and net work as enclosed area.
- Second Law of Thermodynamics — why the first law is not enough; what picks a direction for natural processes.
- Heat Engines and Carnot Cycle — the canonical application of the first law to a cyclic process, and the efficiency ceiling imposed by the second.
- Internal Energy — a closer look at what U contains microscopically, including for non-ideal and non-gas systems.