The first law of thermodynamics states that the change in a system’s internal energy equals the heat added to the system minus the work done by the system: ΔU = Q − W. It is the law of conservation of energy applied to thermodynamic processes, meaning energy can change form — from heat to work or internal energy — but can never be created or destroyed.
Every time you rub your hands together on a cold morning, you convert mechanical work into thermal energy — and your palms warm up. That warmth did not appear from nothing. It came from the effort your muscles supplied, following a rule that the universe enforces without exception.
That rule is the first law of thermodynamics. It keeps track of every joule entering or leaving a system, and it guarantees that the books always balance. Understanding it unlocks the physics behind engines, refrigerators, weather, and your own metabolism.
What Is the First Law of Thermodynamics?
The first law of thermodynamics is the law of conservation of energy applied to systems that exchange heat and work with their surroundings. It says that when you add heat to a system or do work on it, the total energy the system gains must equal the total energy it receives — no more, no less.
Think of a sealed container of gas sitting on a hotplate. You supply heat (Q) to the gas. Some of that energy makes the gas molecules jiggle faster, raising the temperature — what physicists call internal energy. Some of it may push a piston outward, doing work (W) on the surroundings. The first law simply insists that these two portions add up to the heat you put in.
In other words, energy has only three places to go in a thermodynamic process: into internal energy, out as work, or in as heat. The first law is the accountant that tracks every transfer.
This idea was not always obvious. Before the 1840s, scientists treated heat and mechanical work as separate, unrelated quantities. It took the careful experiments of James Prescott Joule — who measured the temperature rise of water churned by falling weights — to prove that work and heat are interchangeable forms of the same thing: energy. NASA’s Glenn Research Center offers a clear walkthrough of how Joule’s insight led to the modern definition of internal energy.
The First Law of Thermodynamics Formula
The first law of thermodynamics is written as:
where:
- ΔU = change in internal energy of the system (joules, J)
- Q = heat added to the system (joules, J)
- W = work done by the system on its surroundings (joules, J)
Sign conventions
Getting the signs right trips up more students than the formula itself. Here is the convention used in most physics courses (the “physics” sign convention):
| Quantity | Positive (+) | Negative (−) |
|---|---|---|
| Q (heat) | Heat flows into the system | Heat flows out of the system |
| W (work) | System does work on surroundings (expansion) | Surroundings do work on system (compression) |
| ΔU | Internal energy increases (system heats up) | Internal energy decreases (system cools down) |
A common alternative in chemistry and some engineering texts writes the law as ΔU = Q + W, where W is defined as work done on the system. Both forms say the same thing — just watch which sign convention the question uses.
What is internal energy?
Internal energy (U) is the total microscopic energy stored inside a system. For a gas, it includes the kinetic energy of every randomly moving molecule plus the potential energy from intermolecular forces. You cannot measure U directly, but you can measure changes in U — which is exactly what the first law does.
For an ideal gas, internal energy depends only on temperature. Double the absolute temperature and you double U (for a monatomic ideal gas, U = 3⁄2 nRT). That link between temperature and internal energy is why heating a sealed gas raises its temperature — all the added energy stays inside.
How the First Law Works in 4 Thermodynamic Processes
The first law applies to every thermodynamic process, but its three terms — Q, W, and ΔU — partition differently depending on what is held constant. Mastering these four standard processes is the fastest way to see the law in action.
1. Isothermal process (constant temperature)
Temperature stays fixed, so for an ideal gas ΔU = 0. The first law reduces to Q = W: every joule of heat that enters is immediately spent as work expanding the gas. Slow expansion of a gas in contact with a heat reservoir is the textbook example.
2. Isobaric process (constant pressure)
Pressure does not change, so the work done by the gas is simply W = PΔV. The first law becomes ΔU = Q − PΔV. Heating water in an open saucepan — where atmospheric pressure stays constant — is an everyday isobaric process.
3. Isochoric process (constant volume)
Volume is locked, so the gas does no expansion work: W = 0. The first law simplifies to ΔU = Q — all the heat you add goes straight into internal energy, raising the temperature. A rigid, sealed pressure cooker before the valve opens behaves this way.
4. Adiabatic process (no heat transfer)
The system is perfectly insulated, so Q = 0. The first law gives ΔU = −W. If the gas expands and does positive work, its internal energy drops and it cools; if compressed, it heats up. The rapid compression stroke in a diesel engine — hot enough to ignite fuel without a spark plug — is a dramatic adiabatic process.
| Process | Constraint | Simplified first law | Everyday example |
|---|---|---|---|
| Isothermal | T = constant, ΔU = 0 | Q = W | Slow tyre inflation in contact with room air |
| Isobaric | P = constant | ΔU = Q − PΔV | Boiling water in an open pan |
| Isochoric | V = constant, W = 0 | ΔU = Q | Heating gas in a rigid sealed container |
| Adiabatic | Q = 0 | ΔU = −W | Rapid compression in a diesel engine |
Real-World Examples of the First Law of Thermodynamics
The first law of thermodynamics operates everywhere energy changes hands — not just inside laboratory cylinders. Here are five situations you can connect to ΔU = Q − W right now.
1. A car engine
Burning fuel releases heat (Q > 0). Part of that energy does work pushing pistons (W > 0), and the remainder heats the engine block and exhaust gases (ΔU and waste heat to the surroundings). The first law guarantees that the work output plus the thermal energy carried away equals the chemical energy released.
2. A refrigerator
The compressor does work on the refrigerant gas (W < 0 from the gas’s perspective, since work is done on it). That compressed gas then dumps heat out the back of the fridge (Q < 0, heat leaving). The first law explains why the coils at the back feel warm — the energy your food lost plus the electrical work the motor did all has to go somewhere.
3. A bicycle pump
Push the handle down quickly and the air inside the pump warms up. You did work on the gas (W < 0), there was not enough time for heat to escape (roughly adiabatic, Q ≈ 0), so the internal energy rose: ΔU = −W > 0. The nozzle gets hot to the touch.
4. Melting an ice cube
Heat flows in from the surroundings (Q > 0) and breaks molecular bonds rather than raising temperature. The ice does negligible work (volume barely changes), so nearly all of Q becomes an increase in internal (potential) energy. This is also how latent heat fits into the first law.
5. Your body
Food provides chemical energy (analogous to Q). Your muscles convert some of it into mechanical work (W), and the rest becomes body heat (ΔU and thermal radiation). On a cold day your body “wastes” more energy as heat to maintain 37 °C — perfectly consistent with the first law’s energy balance.

First law of thermodynamics energy-flow diagram: heat (Q) enters the system, work (W) leaves, and the balance is stored as internal energy (ΔU).
Common Misconceptions About the First Law of Thermodynamics
Even students who can write ΔU = Q − W from memory sometimes carry hidden misunderstandings. Here are four to catch early.
1. “Heat and temperature are the same thing”
They are not. Heat (Q) is energy in transit between objects at different temperatures. Temperature is a measure of the average kinetic energy of particles. You can add enormous amounts of heat to a substance — ice melting at 0 °C, for instance — without its temperature rising at all. Confusing the two leads to garbled first-law calculations. Our article on heat versus temperature unpacks this in detail.
2. “Work ‘uses up’ energy”
Work does not destroy energy — it transfers it from one system to another. When a gas expands and pushes a piston, the gas loses internal energy but the piston (and whatever it is connected to) gains kinetic or potential energy. The total remains constant.
3. “A system in thermal equilibrium has zero internal energy”
Internal energy is never zero (molecules are always moving above absolute zero). Equilibrium simply means ΔU = 0 because no net heat or work is flowing. The gas still carries a huge store of kinetic energy inside — it just is not changing.
4. “The first law forbids heat from flowing from cold to hot”
That restriction belongs to the second law of thermodynamics. The first law only says energy is conserved; it has nothing to say about direction. A refrigerator moves heat from cold to hot — perfectly allowed by the first law — so long as external work is supplied. The broader mathematical framework behind the law makes this distinction precise: energy conservation constrains the magnitude of transfers, not their spontaneity.
How the First Law Connects to Other Physics Concepts
The first law of thermodynamics does not stand alone — it is the energy-conservation thread that runs through almost every branch of thermal physics.
Start with the ideal gas law (PV = nRT). For an ideal gas, internal energy depends only on temperature, so combining PV = nRT with ΔU = Q − W lets you predict exactly how pressure, volume, and temperature shift in each of the four processes above.
Move to specific heat capacity and the relationship becomes even more practical: Q = mcΔT tells you how much heat is needed, while the first law tells you where that heat ends up — as a temperature change, as expansion work, or as both.
The first law also sits inside the broader family of the four laws of thermodynamics. While the zeroth law defines temperature and the first law conserves energy, the second law — via concepts like Carnot efficiency — adds a direction: it limits how much of Q you can convert to useful work. Together, the first and second laws explain why no engine can ever be 100 % efficient.
Finally, the first law reaches into heat transfer. Conduction, convection, and radiation are simply the mechanisms by which Q crosses a system boundary — the first law then decides how that incoming energy is split between ΔU and W.
Worked Problems
Show Solution
Solution:
Step 1: Identify constraints. The container is rigid, so volume cannot change and W = 0.
Step 2: Apply the first law: ΔU = Q − W = 500 J − 0 = 500 J.
Answer: ΔU = 500 J (the internal energy increases by 500 J).
Show Solution
Solution:
Step 1: List knowns. Q = +600 J (heat in), W = +200 J (work done by the gas).
Step 2: Apply ΔU = Q − W = 600 J − 200 J = 400 J.
Answer: ΔU = 400 J.
Show Solution
Solution:
Step 1: Adiabatic means Q = 0.
Step 2: Work is done on the gas, so by the physics convention W = −350 J (negative because the surroundings do the work).
Step 3: ΔU = Q − W = 0 − (−350) = +350 J.
Answer: ΔU = +350 J (the gas heats up).
Show Solution
Solution:
Step 1: Isothermal for an ideal gas means ΔU = 0 (internal energy depends only on T).
Step 2: ΔU = Q − W gives 0 = 1,200 J − W.
Step 3: W = 1,200 J.
Answer: W = 1,200 J — the gas does 1,200 J of work on the piston.
Show Solution
Solution:
Step 1: Heat leaves the system, so Q = −800 J.
Step 2: Work is done on the system, so W = −300 J (the system does −300 J of work on the surroundings).
Step 3: ΔU = Q − W = (−800) − (−300) = −800 + 300 = −500 J.
Answer: ΔU = −500 J (the internal energy decreases by 500 J).
Show Solution
Solution:
Step 1: Over a complete cycle the gas returns to its initial state, so ΔU = 0.
Step 2: Net heat absorbed: Qnet = Qin − Qout = 4,000 J − 2,500 J = 1,500 J.
Step 3: ΔU = Qnet − W gives 0 = 1,500 J − W, so W = 1,500 J.
Answer: W = 1,500 J of net work per cycle.
Show Solution
Solution:
Step 1: Constant volume means W = 0.
Step 2: ΔU = nCvΔT = 2.0 mol × (3 × 8.314 / 2) J/(mol·K) × (500 − 300) K.
Step 3: Cv = 12.471 J/(mol·K). ΔU = 2.0 × 12.471 × 200 = 4,988 J ≈ 4,990 J.
Step 4: Since W = 0, Q = ΔU = 4,990 J.
Answer: Q ≈ 4,990 J, W = 0 J, ΔU ≈ 4,990 J.
Show Solution
Solution:
Step 1: Work at constant pressure: W = PΔV = 1.5 × 105 Pa × (6.0 × 10-3 − 2.0 × 10-3) m3.
Step 2: W = 1.5 × 105 × 4.0 × 10-3 = 600 J.
Step 3: ΔU = Q − W = 900 J − 600 J = 300 J.
Answer: W = 600 J, ΔU = 300 J.