Skip to main content
← BlogThermodynamics

First Law of Thermodynamics: ΔU = Q − W Explained with Worked Examples

Physics Fundamentals Editorial TeamPhysics FundamentalsUpdated Jun 20, 202611 min read
First law of thermodynamics — fire illustrating heat as a form of energy transfer

Every engine ever built, every metabolic reaction in your body, every star burning in the sky — all operate under one inviolable constraint: the first law of thermodynamics. It is, at its core, the law of conservation of energy applied to thermodynamic systems, and it governs the relationship between heat, work, and internal energy with mathematical precision.

The Statement of the First Law

The first law of thermodynamics states: The change in internal energy of a system equals the heat added to the system minus the work done by the system.

ΔU = Q − W

Here, ΔU is the change in internal energy (the total kinetic and potential energy of all the molecules inside the system), Q is the heat transferred into the system (positive when heat flows in, negative when it flows out), and W is the work done by the system on its surroundings (positive when the system expands, negative when it's compressed).

This equation is a bookkeeping law. Energy cannot appear from nothing and cannot disappear — every joule of energy is accounted for. If you add heat to a gas and the gas doesn't do any work (constant volume), all the heat goes into increasing the internal energy — the gas gets hotter. If the gas expands and does work but no heat flows in, the internal energy decreases — the gas cools down. The first law tells you exactly how these quantities balance.

Internal Energy

Internal energy (U) is the sum of all microscopic energies in a system — the translational kinetic energy of molecules zooming around, rotational kinetic energy of molecules tumbling, vibrational energy of atoms within molecules, and the potential energy of intermolecular forces. For an ideal gas (a useful simplification), internal energy depends only on temperature:

U = nCvT

where n is the number of moles, Cv is the molar heat capacity at constant volume, and T is absolute temperature in kelvin. This is why temperature is so fundamental in thermodynamics — it directly measures the internal energy of an ideal gas. Raising the temperature always means increasing internal energy.

Heat and Work: Two Ways to Change Internal Energy

There are exactly two ways to change the internal energy of a system: transfer heat across its boundary, or let it do (or have done on it) mechanical work. Heat is energy transfer driven by a temperature difference — it flows spontaneously from hotter to colder. Work is energy transfer through macroscopic mechanical means — a piston compressing a gas, for example.

Crucially, heat and work are not properties of a system — they are processes of energy transfer. You can't say a gas "contains" a certain amount of heat; you can only say heat was transferred to or from it. Internal energy, by contrast, is a property of the system's state. This distinction is one of the conceptual pillars of thermodynamics.

Thermodynamic Processes

The first law takes different simplified forms in special processes:

Isothermal process (constant temperature): For an ideal gas, ΔU = 0 (since U depends only on T). Therefore Q = W — all heat input goes directly into work output. This is why isothermal processes appear in ideal engine cycles.

Adiabatic process (no heat transfer, Q = 0): ΔU = −W. The system's internal energy changes only through work. When a gas expands adiabatically, it does positive work and its internal energy (and temperature) decreases — this is why air cools as it rapidly expands, and why diesel engines ignite fuel without spark plugs.

Isochoric process (constant volume, W = 0): ΔU = Q. All heat goes into changing internal energy. No work is done because there's no volume change. This is the scenario in a rigid sealed container.

Isobaric process (constant pressure): Both Q and W are non-zero, and the general first-law equation applies. Cooking at atmospheric pressure approximates this condition.

Connection to the Physics of Engines

The first law explains why a perfect heat engine — one that converts 100% of heat into work — is impossible. To run a cycle (return to the same state), the change in internal energy over a complete cycle is zero (ΔU = 0). Therefore Q = W for the cycle as a whole: you can only get out as much work as net heat flows in. The second law of thermodynamics then adds a further constraint — some heat must always be exhausted to the environment. The interplay of these two laws defines the maximum possible efficiency of any heat engine.

Everyday Applications

The first law is everywhere. Your body is a thermodynamic system: you consume food (chemical energy), your metabolism converts it to internal energy and heat, you do work (exercise), and you radiate heat to stay at constant temperature. Every calorie you count is a measure of the internal energy stored in food, governed by the same equation that governs steam engines and stars. The first law of thermodynamics connects the physics of energy to every process in the physical and biological world

The First Law Formula: ΔU = Q − W

The first law of thermodynamics states that the change in internal energy ΔU of a system equals the heat Q added to it minus the work W done by it:

ΔU = Q − W

Sign conventions: Q is positive when heat flows into the system; Q is negative when heat leaves. W is positive when the system does work on the surroundings (e.g. gas expanding); W is negative when the surroundings do work on the system (e.g. gas being compressed). Some textbooks use ΔU = Q + W, where W is work done on the system — opposite sign. Always check the convention used.

Internal Energy U

Internal energy U is the total kinetic and potential energy of all particles in the system — random molecular motion, vibrations, rotations, and intermolecular potential energy. It is a state function: it depends only on the current state of the system (temperature, pressure, composition), not on how the system got there. For an ideal gas: U = (3/2)nRT — internal energy depends only on temperature.

Worked Example 1: Gas in a Cylinder

A gas absorbs 500 J of heat and expands, doing 200 J of work against a piston. Find the change in internal energy.

ΔU = Q − W = 500 − 200 = +300 J

The internal energy increases by 300 J — the gas absorbed more heat than it used doing work.

Worked Example 2: Adiabatic Compression

An adiabatic process has no heat exchange (Q = 0). A gas is compressed, with 400 J of work done on it. Find ΔU.

Work done on the gas = −(−400) = W is done by gas = −400 J (compression means the gas has work done on it, not by it)

ΔU = Q − W = 0 − (−400) = +400 J

The internal energy increases by 400 J — all the work of compression goes into increasing the gas temperature (why diesel engines ignite fuel by compression alone).

Thermodynamic Processes

Process Constraint First law simplification
IsothermalT = constantΔU = 0 → Q = W
AdiabaticQ = 0ΔU = −W
Isochoric (const V)V = constant, W = 0ΔU = Q
Isobaric (const P)P = constantΔU = Q − PΔV

Applications

Heat engines (petrol, diesel, steam): a working fluid absorbs heat Q_h from a hot source, does work W, and rejects heat Q_c to a cold sink. By the first law: W = Q_h − Q_c. Efficiency η = W/Q_h = 1 − Q_c/Q_h. The second law limits efficiency further: no engine can exceed Carnot efficiency η_max = 1 − T_c/T_h. Refrigerators: work W is done on the refrigerant, which absorbs Q_c from the cold interior and rejects Q_h = Q_c + W to the room. Human metabolism: you absorb chemical energy Q from food, do mechanical work W (moving, lifting), and reject the rest as body heat. At rest, a human dissipates ~80 W as heat.

Frequently Asked Questions

First Law and Specific Heat Capacity

For a solid or liquid at constant volume (negligible expansion), W ≈ 0, so ΔU = Q = mcΔT. This links the first law to specific heat capacity c. For gases at constant pressure, work is done during expansion: W = PΔV = nRΔT (from ideal gas law), so Q = ΔU + nRΔT. This gives rise to two heat capacities for gases: C_V (constant volume, all energy goes to ΔU) and C_P = C_V + R (constant pressure, energy split between ΔU and work). For ideal monatomic gas: C_V = (3/2)R = 12.5 J mol⁻¹ K⁻¹; C_P = (5/2)R = 20.8 J mol⁻¹ K⁻¹. The ratio γ = C_P/C_V = 5/3 ≈ 1.67 appears in adiabatic processes and the speed of sound in ideal gases.

Historical Context

The first law emerged from the work of three scientists in the 1840s: James Prescott Joule demonstrated that mechanical work and heat are equivalent (Joule's paddle wheel experiment, 1843 — mechanical stirring of water raised its temperature precisely as predicted by ΔU = W). Julius Robert von Mayer independently formulated energy conservation for thermal and mechanical processes in 1842. Hermann von Helmholtz gave the first comprehensive mathematical statement in 1847. Before this work, heat was believed to be a substance ("caloric") — the first law established it as a form of energy transfer. The unit joule is named after Joule in recognition of this work.

Common Mistakes

Sign convention confusion. ΔU = Q − W (standard physics convention: W is work done by the system) vs ΔU = Q + W (engineering convention: W is work done on the system). Always identify which sign convention a textbook uses before solving problems. Conflating heat and temperature. Heat Q is energy transferred; temperature T is a measure of average molecular kinetic energy. Adding the same heat Q to different masses of the same material produces different temperature changes (ΔT = Q/mc). Forgetting work is PΔV for gases. For gas expansion at constant pressure: W = PΔV. At constant volume (isochoric), ΔV = 0, so W = 0 and ΔU = Q.

What is the first law of thermodynamics?

The first law of thermodynamics is the law of conservation of energy applied to thermodynamic systems: the change in internal energy ΔU equals the heat Q added to the system minus the work W done by the system — ΔU = Q − W. Energy cannot be created or destroyed; it can only be transferred (as heat or work) or converted between forms. This means a perpetual motion machine of the first kind (one that produces energy from nothing) is impossible.

What is internal energy in thermodynamics?

Internal energy U is the total microscopic kinetic and potential energy of all particles in a system — including translational, rotational, and vibrational kinetic energies of molecules, and intermolecular potential energies. It is a state function: it depends only on the current state (temperature, pressure, composition), not the history. For an ideal monatomic gas: U = (3/2)nRT. Increasing temperature increases internal energy; phase changes involve internal energy changes at constant temperature (latent heat).

What is the difference between heat and work in the first law?

Both heat (Q) and work (W) are energy transfers across a system boundary, not stored quantities. Heat is energy transferred due to a temperature difference — it flows spontaneously from hot to cold. Work is energy transferred by a force acting through a distance (for gases, typically by expansion or compression: W = PΔV for constant pressure). Neither is "contained" in a system; only internal energy U is stored. After a process, you cannot say the system contains "this much heat" — only that its internal energy changed by ΔU = Q − W.

What is an adiabatic process?

An adiabatic process is one where no heat is exchanged with the surroundings (Q = 0). From the first law: ΔU = −W. Any work done by the gas comes entirely from internal energy (gas cools); any work done on the gas increases internal energy (gas heats up). Diesel engine compression is nearly adiabatic (compression is too fast for significant heat transfer), which is why the air-fuel mixture ignites from compression alone — no spark plug needed. The atmosphere also undergoes approximately adiabatic processes in rising and descending air masses.

Why is a perpetual motion machine impossible?

A perpetual motion machine of the first kind — one that produces useful energy from nothing, or runs indefinitely without any energy input — violates the first law of thermodynamics. The first law requires ΔU = Q − W: if no heat is added (Q = 0) and the machine does work (W > 0), then ΔU = −W < 0, meaning the machine's internal energy decreases until it runs down. You cannot extract net work from a system without supplying energy from outside. Every credible-seeming perpetual motion device either has a hidden energy source or is flawed in its energy accounting.

.

Share this article

Written by

Physics Fundamentals Editorial Team

Written and reviewed by our team of physics educators. Content is aligned with A-Level, GCSE, AP Physics, and undergraduate curricula.

About Physics Fundamentals →

Discussion

Comments

Leave a comment

Have a question about this article? Spot a mistake? Or just want to share your thoughts? We'd love to hear from you.

0/2000

Comments are moderated and appear after review. Be respectful and constructive.

Keep learning physics fundamentals

Get new articles and platform updates delivered to your inbox.

Physics Fundamentals

Channel · Updates only

👋 Get concise physics updates — new articles, calculators, and tools. Your number stays private. No spam. No group chats. Just worthy content.

Your number is never shared or visible to others

Join the Channel