 So in this video, I want to talk a little bit about heat engines and heat pumps and how they correspond back to our PV diagrams. Now we touched a little bit when we were talking about the PV diagrams about work done by a gas or work done on a gas. And the equation for the work done by a gas and the equation for the work done on a gas are very similar except for the sign. And we talked about how that matters which way is the energy being transferred. On a PV diagram, if you have a process which is moving towards the right here, then that means that your delta V is a positive value or the gas is expanding. Versus if you have something moving towards the left, that means the change in volume is negative. It's being compressed or it contracts. Well that also then relates to the work. See, if the volume is expanding, then the gas is pressing out into the surroundings and the work is transferring energy out of the gas. And when energy is going out of the gas, that's when we use the term work done by the gas. As opposed to if I had a negative value and the negative here and the negative here are going to actually cause a positive amount of work done on the gas. And that's when the work is being transferred into the gas by some external force. And so if the gas contracts or is compressed, we have work being done on the gas. Now when we talk about cycles, what we have is not a single process but a set of processes that ends up going back to where it starts. And it doesn't have to be a square but if the overall flow is going clockwise around the cycle. Versus if the overall flow is going counterclockwise around the circle. We have more work coming out in this case and more work coming in in this case. So this is what we call the heat engine and this is what we call the heat pump. Here's a couple of other diagrams. We'll talk more specifically about the Carnot cycle in our next lecture. But the other way they draw these is for one of these cycles where it's going clockwise. You get some amount of heat that comes into the gas, produces some work going out. But we also have some heat that's expelled out as we have to move back to our original point. So you get some heat coming in on one side, some heat being transferred out on the other side. And for an engine, what we have here is that we have more work going out but we've got heat coming in on the hot side and then we have a heat flow out on the cool side. More heat over here as a matter of fact the total amount of heat coming from the hot side is equal to the sum of those two things. Conversely if we have a pump it's going counterclockwise around the diagram and when you've got that pump we end up having a net amount of work in and it turns out we're actually drawing heat in from the cold side and we have heat out to the hot side. So they'll often use these sorts of diagrams as shown over here on this side to show the direction of energy flow. So keep that in mind as you're working on some of the practice problems in terms of which direction is the energy flowing. Both heat and work is a transfer of energy so it has to be transferred from some place to some place else.