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.

Main content

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 Δ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Δx=(PA)Δx=P(AΔx)=PΔV
And since PΔV is just the height× width of the rectangle shown above, the work is equal to the area. If we use pressure units of pascals and volume units of m3 then the energy we find will be in units of 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 Wby gas=Won 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 ΔU from a PV diagram?

Remember that internal energy and temperature are proportional UT. 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=NkBT
And if no gas is allowed to escape (so the number of molecules N is constant) we can say that PVT. All of this means that,
UTPV
So if the quantity of pressure times volume (P×V) increases, the temperature T and internal energy U must also increase (which makes Δ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, ΔU is a positive number. Similarly, anytime the state in a PV diagram ends up further down and left than where it started, Δ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 (P×V) 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 (P×V) actually increased or decreased.
It is also good to note that if the quantity (P×V) 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, (P×V) remains the same value (since 2P×V2=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 Δ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=ΔUW
Now that we know this, we can use what we know about finding the sign of Δ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=(+)()=+ ...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=()(+)= ...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 ΔU, net work done on the gas W, and net heat that enters the gas Q
Choose 1 answer:

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 Vi=0.25m3 and the final volume of the gas is Vf=0.75m3. The initial pressure of the gas is Pi=70,000 Pa and the final pressure of the gas is Pf=160,000 Pa.
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 Pi and the width of the rectangle is the change in volume ΔV=VfVi. So,
area 1=height×width (area of the rectangle)
area 1=Pi×ΔV (height is Pi and width is ΔV)
area 1=(70,000 Pa)×(0.75m30.25m3) (plug in values)
area 1=35,000 J (calculate)
We can find the area of a triangle by using A=12bh.
area 2=12bh (area of the triangle)
area 2=12b(160,000Pa70,000 Pa) (the height of the triangle is the difference in pressures PfPi)
area 2=12(0.75m30.25m3)(160,000Pa70,000 Pa) (the base of the triangle is the difference in volumes VfVi)
area 2=22,500 J (calculate)
So the total area under the curve is 35,000 J+22,500 J=57,500 J
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,
Won gas=57,500 J (celebrate)

Want to join the conversation?

  • blobby green style avatar for user joe blogs
    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?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • male robot donald style avatar for user PREDATOR
    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
    (2 votes)
    Default Khan Academy avatar avatar for user
    • female robot ada style avatar for user Rodrigo Campos
      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
      (5 votes)
  • marcimus pink style avatar for user humem005
    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?? :)
    (4 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seedling style avatar for user Miteqcomp
    What if there is a closed path for a cyclic process?- This is confusing me.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user C Hart
      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.
      (3 votes)
  • aqualine ultimate style avatar for user Hafsa Kaja Moinudeen
    The slope of the PV diagram has the units N/m^5, does that mean anything?
    Thanks
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Jay
      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
      (2 votes)
  • starky ultimate style avatar for user Tiago Dias
    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)
    (2 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user jbradbury994
      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.
      Leading to
      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)
  • blobby green style avatar for user Fardeen Ashraf
    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)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Dean Pavlovic
    why does the volume change determines work sign in the first place? to me, pressure change would be much more intuitive since thats what causing the imbalance - increasing alerady higher pressure in containter, while decreasing already low pressure in surrounding
    (1 vote)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Andrew M
      Work is force*distance. The volume change occurs because a wall of the container is being displaced. If you just increase the pressure and there is no volume change (think about how you would do that), no work is being done.
      (2 votes)
  • orange juice squid orange style avatar for user Juan Eduardo Ynsil Alfaro
    What if we use energy to push the piston up? Wouldn't it mean that we are losing energy?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user miARNr
    why In the PV diagram we are using the internal pressure to calculate the work ? shouldn't it be the external pressure as we have done in the previous videos ?
    (1 vote)
    Default Khan Academy avatar avatar for user