 Let's say you and your friend are in front of this building and both of you want to get from the ground floor to the top floor which I have marked by points A and B and let's say one of you decides to take the lift and the other person takes the stairs. So in this situation let's say we want to calculate two values and these are we want to know what is the vertical displacement as you both go from A to B using different paths and we want to know how much time is taken to go from A to B in both of these cases that is by the lift and by the stairs. So in the first case it doesn't really matter if you take the lift or if you take the stairs. The vertical displacement is going to be same because what we're doing is if we think of this ground as our point of origin we are simply calculating the difference that is yB minus yA and in both cases the displacement is the same you can take the lift or you can take the stairs but you both are starting from the same initial position and you're both ending at the same final position. So if you think of vertical displacement as a function it is only depending on the initial and the final states and it does not depend on the path that you have taken to get there. Now let's look at the second calculation which is the time taken and assuming this is not a particularly slow lift we know that the time taken by the lift will be less than the time taken through the stairs. So here both you and your friends started from the same initial position went to the same final position but the time taken was different because you took different paths to get from A to B and so if you think of both of these quantities as functions the first one depends only on the initial and the final position whereas the second one is dependent on the path that you took to get from A to B. Now let's see how we can use this idea in the context of thermodynamics. In the situation that we saw just before we had an initial and a final position that we called A and B and if you are studying a thermodynamic system we need some ways to define these initial and final positions. So for that we use some thermodynamic variables which are things like pressure, temperature, volume and number of moles. So these are some of the most commonly used thermodynamic variables and how we use them to describe the state of a system is that we can say that the system went from some initial state with pressure P1, temperature T1, volume V1 and N1 number of moles to a state 2 where the pressure then became P2, the temperature was T2, the volume changed to V2 and the number of moles was N2. So these variables describe the initial state and these describe the final state of the system. Also it's not necessary that all of these have to be described to define the initial state. We could just describe let's say the initial volume and number of moles and the final volume and the number of moles or even just one of these. The point is we could be using a combination of any of these variables to describe the initial state of the system and the final state of the system which was like identifying the points A and B in the example that we saw before and just like we saw before we can also have thermodynamic functions which are either state functions or path functions. The difference being that the state functions will depend only on the initial and the final state. And the path functions depend on the exact path that we take to get from state 1 to 2. Let's go through them one by one. If we think of a system which is going from this initial state to this final state and let's say we know that the initial pressure was P1 and the final pressure was P2. If we look at the change in pressure which is the delta P that will only depend on the final and initial pressures because the delta P will be P2 minus P1. So this is an example of a state function. Similarly, we can also look at the change in temperature or the change in volume or number of moles and all of these are state functions. Another state function that we have is internal energy which is denoted by a U and if you think of a box with some gas molecules in it, the internal energy is a sum of different energies like the rotational energy of the molecules or the bond energies. So this is one catch all term that we use for all these different energies. Then there is also entropy which is denoted by S and entropy is a measure of how the order in a system changes as it goes from say state 1 to state 2. State functions can also be a combination of other state functions like we have enthalpy which is internal energy plus pressure times volume or Gibbs free energy which is enthalpy minus temperature times entropy. And don't worry if all of this seems a little bit unfamiliar right now because you learn more about them as we go through more thermodynamics. But the point is all of these quantities the internal energy, entropy, enthalpy, Gibbs free energy, all of these are state functions which only depend on the initial and the final state. And on the other side we have path functions. The most common examples of path functions are things like work and heat which is basically the work done by our system or the heat added or removed from the system. So to see how these are path functions, let's take an example. Let's say we are going from some initial state p1 v1 to some final state which is p2 v2. So for this change if I draw a pv diagram which is basically a graph of pressure versus volume, it will look something like this. So here we have our initial pressure and volume and this point corresponds to the initial state and this point is the final state where the pressure has now become p2 and the volume is v2. So as we go from 1 to 2, you can see that the pressure and volume both are increasing. And in this situation I can think of two ways to get from 1 to 2. So let's say I first start at this volume v1 and I keep the volume constant and I only increase the pressure. So I go from here to here and after increasing the pressure to p2, I then increase the volume from v1 to v2. So what I've done is I've broken this into two steps. So apart from this, another way to get from 1 to 2 would be to first increase the volume from v1 to v2 and then increase the pressure in the second step. Via both these parts, we got from our initial state to our final state, but we took different approaches to get there. So now if we were to calculate the work done on the system as we go from 1 to 2, it will depend on the path that we choose because we know that the work done in this case where we have a pv diagram is the area under the curve and we'll see later how we can derive this. But for now, let's just take it as a fact that we know that the area under a pv diagram is the work done. So in case of the yellow path, the area under the curve in this case will be this portion, which I've shaded in yellow here. Let me just separate this out. And now in the second path, if we were to calculate the work done, it'll be the area under this green curve, which is this shaded region. Let me just separate this out as well. So just by comparing these areas, you can see that the work done in case of the yellow path is much more than the work done in case of the green path. Although we are getting from the same initial position to the same final position, which is why we know that work is a path function. And right here, you can also see how pressure and volume are state functions because irrespective of the path we take, the yellow one or the green one, the initial position is at one and the final position is at two. So as long as this is the initial position and this is the final position, the difference in pressure or difference in volume is going to be the value at two minus the value at one. And unlike the work done, it does not depend on the path we take, which is why both of these are state functions.