Laws of Thermodynamics

Four laws explain how temperature, energy and entropy behave. The zeroth law defines thermal equilibrium, the first law accounts for energy, the second law determines which direction a process can run, and the third law sets the reference for entropy at absolute zero.

Test a heat engine
Energy flow through a heat engine In one cycle the engine receives 1,000 kJ from a hot source, delivers 350 kJ of work and rejects 650 kJ to a cold sink. Hot source 1,000 kJ in Engine 350 kJwork out 650 kJ out Cold sink
One engine cycle. Follow the energy across the boundary.

The four laws at a glance

Choose the question you’re trying to answer.

Zeroth law of thermodynamics

If two systems are each in thermal equilibrium with a third, they are in thermal equilibrium with each other.

Put a thermometer in a stirred water bath and wait for a stable reading. Move it to a second bath. If the thermometer settles at the same temperature both times, the baths have the same temperature. Give them thermal contact and there is no net heat flow between them.

The thermometer is the third system. Its usefulness depends on reaching equilibrium each time. A probe moved straight from a hot pipe into cool water can briefly report a temperature that belongs to neither fluid.

First law of thermodynamics

Energy is conserved. A system’s energy changes by the net amount that crosses its boundary.

Draw a boundary around the gas in a sealed piston–cylinder. Heat enters the gas, and the expanding gas pushes the piston. With no mass exchange and negligible changes in bulk motion and elevation, the energy left in the gas increases its internal energy.

Worked example. Supply 500 kJ of heat and let the gas do 200 kJ of work. Its internal energy rises by 300 kJ. If a motor instead does 200 kJ of work on the gas, W is −200 kJ under the same convention. The increase becomes 700 kJ.

For a turbine or compressor, mass carries energy across the boundary too. Explore first-law balances for closed and flowing systems.

Second law of thermodynamics

The total entropy of an isolated system increases in an irreversible process and stays constant in a reversible one.

A hot mug warms a cool countertop. Imagine reversing that transfer so the mug grows hotter while the counter grows colder. The same amount of energy could leave one and enter the other, but the combined entropy would decrease. The reverse transfer cannot happen on its own.

Put numbers on direction. Let 60 kJ pass from a large reservoir at 400 K to one at 300 K. The hot reservoir loses 60/400 = 0.15 kJ/K. The cold reservoir gains 60/300 = 0.20 kJ/K. The net gain is 0.05 kJ/K. The colder reservoir gains more entropy per unit of heat.

400 KHot reservoir−0.15 kJ/K
60 kJ
300 KCold reservoir+0.20 kJ/K
The same heat leaves one reservoir and enters the other. Together, they gain 0.05 kJ/K of entropy.

A cyclic engine operating between two reservoirs also has a maximum efficiency. Try the limit below or read the second-law guide.

Third law of thermodynamics

The entropy of a pure, perfect crystal with a unique ground state approaches zero as its temperature approaches 0 K.

Think of an ordered crystal with only one way to arrange its particles in the lowest-energy state. That single arrangement sets the zero of the absolute entropy scale. A material with frozen-in disorder can retain residual entropy, so the perfect-crystal condition matters.

Where engineers encounter it. To find a substance’s absolute entropy at a higher temperature, start from the low-temperature reference and add the entropy gained during warming and any phase changes. This is the basis for tabulating absolute molar entropies.

Can this heat engine run?

Test a proposed engine over one complete cycle. It absorbs 1,000 kJ from a hot reservoir, rejects heat to a cold reservoir and delivers net work. The working fluid finishes in its starting state. These are its only energy exchanges.

The 350 kJ example

At 600 K and 300 K, producing 350 kJ of work leaves 650 kJ to reject. The efficiency is 350/1,000 = 35%. A reversible engine between those reservoirs could reach 50%. This proposed engine satisfies both laws.

Possible in this model

The energy balance closes and the reservoirs gain entropy overall. The claimed efficiency is below the reversible limit.

Energy imbalance
0 kJ
Claimed efficiency
35%
Carnot limit
50%
Reservoir entropy change
+0.50 kJ/K
Engine claim35%
Reversible limit50%
Both bars use the same 0–100% efficiency scale.
See the equations and assumptions

All heat and work values here are positive magnitudes per cycle. Heat input is fixed at QH = 1,000 kJ. Use absolute temperatures in kelvin; add 273.15 to degrees Celsius.

  • Energy imbalance = QH − W − QC. Zero means every kJ is accounted for.
  • Claimed efficiency = W / QH. Carnot limit = 1 − TC/TH for a reversible engine between two constant-temperature reservoirs.
  • Reservoir entropy change = QC/TC − QH/TH. The engine returns to its initial entropy. For a balanced cycle this sum is the entropy generated by the engine and reservoirs together.

For the worked example, 650/300 − 1,000/600 = +0.50 kJ/K. If 600 kJ of work and 400 kJ of rejection are claimed instead, energy still balances, but the total entropy change would be −0.33 kJ/K. Such a cycle cannot run between these reservoirs.

Which law would you use?

Choose a law before opening each answer.

A compressor warms insulated gas. Where did the energy come from?

First law. Follow a fixed mass of gas during compression. With negligible heat transfer, positive work done on the gas raises its internal energy. Insulation alone does not keep its temperature constant.

A refrigerator moves heat from cold food to a warm kitchen. How?

First and second laws. The compressor supplies work. If the refrigerator removes 300 kJ and uses 100 kJ of electricity per cycle, the kitchen receives 400 kJ. To check feasibility, you also need the hot and cold temperatures.

Two metal blocks feel different in the same room. Are their temperatures different?

Zeroth law. If both equilibrate with the same thermometer at the same reading, their temperatures agree. How cold a surface feels to your hand also depends on how rapidly it draws heat from your skin.

What sets the baseline for a crystal’s tabulated absolute entropy?

Third law. For a pure, perfectly ordered crystal with a unique ground state, start at zero entropy at 0 K. Entropy differences for an ordinary heating or cooling process can often be found without using that absolute baseline.

When a measured result looks impossible

If test data place an engine above its Carnot limit, check what the instruments measured before concluding the cycle violates a law.

  • Match the boundary. Shaft work at the engine and electrical output after the generator belong to different balances. Account for the generator loss if the boundary includes it.
  • Match the time interval. Integrate power in kW over seconds to get energy in kJ. Compare input and output over the same interval. A warming engine can store energy during startup.
  • Check the reservoirs. The simple Carnot calculation assumes two fixed temperatures. A cooling exhaust stream supplies heat across a range of temperatures. One outlet reading cannot represent that entire hot source.

Common questions about the laws

Are there three or four laws of thermodynamics?

Four laws are commonly named. They are numbered zero through three. Thermal equilibrium was given the name “zeroth law” after the first and second laws were established because temperature underlies both.

What is the difference between the first and second laws?

The first law balances the quantity of energy. The second sets the direction of change and limits how much work a cycle can deliver. In the example above, a 60%-efficient engine balances its energy yet exceeds the 50% limit imposed by its reservoir temperatures.

Can entropy decrease inside a system?

Yes. Water freezing releases heat and its entropy decreases. When freezing happens spontaneously, the surroundings gain enough entropy for the combined change to be positive.

Why can an electric heater turn all its input into heat?

Electrical work can dissipate entirely as thermal energy. The second-law limit applies in the other direction to a cyclic engine trying to turn heat drawn from a single reservoir entirely into net work.

Is heat the same thing as temperature?

Temperature determines the direction of spontaneous heat transfer. Heat is energy crossing a boundary because of a temperature difference. Two containers can have equal temperatures and very different amounts of internal energy.

Sources and further reading

Continue with entropy, heat engines or thermodynamic cycles, or return to the thermodynamics hub.

Scroll to Top