 So we've been talking about reversible and irreversible processes and how the work done in a process depends on whether it's reversible or irreversible because the work is a path function. And so reminding you of the cases we've seen so far, when we let a gas expand from some v1 to v2, if we do it reversibly, then the pressure changes slowly and gradually. We can compare that to a case where we do it as irreversibly as possible, just let the pressure drop and then expand against constant pressure, or maybe we can have some intermediate case. The only reversible isothermal case is this upper line. There's a lot of different irreversible paths. And what we've seen so far is that numerically, for the cases we've seen so far, the work done when we do the process reversibly for an expansion of a gas, so let me make sure this is for an expansion. The work done in the reversible case has been less than the work done for the irreversible case, in particular the negative when a gas is expanding, the work is negative. So that negative number is a larger negative number for the reversible expansion than for the irreversible expansion. And the reason that's true is remember if we calculate the area under these curves, the area under this upper curve is a bigger number than the area under the lower curve. So if I draw the curves in a different color, for this process the area under the pink curve is a smaller area than the area under the upper green curve. So that means whatever irreversible line I draw, the size of that area, the magnitude of the reversible work is going to be a larger magnitude than under the irreversible curve. And because those values are negative, the larger negative number is smaller than the smaller negative number. And the other way we can think about it that is even if I weren't making large changes for a small infinitesimally small change, the tiny amount of work that I do for a reversible process is smaller, meaning more negative, than the amount of work I do for a irreversible process. So that all holds true for an expansion. Easiest way to think about that is perhaps with these graphical curves in the area under this curve with a negative sign in front of it. We can also ask ourselves how much of that is still true when we talk about the compression of an ideal gas. So now imagine we're not starting at V1 and going to V2, but we're starting at the large volume and going back to the smaller volume. So the reversible curve is exactly the same. When I take a gas and compress it reversibly, then I, an isothermally, then I'll move along this curve right here. If I were to compress it irreversibly, the way I have to do that is not by releasing the pressure and letting the gas spontaneously expand against that release pressure. To compress the gas irreversibly, first what I have to do is increase the pressure too much and then let the gas compress as a result. So a very irreversible compression would be go ahead and increase the pressure all the way to the final pressure and let the gas compress under that increased pressure. So this would be an irreversible compression and the green curve here would be a reversible compression. So if we think about the areas under the curves now, now the area under the blue curve is larger than the area under the reversible curve. So what we'd say in that case is from the magnitudes point of view, the blue irreversible compression has a larger area than the green reversible compression, but those are positive numbers. So it doesn't matter whether I include the magnitudes or not. So if I strip the magnitudes off the absolute value signs, the reversible work for compression is less than the irreversible work for compression. And that makes sense. Remember when we're talking about compression, this is work being done on the gas, energy we're supplying into the system in the form of PV work. And when I compress the gas smoothly, gradually, reversibly, I'm applying just as much pressure at every step as I need to make the gas compress. If I do an irreversible compression, whether it's via the curve I've drawn or perhaps via some other irreversible curve like that one, I've over-pressurized the gas. I've applied too much pressure, so I've done too much work. So the work that I've done in the irreversible process to compress the gas is larger than the work that I would have to do if I did it reversibly. So let me go ahead and write down the differential form of that expression. dW reversible is always going to be less than dW irreversible. So the convenient thing is both these two sets of equations tell us the same thing. Numerically, without worrying about magnitudes, just the value of the numbers, including positive and negative signs, reversible work is always less than irreversible work, regardless of whether we're doing an expansion or whether we're doing a compression. So reversible work is less than irreversible work. The physical interpretation of that statement means when a gas is expanding, when I'm letting it expand against some external pressure, then the value of the work is more negative, meaning it's a larger magnitude. So I can get the most work possible out of the gas if I'm allowing the gas to expand and the gas is doing work and I'm using that work to do something useful. I get the most possible work out of the gas, the largest magnitude of work out of the gas when I allow it to expand reversibly. On the other hand, for a compression, if I'm the one doing the work on the gas, then when I do the gas reversibly, I get to do the least amount of work possible on the gas when I do it reversibly. So in either case, reversible is good for us. We get a lot of work out of a gas when it expands reversibly. We don't have to do as much work when we compress it reversibly. So that's one way of remembering these inequalities is to remember that we, the external surroundings, are in the reversible process, either getting a lot of work out of the gas or doing as little as possible to the gas. So the next thing to talk about now that we have these inequalities is what's the equivalent statement not about work, but about heat. And we can, because we know the first law, there's a connection between heat and work, remembering that heat and work are path functions. These are inexact differentials, which means they're path functions. U is a state function. It's an exact differential. So it doesn't matter whether I write for a reversible process, du is dq plus dw. Also true for an irreversible process. First law is always true. So if I think about, again, some reversible path and some irreversible path, du is the same, remember du is a state function. So it doesn't matter what path I take. du is the same no matter how I get from state one to state two. So that du is either equal to this reversible dq plus a reversible work or irreversible dq plus the corresponding irreversible work. So if I set these two right-hand sides equal to each other, so I can say dq reversible and dw reversible must be equal to the same sum for any irreversible path that I choose. I already know something about the relative size of the reversible and irreversible works. So if I get these two dw's on the same side, let's put those both on the right. So I'll leave dw irreversible on the right, and I'll bring dw reversible over with a negative sign, and I'll get the q's both over to the left. So in that case I've got dq reversible, and I'll bring dq irreversible over with a negative sign, and now we know from the reversible work inequality, the irreversible work is always larger than, sorry, the irreversible work is always larger than the reversible work regardless of whether we're doing an expansion or a compression. So irreversible is larger than reversible, so this difference is a positive number. So whatever that difference is, it's the same as on the left-hand side, so this difference on the left also must be positive, and in particular the same positive number. So what that means is the reversible heat minus the irreversible heat is always going to give me a positive number. So what that means is the corresponding version of this statement for the heat is that dq reversible is always going to be bigger than dq irreversible, and notice that's the opposite sign as for the work. Reversible work is always smaller than irreversible, reversible heat is always larger than the irreversible heat. So if I do a process, whether it's a PV expansion process or any other type of process, the heat involved in doing that process reversibly is always going to be larger than when I do it irreversibly. So those two statements, the reversible heat inequality and the reversible work inequality turn out to be useful occasionally for telling us not only about heat and work, but as we'll see eventually some statements about entropy as well. But for now, we've done enough talking about work and reversible and irreversible work, so now that we can certainly also make statements about heat using the first law, we can also make some statements about the heat involved in various processes when we change the temperature of objects. So that's what we'll do next.