Main content

## Physics library

### Course: Physics library > Unit 10

Lesson 3: Laws of thermodynamics- Macrostates and microstates
- Quasistatic and reversible processes
- First law of thermodynamics / internal energy
- More on internal energy
- What is the first law of thermodynamics?
- Work from expansion
- PV-diagrams and expansion work
- What are PV diagrams?
- Proof: U = (3/2)PV or U = (3/2)nRT
- Work done by isothermic process
- Carnot cycle and Carnot engine
- Proof: Volume ratios in a Carnot cycle
- Proof: S (or entropy) is a valid state variable
- Thermodynamic entropy definition clarification
- Reconciling thermodynamic and state definitions of entropy
- Entropy intuition
- Maxwell's demon
- More on entropy
- Efficiency of a Carnot engine
- Carnot efficiency 2: Reversing the cycle
- Carnot efficiency 3: Proving that it is the most efficient

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# What is the first law of thermodynamics?

Learn what the first law of thermodynamics is and how to use it.

## What is the first law of thermodynamics?

Many power plants and engines operate by turning heat energy into work. The reason is that a heated gas can do work on mechanical turbines or pistons, causing them to move. The first law of thermodynamics applies the conservation of energy principle to systems where heat transfer and doing work are the methods of transferring energy into and out of the system. The first law of thermodynamics states that the change in internal energy of a system delta, U equals the net heat transfer into the system Q, plus the net work done on the system W. In equation form, the first law of thermodynamics is,

delta, U, equals, Q, plus, W

Here delta, U is the change in internal energy U of the system. Q is the net heat transferred into the system—that is, Q is the sum of all heat transfer into and out of the system. W is the net work done on the system.

So positive heat Q adds energy to the system and positive work W adds energy to the system. This is why the first law takes the form it does, delta, U, equals, Q, plus, W. It simply says that you can add to the internal energy by heating a system, or doing work on the system.

## What do each of these terms (delta, U, comma, Q, comma, W) mean?

Nothing quite exemplifies the first law of thermodynamics as well as a gas (like air or helium) trapped in a container with a tightly fitting movable piston (as seen below). We'll assume the piston can move up and down, compressing the gas or allowing the gas to expand (but no gas is allowed to escape the container).

The gas molecules trapped in the container are the "system". Those gas molecules have kinetic energy.

The internal energy U of our system can be thought of as the sum of all the kinetic energies of the individual gas molecules. So, if the temperature T of the gas increases, the gas molecules speed up and the internal energy U of the gas increases (which means delta, U is positive). Similarly, if the temperature T of the gas decreases, the gas molecules slow down, and the internal energy U of the gas decreases (which means delta, U is negative).

It's really important to remember that internal energy U and temperature T will both increase when the speeds of the gas molecules increase, since they are really just two ways of measuring the same thing; how much energy is in a system. Since temperature and internal energy are proportional T, \propto, U, if the internal energy doubles the temperature doubles. Similarly, if the temperature does not change, the internal energy does not change.

One way we can increase the internal energy U (and therefore the temperature) of the gas is by transferring heat Q into the gas. We can do this by placing the container over a Bunsen burner or submerging it in boiling water. The high temperature environment would then conduct heat thermally through the walls of the container and into the gas, causing the gas molecules to move faster. If heat enters the gas, Q will be a positive number. Conversely, we can decrease the internal energy of the gas by transferring heat out of the gas. We could do this by placing the container in an ice bath. If heat exits the gas, Q will be a negative number. This sign convention for heat Q is represented in the image below.

Since the piston can move, the piston can

**do work on the gas**by moving downward and compressing the gas. The collision of the downward moving piston with the gas molecules causes the gas molecules to move faster, increasing the total internal energy. If the gas is compressed, the work done on the gas W, start subscript, start text, o, n, space, g, a, s, end text, end subscript is a positive number. Conversely, if the gas expands and pushes the piston upward,**work is done by the gas**. The collision of the gas molecules with the receding piston causes the gas molecules to slow down, decreasing the internal energy of the gas. If the gas expands, the work done on the gas W, start subscript, start text, o, n, space, g, a, s, end text, end subscript is a negative number. This sign convention for work W is represented in the image below.Below is a table that summarizes the signs conventions for all three quantities left parenthesis, delta, U, comma, Q, comma, W, right parenthesis discussed above.

delta, U (change in internal energy) | Q (heat) | W (work done on gas) |
---|---|---|

is plus if temperature T increases | is plus if heat enters gas | is plus if gas is compressed |

is minus if temperature T decreases | is minus if heat exits gas | is minus if gas expands |

is 0 if temperature T is constant | is 0 if no heat exchanged | is 0 if volume is constant |

## Is heat Q the same thing as temperature T, question mark

Absolutely not. This is one of the most common misconceptions when dealing with the first law of thermodynamics. The heat Q represents the heat energy that enters a gas (e.g. thermal conduction through the walls of the container). The temperature T on the other hand, is a number that's proportional to the total internal energy of the gas. So, Q is the

**energy a gas gains**through thermal conduction, but T is proportional to the total amount of**energy a gas has**at a given moment. The heat that enters a gas might be zero left parenthesis, Q, equals, 0, right parenthesis if the container is thermally insulated, however, that does not mean that the temperature of the gas is zero (since the gas likely had some internal energy to start with).To drive this point home, consider the fact that

**the temperature T of a gas can increase even if heat Q leaves the gas**. This sounds counterintuitive, but since both work and heat can change the internal energy of a gas, they can both affect the temperature of a gas. For instance, if you place a piston in a sink of ice water, heat will conduct energy out the gas. However, if we compress the piston so that the work done on the gas is greater than the heat energy that leaves the gas, the total internal energy of the gas will increase.## What do solved examples involving the first law of thermodynamics look like?

### Example 1: Nitrogen piston

A container has a sample of nitrogen gas and a tightly fitting movable piston that does not allow any of the gas to escape. During a thermodynamics process, 200, start text, space, j, o, u, l, e, s, end text of heat enter the gas, and the gas does 300, start text, space, j, o, u, l, e, s, end text of work in the process.

**What was the change in internal energy of the gas during the process described above?**

*Solution:*

We'll start with the first law of thermodynamics.

delta, U, equals, left parenthesis, plus, 200, start text, space, J, end text, right parenthesis, plus, W, start text, left parenthesis, p, l, u, g, space, i, n, space, end text, Q, equals, plus, 200, start text, space, J, right parenthesis, end text

delta, U, equals, left parenthesis, plus, 200, start text, space, J, end text, right parenthesis, plus, left parenthesis, minus, 300, start text, space, J, end text, right parenthesis, start text, left parenthesis, p, l, u, g, space, i, n, space, end text, W, equals, minus, 300, start text, space, J, right parenthesis, end text

Note: Since the internal energy of the gas decreases, the temperature must decrease as well.

### Example 2: Heating helium

Four identical containers have equal amounts of helium gas that all start at the same initial temperature. Containers of gas also have a tightly fitting movable piston that does not allow any of the gas to escape. Each sample of gas is taken through a different process as described below:

Sample 1: 500, start text, space, J, end text of heat exits the gas and the gas does 300, start text, space, J, end text of work

Sample 2: 500, start text, space, J, end text of heat enters the gas and the gas does 300, start text, space, J, end text of work

Sample 3: 500, start text, space, J, end text of heat exits the gas and 300, start text, space, J, end text of work is done on the gas

Sample 4: 500, start text, space, J, end text of heat enters the gas and 300, start text, space, J, end text of work is done on the gas

Sample 2: 500, start text, space, J, end text of heat enters the gas and the gas does 300, start text, space, J, end text of work

Sample 3: 500, start text, space, J, end text of heat exits the gas and 300, start text, space, J, end text of work is done on the gas

Sample 4: 500, start text, space, J, end text of heat enters the gas and 300, start text, space, J, end text of work is done on the gas

**Which of the following correctly ranks the final temperatures of the samples of gas after they're taken through the processes described above.**

A. T, start subscript, 4, end subscript, is greater than, T, start subscript, 3, end subscript, is greater than, T, start subscript, 2, end subscript, is greater than, T, start subscript, 1, end subscript

B. T, start subscript, 1, end subscript, is greater than, T, start subscript, 3, end subscript, is greater than, T, start subscript, 2, end subscript, is greater than, T, start subscript, 4, end subscript

C. T, start subscript, 4, end subscript, is greater than, T, start subscript, 2, end subscript, is greater than, T, start subscript, 3, end subscript, is greater than, T, start subscript, 1, end subscript

D. T, start subscript, 1, end subscript, is greater than, T, start subscript, 4, end subscript, is greater than, T, start subscript, 3, end subscript, is greater than, T, start subscript, 2, end subscript

*Solution:*

Whichever gas has the largest increase in internal energy delta, U will also have the greatest increase in temperature delta, T (since temperature and internal energy are proportional). To determine how the internal energy changes, we'll use the first law of thermodynamics for each process.

Process 1:

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(-500\text{ J})+(-300\text{ J}) \\ \Delta U&=-800\text{ J} \end{aligned}$

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(-500\text{ J})+(-300\text{ J}) \\ \Delta U&=-800\text{ J} \end{aligned}$

Process 2:

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(+500\text{ J})+(-300\text{ J}) \\ \Delta U&=+200\text{ J} \end{aligned}$

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(+500\text{ J})+(-300\text{ J}) \\ \Delta U&=+200\text{ J} \end{aligned}$

Process 3:

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(-500\text{ J})+(300\text{ J}) \\ \Delta U&=-200\text{ J} \end{aligned}$

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(-500\text{ J})+(300\text{ J}) \\ \Delta U&=-200\text{ J} \end{aligned}$

Process 4:

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(+500\text{ J})+(+300\text{ J}) \\ \Delta U&=+800\text{ J} \end{aligned}$

$\begin{aligned} \Delta U&=Q+W \\ \Delta U&=(+500\text{ J})+(+300\text{ J}) \\ \Delta U&=+800\text{ J} \end{aligned}$

The final temperatures of the gas will have the same ranking as the changes in internal energy (i.e. sample 4 has the largest increase in internal energy, so sample 4 will end with the largest temperature).

delta, U, start subscript, 4, end subscript, is greater than, delta, U, start subscript, 2, end subscript, is greater than, delta, U, start subscript, 3, end subscript, is greater than, delta, U, start subscript, 1, end subscript and T, start subscript, 4, end subscript, is greater than, T, start subscript, 2, end subscript, is greater than, T, start subscript, 3, end subscript, is greater than, T, start subscript, 1, end subscript

So the correct answer is C.

## Want to join the conversation?

- I understand that Q isn't the same thing as T, Q is heat that enters/exits the gas. ΔT might increase as Q enters, but ΔT also might stay constant or even decrease as Q enters the system, and so the opposite.

But it's still confusing me that from this expression Q = m.c.ΔT it shows that Q is the function of ΔT (delta T) which is the change in temperature, and from this ΔT is proportional to Q.

I would be grateful if anyone can help me with this confusion.(11 votes)- You say "ΔT also might stay constant or even decrease as Q enters the system, and so the opposite" - that is to do with the effect of W (work done on or by the gas in question), where ΔT is proportional to ΔU. In the expression Q = m.c.ΔT, W is not taken into account as it assumes a constant volume. You're just looking at raising the temperature of the substance with regard to the mass and specific heat capacity of the material, but not really considering the expansion of the gas pushing a piston or the piston pushing down on the gas (W). The Q = m.c.ΔT expression is only really appropriate for a constant volume.

See: https://chemistry.stackexchange.com/questions/4722/when-is-it-okay-to-use-q-mc-delta-t-is-this-equation-only-for-calorimetry-que(18 votes)

- why do we need second law of thermodynamics?Is energy really lost in second law of thermodynamics?(8 votes)
- Hello Muhammad,

This law concerns energy conversion. Suppose we had a machine that could convert electrical energy to mechanical energy (motor). In an ideal world it could do so without any loss. In reality the efficiency is not 100% and so we loose some energy to waste heat. The 2nd law of thermodynamics states that you can NEVER make a machine that converts 100% of the energy.

Likewise with a battery. When you charge the battery (electrical to chemical energy) there will be losses. When you discharge the battery (chemical to electrical) there will be losses.

Don't let anyone tell you otherwise - there is no such thing as perpetual motion machines!

Regards,

APD(13 votes)

- How does doing work on the system increase the kinetic energy of the gas molecules(4 votes)
- If the piston is pushed down (form of work done), its base would collide against the gas molecules, causing them to move faster and hence their kinetic energy is increased.

Hope this makes sense :)(11 votes)

- If the piston moves up when the gas expands (due to heat) and if the volume of the gas does not decrease, what allows the piston to move down again?

Thanks(4 votes)- not sure of your exact question

but if the piston moves back down, it is usually because it is being pushed by a mechanical force to squash (compress) the gas (or to push the gas out of the cylinder as waste)

The mechanical force comes from another part of the engine such as fly-wheel or other picston.

OK?(4 votes)

- In the article it says " temperature and internal energy are proportional", but I still don't understand. Internal energy is every kind of energy that exists in a system, including KE, PE and others. I understand that temperature is proportional to Kinetic energy, but KE is just part of what comprise total energy (Internal energy is every kind of energy that exists in a system, including KE, PE and others). So is temperature directly proportional to internal energy? And by saying A is proportional to B, is it necessarily equal to saying that A=kB, where k is a constant?(4 votes)
- I think the case that Internal energy is proportional to kinetic energy is mostly based on monoatomic ideal gas, which means in the system there are no other forms of energy except kinetic energy.(3 votes)

- In example 2,Sample 1 I cannot understand how does Heat Exits the system even when the work was done by the gas?

Similary in Sample 4 the heat enters the system even when work is done on the gas.

Explanations please anyone.(3 votes)- the most easy way to clarify this doubt is that consider yourself to be a candle. when it lights there is noble work done by the candle [ giving light to others (thermodynamically, work done by the gas ) ] but sadly the candle itself gets shorter and shorter( i.e thermodynamically heat loss) but when we add a little wax to it ( thermodynamically work done on the gas ) , the height increases ( heat enters the system)(2 votes)

- If you measure a liquid's heat (coffee for example) with a thermometer. Do you also lose heat to the thermometer?(2 votes)
- A hot liquid will lose heat to a cooler thermometer. The thermometer has to absorb thermal energy in order to measure it. Also a cold liquid might gain heat from a hot thermometer, right?

But note that you don't measure "heat" when you use a thermometer. You measure temperature. They're not the same thing.(2 votes)

- If I move a bottle of gas from a low place to a high place (it seems I am doing work, so "W" is positive), according to "ΔU=Q+W", is there an increase in internal energy?(1 vote)
- The gravitational potential energy of a system like the bottle is not part of the internal energy since it is not internal to the system, the bottle. Similarly the kinetic energy of the system from the motion of the entire system is not part of the internal energy. If you have two bottles of the same size, same amount of material in it at the same pressure and temperature but one is sitting on a table and the other is zipping by in a plane at 1000 meters above the table they have different kinetic energies but the internal energies are the same.(3 votes)

- i have a little confusion , if we raise the pressure by decreasing the volume, the temperature would stay constant if we follow the ideal gas law , so how can the temperature raise according to the thermodynamic law ?(1 vote)
- while preparing for the SAT subject tests physics from Barron's I read that they have taken the work done on the gas as positive.But we are told that W=P(change in volume). But if we apply force on the gas then its volume must decrease hence the work done must be negative please explain(its given on page 375)(1 vote)
- Its a good question... You will see that W changing sign and meaning throughout your reading unfortunately.

My answer to students is this: use your intelligence to define it within the context (or question) you are lookking at

for example, if a gas is expanding, it is doing work ON the atmosphere. Work is being done BY the gas.

If a piston squashes a gas, then it is doing work ON the gas. Work is being done BY the piston.

When you know what is doing the work and what its being done ON, then you can fix the signage in your equaitons appropriately.

Sorry to say, I have seen the negative sign in books given in different ways and not always clear; hence I am reluctant to give signage in equations on this topic : rather give clear understanding of the equaitons mean.

Hope that helps(2 votes)