A gas in a transparent cylinder being heated from below, its glowing energy pushing the piston upward, illustrating the first law of thermodynamics.

Thermodynamics

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

Every physics student meets a moment when energy seems to vanish. A gas expands, pushes a piston, cools down, and the numbers refuse to add up unless you track every joule. The first law of thermodynamics is the tool that makes them add up. It says energy cannot appear from nothing and cannot disappear into nothing. It can only move, change form, or sit stored inside a system.

Think of the law as a ledger. Energy enters a system as heat or leaves it as work, and whatever remains shows up as a change in the system’s internal energy. The equation looks short. ΔU = Q − W. Three symbols carry the whole idea, and most of the mistakes students make come from rushing past what each symbol really means. This article slows down for each one, fixes the sign convention that causes the most lost marks, and works through two full numerical examples so you can use the law with confidence.

What the First Law of Thermodynamics Says

The first law of thermodynamics is the law of conservation of energy applied to a thermodynamic system. A thermodynamic system is any part of the universe you choose to study, and everything outside it is the surroundings. The boundary is the real or imaginary surface that separates the two. A gas trapped in a cylinder with a movable piston makes a good system. The cylinder walls form the boundary, and the room around it is the surroundings.

For a closed system, one that exchanges energy but not matter with its surroundings, the law takes this form:

ΔU = Q − W

Here ΔU is the change in the internal energy of the system, Q is the heat added to the system, and W is the work done by the system on its surroundings. All three quantities are measured in joules. The law says the change in stored energy equals the energy that flowed in as heat minus the energy the system spent doing work.

Internal energy, U, is the total energy stored inside the system at the molecular level. It includes the kinetic energy of the molecules as they move, vibrate and rotate, plus the potential energy of the forces between them. You cannot measure U itself with a single instrument. You can only measure how much it changes, which is why the law deals with ΔU, the change, rather than U on its own. For an ideal gas the molecules barely interact, so its internal energy depends only on temperature. Warm the gas and U rises. Cool it and U falls. That single fact unlocks most exam questions about the law.

One point deserves emphasis before you calculate anything. Heat and work are transfers, not things a body contains. A gas does not contain heat. It contains internal energy. Heat is energy in transit because of a temperature difference, and work is energy in transit because of a force acting through a distance. Once the transfer ends, the heat and the work are gone as separate quantities. Only the change in internal energy remains, recorded in the temperature and the state of the gas.

What Each Term Means: ΔU, Q and W

Take the three terms one at a time. Each one has a plain meaning, a sign rule, and a unit. Learn all three and the equation starts to feel like common sense.

ΔU: the change in internal energy

ΔU measures how much stored energy the system gained or lost. The Greek letter delta means change, so ΔU is the final internal energy minus the initial internal energy. A positive ΔU means the system now holds more stored energy than before. In a gas that usually shows up as a higher temperature, since the molecules move faster. A negative ΔU means the system lost stored energy, and the gas cools. ΔU is measured in joules. Notice that ΔU depends only on the starting state and the ending state, not on the path the system took between them. Physicists call it a state function. Heat and work do not share this property, and that difference matters when you compare two different routes between the same two states.

Q: the heat added to the system

Q is the energy transferred into or out of the system because of a temperature difference. Heat flows from a hotter body to a colder one. When heat flows into the system, Q is positive. When heat flows out of the system into the surroundings, Q is negative. Put a flame under the cylinder and heat enters the gas, so Q is positive. Press the gas against a cold surface and heat leaves, so Q is negative. Q is also measured in joules. A process with no heat transfer at all has Q = 0, and such a process is called adiabatic. A well insulated cylinder comes close to this, because the insulation blocks heat flow while the piston still moves freely.

W: the work done by the system

W is the work the system does on its surroundings. When a gas expands, it pushes the piston outward against the outside pressure, and that push is work done by the system, so W is positive. When something pushes the piston inward and compresses the gas, the surroundings do work on the system instead. In that case W is negative, because the system did negative work. In plain language, the gas received work rather than doing it. W is measured in joules, like the other two terms.

For a gas expanding or compressing at constant pressure, the work has a simple formula:

W = pΔV

Here p is the pressure of the gas and ΔV is the change in its volume, final volume minus initial volume. If the volume grows, ΔV is positive and W is positive. If the volume shrinks, ΔV is negative and W is negative. This formula only works when the pressure stays constant during the change. For a changing pressure you would need a pressure volume graph and the area under the curve, but the constant pressure case covers most school and college problems.

The Sign Convention Students Get Wrong

The first law of thermodynamics is easy to state and easy to get wrong, because the signs carry half the meaning. Physics uses one convention. Chemistry uses the opposite one for work. Many students mix the two in a single calculation and lose marks on a question they understood. Fix the convention in your head before you touch the numbers.

In physics, the convention is:

QuantityPositive whenNegative when
Q (heat)Heat flows into the systemHeat flows out of the system
W (work)The system does work on the surroundingsThe surroundings do work on the system
ΔU (internal energy change)The system gains stored energyThe system loses stored energy

Read the table slowly. Q is positive when heat goes in. W is positive when work comes out. The two terms point in opposite directions, which is exactly why the law subtracts W. Energy in as heat adds to the store. Energy out as work drains it. Whatever is left over is ΔU.

The compression trap catches more students than any other part of this topic. Imagine someone pushes the piston in and squeezes the gas. Work is done on the gas, so W is negative. Now look at the law: ΔU = Q − W. Subtracting a negative number adds to the result. The internal energy rises, because the work done on the gas has nowhere else to go. Students who write W as a positive 400 J in a compression problem get ΔU wrong by 800 J, and they get it wrong in the wrong direction. The fix is a habit. Before you substitute any number, ask: did the system do this work, or was the work done on the system?

Chemistry textbooks write the same law differently:

ΔU = Q + W

In that version W means the work done on the system, so its sign flips. The physics is identical. Only the definition of W changes. Neither version is wrong, and an exam will use one of them. The safe habit is to write down your convention at the top of your working: “W is the work done by the system.” Then every sign you assign follows from that one sentence, and a marker can see exactly what you meant even if a number slips.

Worked Example 1: Gas Absorbs Heat and Expands

This is the classic first law problem, and it appears in some form on almost every thermodynamics paper. A gas in a cylinder absorbs 500 J of heat from its surroundings and expands, doing 200 J of work on the piston as it moves outward. Find the change in internal energy of the gas.

Step 1: List what you know. The gas absorbs 500 J of heat, so heat flows into the system and Q = +500 J. The gas expands and does 200 J of work on the piston, so the system does work and W = +200 J.

Step 2: Write the law and substitute. ΔU = Q − W. Put the numbers in: ΔU = 500 J − 200 J.

Step 3: Calculate. ΔU = +300 J.

Step 4: Interpret the answer. The positive sign means the internal energy of the gas increased by 300 J. The gas kept 300 J of the 500 J it absorbed and spent the other 200 J pushing the piston. Because the internal energy of an ideal gas depends only on temperature, a rise of 300 J in internal energy means the temperature of the gas went up. That is the whole story of the expansion in one line: heat in, work out, and the difference stays inside as hotter, faster moving molecules.

Check the answer against common sense. The gas received more energy than it spent, so its stored energy had to rise. If ΔU had come out negative, something would be wrong with the signs, because a system cannot lose stored energy while taking in more heat than the work it performs.

Worked Example 2: Adiabatic Compression

The second example is the one that separates students who understand the signs from students who memorised the formula. A gas is compressed quickly in a well insulated cylinder, so no heat flows in or out. During the compression, 400 J of work is done on the gas. Find the change in internal energy.

Step 1: List what you know. The cylinder is insulated and the compression is quick, so no heat transfers. Q = 0 J. Work of 400 J is done on the gas, which means the surroundings did the work. In the physics convention, work done on the system is negative, so W = −400 J.

Step 2: Write the law and substitute. ΔU = Q − W. Put the numbers in: ΔU = 0 J − (−400 J).

Step 3: Calculate. Subtracting negative 400 J gives ΔU = +400 J.

Step 4: Interpret the answer. The internal energy of the gas increased by 400 J. Every joule of compression work became stored internal energy, because no heat could escape through the insulation. The molecules move faster, the temperature rises sharply, and the pressure climbs too.

This is not just a textbook trick. A diesel engine uses exactly this effect. It compresses air in the cylinder so violently and so quickly that the air heats up enough to ignite the fuel the moment it is injected, with no spark plug at all. The compression is close to adiabatic because it happens too fast for much heat to escape, so the work done on the air turns into internal energy and the temperature jumps by hundreds of degrees. The same physics explains why a bicycle pump grows warm in your hand. Each stroke does work on the air inside, and that work shows up as a rise in internal energy and temperature.

The Four Special Processes

Four named processes appear again and again in thermodynamics questions, and each one simplifies the first law in its own way. Learn what each word means, write down what becomes zero, and the formula does the rest. These four also describe the stages of real engines and refrigerators, so they are worth knowing beyond the exam hall.

Isobaric: constant pressure

An isobaric process holds the pressure steady while the volume changes. The piston moves freely against a constant outside pressure. The work is W = pΔV, and the first law stays in its full form, ΔU = Q − W. Heating a gas in a cylinder with a loose piston is close to isobaric. Some of the heat raises the temperature and some pays for the expansion work.

Isochoric: constant volume

An isochoric process holds the volume fixed. The gas sits in a rigid sealed container, so nothing can expand or compress. With no change in volume, ΔV = 0, and the work is zero: W = 0. The first law collapses to ΔU = Q. Every joule of heat added goes straight into internal energy, and every joule lost comes straight out of it. A sealed boiler heating up is close to isochoric, and this is the simplest of the four cases to calculate.

Isothermal: constant temperature

An isothermal process holds the temperature fixed. The gas expands or compresses slowly, in good thermal contact with its surroundings, so heat flows in or out fast enough to keep the temperature steady. For an ideal gas, internal energy depends only on temperature, so a constant temperature means ΔU = 0. The first law then gives 0 = Q − W, or Q = W. All the heat absorbed becomes work done by the gas, and all the work done on the gas leaves as heat. A gas expanding very slowly in a water bath behaves nearly this way.

Adiabatic: no heat transfer

An adiabatic process allows no heat to enter or leave. The system is insulated, or the change happens too quickly for heat to flow. Q = 0, so the first law becomes ΔU = −W. Compress the gas and its internal energy rises by exactly the work done on it. Let it expand and its internal energy falls by exactly the work it performs. Worked Example 2 above was an adiabatic compression. The rapid expansion of gas in a refrigerator and the compression stroke of an engine are both close to adiabatic in practice.

Notice the pattern. Each process sets one quantity to zero or to a constant, and the first law answers with a simpler equation. When you meet a new problem, your first question should be which of the four words applies, because that tells you which term drops out before you calculate anything.

Common Mistakes

Most lost marks on the first law of thermodynamics come from a short list of errors. Work through them once, and check your own solutions against them until the checks become automatic.

The most common error is the sign of work done on the system. Compression means the surroundings do work on the gas, so W is negative in the physics convention. Write W as positive in a compression and your ΔU comes out wrong by twice the work. Always ask who did the work before you assign the sign.

The second error is mixing the physics and chemistry conventions in one calculation. If your textbook writes ΔU = Q + W, then W means work done on the system, and the signs flip. Pick one convention, state it, and use it for every line of the calculation. Switching halfway through is worse than picking the unfamiliar one.

The third error is treating heat as something a body contains. A hot gas does not contain a certain amount of heat. It contains internal energy, and heat is only the name for energy crossing the boundary because of a temperature difference. Questions that ask “how much heat does the gas contain” are traps. The answer is that the question has no meaning, and the correct quantity to ask about is internal energy.

The fourth error is using ΔU = Q − W for an open system or a steady flow device without thinking. The simple form applies to a closed system. A turbine or a refrigerator running steadily has gas flowing through it, and the analysis needs the steady flow form of the law. In a steady state device the internal energy of the device itself does not change over time, so ΔU = 0 for the device, and the energy in equals the energy out. Forgetting that step leads to answers that treat a running machine like a sealed box.

The fifth error is forgetting that the internal energy of an ideal gas depends only on temperature. In any isothermal change ΔU = 0, whatever else happens. Students who calculate a nonzero ΔU for an isothermal ideal gas expansion have missed the most useful shortcut in the topic. If the temperature does not change, the stored energy does not change, and Q must equal W.

Conclusion

The first law of thermodynamics is a bookkeeping rule, and its power comes from its simplicity. Energy can enter a system as heat or leave it as work, and the difference stays behind as a change in internal energy. Keep these formulas and rules together, and most problems in this topic reduce to choosing the right signs.

The core law is ΔU = Q − W, with every term in joules. Pressure volume work at constant pressure is W = pΔV. In an isochoric process the volume cannot change, so W = 0 and ΔU = Q. In an isothermal change of an ideal gas the temperature stays fixed, so ΔU = 0 and Q = W. In an adiabatic process no heat flows, so Q = 0 and ΔU = −W. The sign rules are short enough to memorise: heat into the system is positive, work done by the system is positive, and a rise in internal energy is positive. State your convention, assign the signs before you substitute, and check the answer against common sense. A gas that takes in more heat than the work it does must warm up, and a gas that is compressed without heat flow must warm up too. When the numbers and the story agree, the first law is doing its job.

Frequently Asked Questions

What does the first law of thermodynamics state in simple words?

The first law of thermodynamics states that energy cannot be created or destroyed, only transferred or changed in form. For a closed system, this means the change in internal energy equals the heat added to the system minus the work the system does on its surroundings, written as ΔU = Q − W. Energy entering as heat either raises the stored internal energy or pays for work done by the system.

What does ΔU = Q − W mean, and what do ΔU, Q and W stand for?

ΔU = Q − W means the change in a system's stored energy equals the heat it receives minus the work it performs. ΔU is the change in internal energy, the total kinetic and potential energy of the molecules, in joules. Q is the heat added to the system, positive when heat flows in. W is the work done by the system on its surroundings, positive when the gas expands and pushes a piston.

In the first law of thermodynamics, when is work W negative?

Work W is negative when the surroundings do work on the system instead of the system doing work on its surroundings. The classic case is compression: pushing a piston inward squeezes the gas, so the gas receives work rather than performing it. In the physics convention used here, that work is recorded as negative, and subtracting it in ΔU = Q − W adds to the internal energy, so the gas warms up.

Why do some textbooks write the first law of thermodynamics as ΔU = Q + W instead of ΔU = Q − W?

Some textbooks write ΔU = Q + W because they use the chemistry sign convention, where W means the work done on the system rather than by it. The physics is identical; only the definition of W flips its sign. Neither version is wrong, but mixing them in one calculation gives wrong answers. Always state your convention first, for example by writing 'W is the work done by the system,' and use it consistently.

How do you use the first law of thermodynamics to find the change in internal energy of a gas?

To find the change in internal energy, assign the signs for Q and W, then substitute them into ΔU = Q − W. Q is positive when heat flows into the gas, and W is positive when the gas does work on its surroundings. A gas that absorbs 500 J of heat and does 200 J of work has ΔU = 500 − 200 = +300 J, so its internal energy rises by 300 J and its temperature rises too.

What does the first law of thermodynamics say about an adiabatic process?

An adiabatic process allows no heat to enter or leave, so Q = 0, and the first law becomes ΔU = −W. If the gas is compressed, work done on it raises its internal energy, which is why a diesel engine can ignite fuel by compression alone. If the gas expands, it spends internal energy doing work, so its internal energy and temperature fall.

Similar Posts