 Now we can look at work from the thermodynamics standpoint. Back in mechanics, we defined work as the transfer of mechanical energy to a system, and it still is. In particular, positive work means energy was transferred in to a particular object or system, and negative work means energy was transferred out. We also saw in mechanics that force resulting in a displacement was how we got work. You had to have a force and you had to have a displacement, and the force had to result in that displacement. Now we're going to think of it in a little bit different terms, but highly related. Pressure and volume, because we're dealing with a gas. So let's go back to the equation we had from mechanics. Now this was the simplest one-dimensional equation for work. Where work was the work done by the force, f is the force, and that delta x was our displacement, or a change in position along the horizontal direction. Now we're going to take this equation and make it a little bit more general, and as applies towards thermodynamics, but doing it step by step so you can see the connection. What we really want is the work done on the gas, which is always the negative of the work done by the gas, and the work done by the force. And in particular, force is expressed as a gas as the force per area is the pressure. So if you know the pressure in the area, you've got the force. Similarly for a gas, we can express the volume in terms of the area and that horizontal distance. Now this is easier to see if I draw you a little cylinder here. The volume is going to be the area of the cylinder times the length of the cylinder. And the change in volume keeps that same constant area times just the little change in length of the cylinder. Now in general we can use this change in volume and pressure for a gas because it doesn't have to keep a constant shape. So they are more general and more applicable for gases. So bringing this all together for thermodynamics then, we can express the work done on the gas as minus P delta V. Now this assumed a constant pressure P, just like our general force for mechanics assumed a constant force. Well back in mechanics we didn't have to have a constant force, but in order to deal with it we had to use calculus. So the same thing is going to happen here. The more general equation is going to tell us that the work done on a gas is minus the integral of the pressure with respect to the volume. So you're taking the integral with respect to the volume of the pressure which may or may not be constant. So let's think again conceptually, if I've got an expansion that means the volume gets larger and my delta V or my dV is positive. And this is going to be caused by some sort of a higher pressure inside compared to outside. And that means the work is done by the gas on its surroundings and the gas loses its energy to the surroundings. So that means that the work done should be negative. If I go back to that general equation, the minus P dV, if my delta V is positive I end up with a negative work, which is what I expect. Similarly if I've got compression, it's sort of the opposite. My volume gets smaller, my delta V or dV is going to be negative. And this is generally caused by a higher pressure outside or if something causes the inside pressure to become lower. And that means that work is done on the gas by the surroundings and the gas gains energy from the surroundings because it's the surroundings that are doing the work. And that means the work done on the gas has got to be positive. So if we go back to our equation here, we have our negative out front. Our pressure is still positive but now our delta V is negative. And the negative times a negative gives us a positive. So indeed having this negative sign in here is what we want to be able to have our work correctly expressed for the work done on the gas, whether the gas is losing or gaining energy. Now this is a very quick introduction to the work done in thermodynamics. And when it comes to that integral, we're going to have to be careful when we get to very specific cases of what we're doing.