Energy conservation for heat and work

First Law of Thermodynamics

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 the system does on its surroundings. Written ΔU = Q − W, it is the law of conservation of energy extended to heat. Energy can move in as heat, leave as work or change form, but it is never created or destroyed.

Pressure cooker on a gas flame venting steam, showing heat flowing into a system and raising its internal energy
Heat from the flame raises the internal energy of the water and steam inside the sealed cooker.

At a Glance

The first law of thermodynamics says ΔU = Q − W: the change in internal energy of a system equals the heat Q added to it minus the work W it does on its surroundings, all in joules. It means energy is conserved, so no machine can produce more energy than it takes in.

Developed by
Julius Robert von Mayer, James Prescott Joule, Hermann von Helmholtz, Rudolf Clausius
Clear statement
1850, by Clausius (after work from 1842 onward)
Formula
ΔU = Q − W
SI unit
joule (J) for ΔU, Q and W
Sign convention
Q > 0 when heat enters; W > 0 when the system does work
Applies to
Any closed system in any process; open systems also count the energy carried by matter flowing in and out
On this page
  1. What Does the First Law of Thermodynamics Say?
  2. The First Law Explained Simply
  3. What Is the Formula for the First Law?
  4. Why Do Some Books Write ΔU = Q + W?
  5. How Does the First Law Apply to Different Processes?
  6. Who Discovered the First Law of Thermodynamics?
  7. What Are Examples of the First Law in Everyday Life?
  8. What Can't the First Law Tell You?
  9. Practice First Law Problems
  10. Common Misconceptions
  11. Key Facts
  12. Quiz
  13. FAQ

What Does the First Law of Thermodynamics Say?

The first law is an energy budget for any system, whether it is a gas in a cylinder, a cup of coffee or a human body. Energy can cross the system's boundary in only two ways: as heat, driven by a temperature difference, or as work, driven by a force acting through a distance. Whatever comes in and does not go out stays inside as internal energy.

Internal energy is the total kinetic and potential energy of all the particles in the system. Raise it and the particles move faster or are pulled further apart, so the system usually gets hotter, melts or boils. Lower it and the opposite happens.

In everyday language, the law says you cannot get something for nothing. Every joule of work a machine delivers must be paid for with a joule of heat or a drop in stored energy. It is the thermodynamic version of the conservation of energy.

The First Law Explained Simply

Think of a system as a bank account of energy. Heat flowing in is a deposit. Work done by the system is a withdrawal. Internal energy is the balance. The first law is just bookkeeping: the change in your balance equals deposits minus withdrawals.

Rub your hands together and you do work on your skin, which raises its internal energy, so your palms feel warm. Put a pot of water on a stove and heat flows in, raising the water's internal energy until it boils. In both cases you can trace every joule. None of it appears from nowhere, and none of it vanishes.

Hands pushing a bicycle pump handle down, doing work on the air inside and raising its internal energy
Each fast stroke does work on the air, so its internal energy rises and the pump barrel warms.

What Is the Formula for the First Law?

In physics and engineering the first law is written ΔU=Q−W. Here ΔU is the change in internal energy, Q is the net heat added to the system and W is the net work done by the system on its surroundings. All three are measured in joules.

The minus sign makes sense once you see what W means. When a gas expands and pushes a piston outward, it spends some of its own energy on that work, so its internal energy goes down. For a gas expanding at constant pressure, the work is W=PΔV, covered on our work done by a gas page.

The law can be rearranged to find any one of the three quantities if you know the other two, as the worked examples show.

Here is the first law with each quantity and its SI unit, plus the rearranged forms for finding the heat or the work.

ΔU=Q−W
What each symbol means
SymbolQuantitySI unit
ΔUchange in internal energy of the systemjoule (J)
Qnet heat added TO the systemjoule (J)
Wnet work done BY the systemjoule (J)

Rearranged to find another variable:

Q=ΔU+WW=Q−ΔU

Valid for: sign convention (OpenStax, physics/engineering): Q > 0 when heat enters the system, W > 0 when the system does work on its surroundings. Chemistry texts and AP Physics 2 write ΔU = Q + W with W = work done ON the system.

Example 1 Gas in a cylinder with a sliding piston

A gas trapped under a piston absorbs 2,500 J of heat from a hot plate and, as it expands, does 900 J of work lifting the piston. What is the change in the gas's internal energy?

  1. Given:
    • net heat added TO the system: Q=2,500 J
    • net work done BY the system: W=900 J
  2. Formula: ΔU=Q−W
  3. Substitute: Q=2,500 J,W=900 J
  4. Answer: ΔU=1,600 J (1.6 kJ)

The rest of the heat that did not become work stays in the gas, so its temperature rises.

Diagram of a pot of water on a flame, heat entering the water and circulating, an example of Q raising internal energy
Heat added to the water from below is the Q term in the first law; with no work done, it all raises the internal energy.

Why Do Some Books Write ΔU = Q + W?

Two sign conventions are in common use, and mixing them up is the most frequent mistake students make. Physics and engineering texts define W as work done by the system, giving ΔU=Q−W. Chemistry texts and some AP courses define W as work done on the system, giving ΔU=Q+W.

Both versions describe exactly the same physics. If a gas is compressed, work is done on it: that work is positive in the chemistry version and negative in the physics version. Either way the gas gains internal energy. The trick is to pick one convention, state it clearly, and stick to it for the whole problem. The table below compares them.

Example 2 A quick push on a bicycle pump

You push a bicycle pump handle down sharply, doing 45 J of work on the air inside. The stroke is so fast that no heat escapes. Since the air has work done on it, the work done by the air is −45 J. What is the change in the air's internal energy?

  1. Given:
    • net heat added TO the system: Q=0 J
    • net work done BY the system: W=−45 J
  2. Formula: ΔU=Q−W
  3. Substitute: Q=0 J,W=−45 J
  4. Answer: ΔU=45 J

The air's internal energy rises, which is why the bottom of a pump feels warm after a few hard strokes.

The two sign conventions for the first law of thermodynamics
SituationPhysics form ΔU = Q − WChemistry form ΔU = Q + WEffect on internal energy
Heat flows into the systemQ positiveQ positiveIncreases
Heat flows out of the systemQ negativeQ negativeDecreases
Gas expands, pushing on surroundingsW positiveW negativeDecreases
Gas is compressed by surroundingsW negativeW positiveIncreases
Source: Sign rules from our formula data (OpenStax physics convention; chemistry and AP Physics 2 use work done on the system) · Retrieved October 2026

How Does the First Law Apply to Different Processes?

Most textbook problems involve one of a few special processes, and each one makes a term in the first law vanish:

  • Isothermal (constant temperature): for an ideal gas, internal energy stays the same, so Q=W. All the heat absorbed becomes work.
  • Adiabatic (no heat exchanged): Q=0, so ΔU=−W. A gas that expands cools down, and a gas that is compressed heats up.
  • Isochoric (constant volume): no work is done, so ΔU=Q. Every joule of heat raises the internal energy.
  • Isobaric (constant pressure): heat splits between raising internal energy and doing work PΔV.
  • Cyclic: the system returns to its starting state, so ΔU=0 and the net heat in equals the net work out. Every heat engine runs on cycles like this.

On a PV diagram, the work in each process is the area under the curve, which makes these cases easy to compare.

Example 3 How much heat did the balloon take in?

A sealed party balloon warming in the sun gains 500 J of internal energy while the gas inside expands and does 200 J of work pushing back the surrounding air. How much heat did the gas absorb?

  1. Given:
    • change in internal energy of the system: ΔU=500 J
    • net work done BY the system: W=200 J
  2. Formula: Q=ΔU+W
  3. Substitute: ΔU=500 J,W=200 J
  4. Answer: Q=700 J

Heat had to cover both jobs: raising the internal energy and doing the work of expansion.

How the first law simplifies for common processes of an ideal gas
ProcessWhat stays constantWhich term is zeroFirst law becomes
IsothermalTemperatureΔU = 0Q = W
AdiabaticNo heat exchangeQ = 0ΔU = −W
IsochoricVolumeW = 0ΔU = Q
IsobaricPressureNoneΔU = Q − PΔV
CyclicReturns to startΔU = 0Net Q = net W
Source: Derived from ΔU = Q − W and W = PΔV · Retrieved October 2026

Who Discovered the First Law of Thermodynamics?

No single person discovered the first law. In the early 1800s, many scientists still thought heat was an invisible fluid called caloric. Through the 1840s that idea collapsed. Julius Robert von Mayer argued in 1842 that heat and work are two forms of one conserved quantity, and Hermann von Helmholtz set out general energy conservation in 1847.

The experimental proof came from James Prescott Joule, who from 1843 onward showed that a fixed amount of work always produces the same amount of heat. In his best-known setup, falling weights turned a paddle wheel in water and warmed it slightly; you can explore it on our Joule paddle wheel experiment page. Today we know 1 calorie of heat equals 4.186 J of work.

In 1850 Rudolf Clausius gave the first clear statement of the law in thermodynamic form, linking heat, work and internal energy in the way we still use.

What Are Examples of the First Law in Everyday Life?

The first law is at work every time energy changes hands:

  • Car engines: burning fuel releases heat into gases in the cylinders, and those gases do work pushing the pistons. The heat not turned into work leaves through the exhaust and radiator.
  • Aerosol cans: spraying for a few seconds lets the gas expand quickly, and the can feels cold because the gas did work at the expense of its internal energy.
  • Your body: food energy is turned into work by your muscles and into heat that keeps you at about 37 °C. See energy and power in the human body.
  • Diesel engines: compressing air hard and fast heats it enough to ignite fuel without a spark plug.
  • A pressure cooker: its sealed lid keeps the volume fixed, so nearly all the heat from the burner goes into the contents.

The energy bars below follow a simple case: a falling weight that stirs water does work on it, and all of the weight's potential energy ends up as thermal energy in the water.

Energy bars for a 2 kg weight falling 2.5 m: 49 J of potential energy becomes 49 J of thermal energy in stirred water
The work done by the falling weight on the water appears as an equal rise in the water's internal energy.

What Can't the First Law Tell You?

The first law tells you how much energy is involved, but not which way a process will go on its own. It would be perfectly happy with a cold spoon warming up a hot cup of tea, as long as the energy balanced. It is the second law of thermodynamics and the idea of entropy that rule out such events.

The first law does rule out one famous dream: a perpetual motion machine of the first kind, which would put out more energy than it takes in. Patent offices still receive designs for such machines, and every one fails the first-law check.

Practice First Law Problems

The best way to master the sign conventions is to work through several problems. Start with the worked examples above, then use our thermodynamics formulas sheet and the overview of all four laws of thermodynamics, and finish with the quiz below.

Common Misconceptions

Myth: Heat and internal energy are the same thing.

Physics: Heat is energy in transit because of a temperature difference. Internal energy is what a system contains; a system holds internal energy but does not hold heat.

Myth: If a gas is heated, its temperature must rise.

Physics: Not always. In an isothermal expansion, all the heat absorbed becomes work, so the internal energy and temperature of an ideal gas stay the same.

Myth: The first law means energy can never be wasted.

Physics: Energy is never destroyed, but it can spread out as low-temperature heat that is useless for doing work. The second law describes that loss of usefulness.

Myth: W in the first law always means work done on the system.

Physics: It depends on the textbook. In ΔU = Q − W, W is work done by the system; in ΔU = Q + W, it is work done on the system.

Key Facts

  • The first law of thermodynamics states that ΔU = Q − W, the change in internal energy equals heat added minus work done by the system.
  • It is the law of conservation of energy applied to systems that exchange heat and work.
  • Heat, work and internal energy are all measured in joules.
  • Physics texts use W as work done by the system; chemistry texts use work done on the system and write ΔU = Q + W.
  • In an adiabatic process no heat is exchanged, so a compressed gas warms and an expanding gas cools.
  • In a complete cycle, internal energy returns to its starting value, so net heat in equals net work out.
  • Rudolf Clausius gave the first clear statement in 1850, building on work by Mayer, Joule and Helmholtz.
Did you know? Joule's measurements were so delicate that the temperature rise of the water in his paddle-wheel experiments was only a fraction of a degree, so he relied on unusually sensitive thermometers that could show tiny fractions of a degree.

Quick Quiz: How Well Do You Know First Law of Thermodynamics?

6 questions. Tap an answer to check it.

  1. Which equation states the first law of thermodynamics in the physics sign convention?

  2. A gas absorbs 500 J of heat and does 200 J of work. What is ΔU?

  3. In an adiabatic process, which quantity is zero?

  4. For a gas held at constant volume, the first law becomes:

  5. Which kind of machine does the first law rule out?

  6. Whose experiments with falling weights and a paddle wheel showed that work produces a fixed amount of heat?

Frequently Asked Questions

What is the first law of thermodynamics in simple terms?

The first law says energy cannot be created or destroyed, only moved or changed in form. For a system like a gas, the energy it gains as heat either stays inside, raising its internal energy, or leaves as work done on the surroundings. Written as an equation, the change in internal energy equals heat in minus work out: ΔU = Q − W.

What is the formula for the first law of thermodynamics?

In physics the formula is ΔU = Q − W, where ΔU is the change in internal energy, Q is the heat added to the system and W is the work done by the system. In chemistry it is often written ΔU = Q + W, with W as the work done on the system. Both forms describe the same energy balance with different sign choices.

Why is the first law called the law of conservation of energy?

Because it is conservation of energy applied to thermal systems. Before the 1840s, heat was not recognized as a form of energy, so energy conservation seemed to fail whenever friction or burning was involved. Once heat was counted as energy in transit, the books balanced: energy added as heat plus energy added as work always equals the change in stored energy.

What is an example of the first law of thermodynamics?

Pumping up a bike tire is a good example. Each push of the handle does work on the air in the pump, and because the strokes are fast, little heat escapes. The air's internal energy rises, so it gets hotter, and you can feel the pump barrel warm up. The work you did became internal energy of the air, as the first law predicts.

What is the difference between the first and second laws of thermodynamics?

The first law is about quantity: energy is conserved, so the books must balance. The second law is about direction and quality: heat flows on its own only from hot to cold, total entropy never decreases, and no engine can turn all its heat into work. A process can obey the first law and still be impossible because it breaks the second.

What is internal energy in the first law?

Internal energy, U, is the total energy stored in the random motion and interactions of a system's particles. For an ideal gas it depends only on temperature. The first law does not need its absolute value, only how much it changes, which is why the equation uses ΔU. Heating a system or doing work on it raises U; letting it do work or lose heat lowers it.

What happens to the first law in an adiabatic process?

In an adiabatic process no heat crosses the boundary, so Q = 0 and the law becomes ΔU = −W. If the gas expands and does work, its internal energy falls and it cools, which is how clouds form in rising air. If the gas is compressed, work is done on it, its internal energy rises and it heats up, as in a diesel engine cylinder.

Does the first law apply to living things?

Yes. A body takes in chemical energy from food and uses it to do work, such as moving muscles, and to produce heat that keeps body temperature steady. Any energy taken in but not used is stored, mostly as fat. Over time, energy in from food equals the work done plus heat released plus the change in stored energy.

Sources

Constants come from NIST CODATA 2022 (public domain) and unit definitions from the BIPM SI Brochure (CC BY 4.0). Text, diagrams and illustrations are original work by Physics Tribune.

Physics Tribune Editorial Team
Written by our editors and checked against NIST and BIPM reference data. Every worked example is recomputed in code. Read our editorial policy. Last updated October 2026.