 Okay, so we've been thinking about this question of two systems that are in thermal contact with another. Energy can transfer between the two, but they're thermally insulated from their surroundings and we're curious about whether heat will transfer from A to B or vice versa. And we had gotten as far as saying, finding this thermodynamic relationship, the entropy changes as the energy changes for any one of these systems, or for in fact any system at all at this rate one over the temperature. So that's going to be a statement that's true for system A, that's true for system B, it's true for the combined system, it's true for everything. So if we go back to the question of whether heat is going to transfer from A to B or vice versa, so in what direction heat will transfer. So there's some amount of heat that's going to be transferred. We can say since we know we're doing this process at constant volume, that heat transfer at constant volume, we know is equal to the change in internal energy. So whatever the amount of heat transfer is also the same as the change in the internal energy. So let's say just for the sake of argument to choose a direction, let's say Q, the heat transfers from B to A. So what that means is this DU, if heat is transferring from B to A, the energy of A is increasing. So if there's some change in the energy, a positive DU will be a positive change for A and that's equal to the opposite in sign for B. If heat is transferred from B to A, energy changes equal in opposite sign for the A system, it is for the B system. So with those facts in hand and our new thermodynamic relationship, we can say total entropy is entropy of A plus entropy B. If some amount of heat or equivalent energy, internal energy is changing in the two systems, then the change in the total entropy as the energy changes is equal to whatever the change is in system A plus whatever the change is in system B. So I've taken D to U of both sides of this expression. Now I can write this since we know that the change in the energy is opposite in sign for A than it is for system B. I'll write DU as DUA in this first derivative. But for the second derivative where we're talking about system B, I'll write it as a negative DUB. And now I've got these two expressions, change in entropy as the energy changes. Now I've got those both written in the form that we can use here for system A. The rate of change of entropy as its entropy changes, that's just 1 over the temperature of system A. Likewise, the rate at which entropy of system B changes as its energy changes, that's 1 over the temperature of system B. And there's a negative sign separating the two because the energy transferred in out of one and into the other. So we want to know what's happening to the entropy of the system. We want the entropy of the system to increase. The thing that will happen spontaneously is the thing that increases the entropy. That's the most likely outcome. So if DSDU is positive, then that's the spontaneous direction. But if DSDU is negative, if the entropy is decreasing, that's the non-spontaneous direction. So let's consider a couple of cases. Let's consider, first of all, what if the temperature of system A is less than system B? System A is colder than system B, which is warmer. In that circumstance, 1 over the temperatures, the sign changes. So 1 over TA is, in fact, greater than 1 over TB. So if 1 over TA is greater than 1 over TB, the difference between the two is positive. So we say the entropy of the total system is increasing. And that process is going to be spontaneous. That's not a surprise to us. Remember, if system A is cold and system B is warm, is it spontaneous that heat energy will be transferred from the hotter system to the colder system? That certainly sounds reasonable, and the math and the thermodynamics backs us up. So it's spontaneous that heat will transfer from B to A if A is colder and B is warmer. On the other hand, if the opposite is true, if A is warmer than B, then 1 over TA is less than 1 over TB. And when I take 1 over TA minus 1 over TB, that change in the entropy will be a negative number. Decreasing the entropy makes the system less likely to be found in that state, so that is a non-spontaneous process. So summarizing what we found, for this specific example, in particular, where we've been able to assume the energy is constant, we have an isolated system. So for the specific case of an isolated system that cannot transfer energy with its surroundings, if we have heat transfer from the hot part of the system to the cold part of the system, as we had in case here, case number one, that's a spontaneous process. Heat transfer from the cold part of the system to the hot part of the system, as we had in case two, would be non-spontaneous. So that may not sound very earth-shattering. All we've figured out using thermodynamics is heat will spontaneously transfer from hot to cold, heat will never spontaneously transfer from a cold system to a hot system. That, of course, matches with our everyday intuition and doesn't seem that surprising. What this is is the first example, a specific illustration of a concept that's quite important, when considered more generally, that will describe when we can predict whether something's spontaneous or not spontaneous. So we'll sum up that general statement next.