If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# What are PV diagrams?

Learn what PV diagrams are and how to use them to find the change in internal energy, work done, and heat.

## What are PV diagrams?

Consider a gas sealed in a container with a tightly fitting yet movable piston as seen below. We can do work on the gas by pressing the piston downward, and we can heat up the gas by placing the container over a flame or submerging it in a bath of boiling water. When we subject the gas to these thermodynamics processes, the pressure and volume of the gas can change.
A convenient way to visualize these changes in the pressure and volume is by using a Pressure Volume diagram or PV diagram for short. Each point on a PV diagram corresponds to a different state of the gas. The pressure is given on the vertical axis and the volume is given on the horizontal axis, as seen below.
Every point on a PV diagram represents a different state for the gas (one for every possible volume and pressure). As a gas goes through a thermodynamics process, the state of the gas will shift around in the PV diagram, tracing out a path as it moves (as shown in the diagram below).
Being able to decode the information shown in a PV diagram allows us to make statements about the change in internal energy $\mathrm{\Delta }U$, heat transferred $Q$, and work done $W$ on a gas. In the sections below, we'll explain how to decipher the hidden information contained in a PV diagram.
Note: Unless otherwise specified, we will assume that the work $W$ refers to the work done on the gas.

## How do we determine the sign of the work done from a PV diagram?

Let's say our gas starts out in the state shown in the PV diagram below.
If we press the piston downward, the volume of the gas will decrease, so the state must shift to the left toward smaller volumes (as seen in the diagram below). Since the gas is being compressed we can also say for sure that positive work $W$ is being done on the gas.
Similarly, if we let the gas expand, pushing the piston upward, the volume of the gas will increase, so the state must shift to the right toward larger volumes (as seen in the diagram below). Since the gas is expanding we can also say for sure that negative work $W$ is being done on the gas.
So if we ever see a state shifting to the left on a PV diagram we can say for sure that the work done on the gas was positive. Similarly, if we ever see a state shifting to the right on a PV diagram we can say for sure that the work done on the gas was negative.

## How do we determine the magnitude of the work done from a PV diagram?

The work done during a thermodynamic process is equal to the area under the curve as seen in the diagram below.
The reason why work is equal to the area under the curve is that,
$W=F\mathrm{\Delta }x=\left(PA\right)\mathrm{\Delta }x=P\left(A\mathrm{\Delta }x\right)=P\mathrm{\Delta }V$
And since $P\mathrm{\Delta }V$ is just the of the rectangle shown above, the work is equal to the area. If we use pressure units of $\text{pascals}$ and volume units of ${\text{m}}^{3}$ then the energy we find will be in units of $\text{joules}$.
We have to be really careful with signs though. If the path on a PV diagram is directed to the left, the volume is decreasing, and positive work is being done on the gas. If the path on a PV diagram is directed to the right (as in the diagram above), the volume is increasing, and negative work is being done on the gas since ${W}_{\text{by gas}}=-{W}_{\text{on gas}}$.
It doesn't matter what shape the path takes, the area under the curve will still represent the work done. For any curved path we can imagine breaking the area into an infinite amount of infinitesimally thin rectangles.
The area of each rectangle would represent the work done during each infinitesimal step, and the sum of the areas would represent the total work done for the entire process.
It should be said that we are always going to assume these processes are taking place slowly enough that the entire gas can be at thermodynamic equilibrium at every moment (i.e. the same temperature throughout the gas). If this seems dubious to you, you're right to question it. However, even though basically no real world processes will exactly satisfy this requirement, our ability to model many thermodynamic processes are not fatally jeopardized by this lack of adherence to ideal circumstances.

## How do we determine the sign of $\mathrm{\Delta }U$‍  from a PV diagram?

Remember that internal energy and temperature are proportional $U\propto T$. So if the temperature increases, the internal energy must also increase.
Now, if the gas we're considering is an ideal gas we also know that,
$PV=N{k}_{B}T$
And if no gas is allowed to escape (so the number of molecules $N$ is constant) we can say that $PV\propto T$. All of this means that,
$U\propto T\propto PV$
So if the quantity of pressure times volume $\left(P×V\right)$ increases, the temperature $T$ and internal energy $U$ must also increase (which makes $\mathrm{\Delta }U$ positive). This idea is represented in the diagram shown below.
This means that anytime the state in a PV diagram ends up further up and right than where it started, $\mathrm{\Delta }U$ is a positive number. Similarly, anytime the state in a PV diagram ends up further down and left than where it started, $\mathrm{\Delta }U$ is a negative number.
Now if the state in the PV diagram moves up and left (pressure increases and volume decreases), or down and right (pressure decreases and volume increases), it is a little ambiguous whether the quantity $\left(P×V\right)$ actually increased or decreased (since one variable increased and the other variable decreased). To be sure, one would have to check the exact values of the initial and final $P$ and $V$ on the axes of the graph to tell if the quantity $\left(P×V\right)$ actually increased or decreased.
It is also good to note that if the quantity $\left(P×V\right)$ does not change, then the temperature $T$ and internal energy $U$ do not change either. For instance, if the pressure doubles, and the volume is cut in half, $\left(P×V\right)$ remains the same value (since $2P×\frac{V}{2}=PV$). the temperature $T$ and internal energy $U$ will end the process with the same values they started with.

## How do we determine the sign of $Q$‍  from a PV diagram?

Given a PV diagram, we typically have to rely on the first law of thermodynamics $\mathrm{\Delta }U=Q+W$ to determine the sign of the net heat that enters or exits a gas. If we solve this equation for the heat $Q$ we get,
$Q=\mathrm{\Delta }U-W$
Now that we know this, we can use what we know about finding the sign of $\mathrm{\Delta }U$ and $W$ to find the sign of $Q$ in many cases. So for instance, if the change in internal energy is positive and the work done is negative,
$Q=\left(+\right)-\left(-\right)=+\phantom{\rule{2em}{0ex}}$ ...the net heat must be positive.
Which makes sense, since if the internal energy increased even though work was done by the gas, that implies that more heat must have entered the gas than energy lost due to the work done by the gas.
Or for example, if the internal energy decreases and the work is positive,
$Q=\left(-\right)-\left(+\right)=-\phantom{\rule{2em}{0ex}}$ ...the net heat must be negative.
Which makes sense, since if the internal energy decreased even though work was done on the gas, that implies that more heat must have left the gas than energy gained by the gas from work being done on it.

## What do solved examples involving PV diagrams look like?

### Example 1: Finding signs

An ideal gas in a sealed container is taken through the process shown in the PV diagram below.
Select the correct statement about the signs of the following quantities: change in internal energy of the gas $\mathrm{\Delta }U$, net work done on the gas $W,$ and net heat that enters the gas $Q$

### Example 2: Finding area

An ideal gas in a sealed container is taken through the process shown in the PV diagram below. The initial volume of the gas is ${V}_{i}=0.25{\text{m}}^{3}$ and the final volume of the gas is ${V}_{f}=0.75{\text{m}}^{3}$. The initial pressure of the gas is and the final pressure of the gas is .
What is the work done on the gas during the process shown?
Solution:
We can find the work done by determining the total area under the curve on a PV diagram. We have to make sure we use the total area, all the way down to the volume axis. For instance, we can imagine viewing the area under the curve in the example shown above as a triangle and a rectangle (as seen below).
Now we just find the sum of the areas of the triangle and rectangle. The height of the rectangle is the pressure ${P}_{i}$ and the width of the rectangle is the change in volume $\mathrm{\Delta }V={V}_{f}-{V}_{i}$. So,
$\text{area 1}=\text{height}×\text{width}\phantom{\rule{1em}{0ex}}$ (area of the rectangle)
$\text{area 1}={P}_{i}×\mathrm{\Delta }V\phantom{\rule{1em}{0ex}}$ (height is ${P}_{i}$ and width is $\mathrm{\Delta }V$)
(plug in values)
(calculate)
We can find the area of a triangle by using $A=\frac{1}{2}bh$.
$\text{area 2}=\frac{1}{2}bh\phantom{\rule{1em}{0ex}}$ (area of the triangle)
(the height of the triangle is the difference in pressures ${P}_{f}-{P}_{i}$)
(the base of the triangle is the difference in volumes ${V}_{f}-{V}_{i}$)
(calculate)
So the total area under the curve is
This area represents the absolute value of the total work done during the process. To determine the sign of the work done on the gas we notice that the process moves the state to the right, causing the gas to expand. When gas expands the work done on the gas is negative. So,
(celebrate)

## Want to join the conversation?

• If work done by a system is equal to change in pressure-volume. Why does an upward and rightward shift in the pressure-volume diagram cause an increase in internal energy? Work done by the system should reduce the systems internal energy shouldn't it?
• The work done in expanding does in fact take energy out of the system, so the only way the state can shift to a higher PV value while the gas does work is to have even more heat Q added to the gas during the process so that overall the gas gains energy.
• maybe this is not a good doubt .. but if the gas has been compressed why is the work done on the gas positive? is nt work done = PdeltaV
so the work done by the gas should be negative if im not wrong
...
correct me if im wrong
• I would say is more a matter of semantics
- The work done on the gas is positive
- The work done by the gas is negative
The conservation of energy (first law of thermodynamics) states:
Internal Energy Change = Heat added into the System + Work done on the System
or
Internal Energy Change = Heat added into the System - Work done by the System
• If we were to forcefully pull the piston up instead of push down - would this be considered work in or out (+ or -). Just a little confused because we are applying a force (doing work) to move the piston but the volume is increasing and pressure decreasing so according to the convention the gas is doing work?? :)
• What if there is a closed path for a cyclic process?- This is confusing me.
• This is now explained in a little pop-up box in the middle of the article, but you may have missed it or it may have been added after your question.

While the cycle is moving L to R (increasing volume) the work done BY the gas (area under the curve) is considered positive. While the cycle is moving R to L (decreasing volume) the work done BY the gas is considered negative. The total work of the cycle is the sum of these two works (areas under the curves), but since one is negative, it's essentially the difference. The difference between the two areas is, by definition, the area within the cycle and that is the work done BY the gas during the cycle.

As for the sign, if the cycle is clockwise, that means the higher line (higher work area) was L to R (positive work), so the total W is positive. if the cycle is counterclockwise, that means the higher line (higher W area) was R to L (negative work), so the total W is negative (work was done ON the gas). But in the either case, the magnitude of the work is still the area inside the PV cycle.
• The slope of the PV diagram has the units N/m^5, does that mean anything?
Thanks
• The slope tells you how fast the pressure is changing with respect to volume. Slope m, is equal to Pressure/Volume, or dimensionally: m=(F/A)/V in SI units, it will be kg/(m^5) or kg*(m^-4)s^(-2). This tells you how fast the pressure is changing with volume for every kg of gas/atoms in the system per volume. If you think about classical mechanics, for example, a ball heading towards the earth, (neglecting air resistance and approximating the distance near the surface of the earth), the force is F=N=kg(m/s^2). Intuitively, you can think of it as I need to apply this force to move this object with this mass. And to see how long it takes, you divide by the time interval (1/s). The extra s is to account for the extra time needed to move the object that is already traveling with some velocity.

Sorry if I ended up confusing you more... The slope essentially tells you how fast the dependent variable (y-axis) is changing when you let the independent (x-axis) vary.

- (senior) physics/mechanical engineering
• I solved example 2 using integral Calculus. I found the equation of the line and then I calculated its definite integral from 0.25 to 0.75. Alas, I gost -45778 joules as final answer. Does this have to do with thwe fact that I did not account for the constant of the indefinite integral of the equation of the line? I guess so, but could refer me to some videos where Sal takes this into account? (Please do not bother to xplain the matematical technique here. Refer me some videos)
• When using calculus to calculate these changes you really have to take into account that the pressure isn't constant.
From ideal gas law, P = nRT/V
If you sub this in for P when integrating this takes the pressure changes into account.
W = -PdV
= -nRT X integral of 1/v
Giving final answer of, W = -nRT ln(Vf/Vi) (Vf = v final, Vi = v initial)
(1 vote)
• When a gas is doing work yet increasing its pressure, can we say that the pressure increase is definitely due to heat being added?
(1 vote)
• Unless gas is added, it is. If gas is doing work, its volume is increasing. As pressure and volume increases, T=PV/nR is increasing too. Thus, Delta U = Q - W is positive. As W is positive, Q should be positive.