 Alright, so we've seen a couple different ways of understanding what the partition function means, the partition function being the sum of the Boltzmann factors for any given system. We've seen that we can think of it either as normalization constant to make sure the probabilities sum to 1, or more interestingly we can think of it as related to the number of accessible states in a system. But there's one more important way to think about the partition function, and that's as a link between the microscopic properties of the system and the microscopic properties of the system. So to explain what I mean, let's consider the example of the system energy, and the energy of the system means slightly different things at the microscopic level and the microscopic level. Energy is just energy of course, but if I'm talking about the microscopic state of the system, and I'm talking about the individual energy levels the system can occupy, then knowing what that is requires complete knowledge of all the particles in the system and what they're doing and what their states are and what their energies are and how they add up to give me the total energy of the system. That's the microscopic understanding of the system. Macroscopically, if I ask you what is the energy of the gas in this room or what is the energy of a beaker full of water, you don't need to know anything about the individual quantum mechanical energy levels of the molecules that compose that system. You just give me a single number. When we call that number the internal energy, for example. So macroscopically, the energy is just one quantity that we could go and measure perhaps. Microscopically, we think of it as the sum of a bunch of individual energies of smaller components of the system and requires a lot more knowledge about the system. So the connection between these two energies, the internal energy, the macroscopic energy of a thermodynamic system, that's also the same thing as the expectation value, what we expect on average the energy of the system to be. And one way of calculating the average energy of the system is if I know what each one of the individual energies is, each one of those has some probability of the system being in that particular state. So if I add up the probabilities of being in each individual state, then that average tells me the average energy, which is the same thing as we call the thermodynamic macroscopic energy. But we know how to calculate probabilities that the system is in a particular state. Boltzmann tells us, and I'll exchange the orders of these two. So I'll write the energy first and then the probability is e to the minus energy of that state over kT divided by Q. So you can see Q is showing up in our link between the thermodynamic macroscopic energy and these microscopic energies. Q is just a number, if I pull that Q out of the sum, then we see that the sum we need to calculate is the sum of the energies multiplied by the Boltzmann factors. This is a slightly different sum than we've seen so far. It's not a sum of the Boltzmann factors, it's a sum of energies times the Boltzmann factors because we're calculating not probabilities, but probabilities times these energies. So this turns out to be interesting, and we can simplify this a little bit if we make use of a little trick. So on the side here, let's calculate not just Q, but how Q changes as we change the temperature. This may seem like a bit of a non sequitur, but this will help us simplify this expression in just a minute. So if I ask, what is the temperature derivative of Q, in other words, what is the temperature derivative of the sum of the Boltzmann factors, I write out e to the minus energy over kT for each of the states, take the derivative with respect to temperature. Temperature of course shows up up here in the denominator of the exponent. So two things to think about. First one I take the derivative of a sum, remember this is just the derivative of the first term plus the second term plus the third term plus the fourth term. So all I need to do is evaluate derivative of the first term plus derivative of the second term plus the derivative of the third term. So I just take the derivative of each of these terms and stick that inside a sum. Derivative of an exponential is an exponential multiplied by the derivative of the exponent. I have T and a negative sign in the denominator, so the derivative of minus e over kT is minus e over k, and 1 over T becomes 1 over T squared because it was a 1 over T, I introduce another negative sign. The derivative of T to the minus 1 is T to the minus 2 with a negative sign. So the two negative signs cancel. And I've got the sum of energy over kT squared times this Boltzmann factor. So the kT squared I can pull out of the sum, I can write this as 1 over kT squared sum of e times e to the minus energy over kT. So now you can see why we went on this little detour, the quantity inside the sum is exactly the same as the sum we're interested in over here. So rearranging this to put the kT squared on the other side, you see that the sum of energies times Boltzmann factors is equal to kT squared dq dt. So what that means is over here instead of actually bothering to evaluate the sum, the sum of the energies times the Boltzmann factors, I can just use the fact that that's equal to kT squared dq dt, and actually I'd rather write that as kT squared times 1 over q dq dt. And what we've seen here is actually something pretty powerful. If I know what the partition function of the system is, if I've already gone to the effort of calculating the partition function, then if I want to know the macroscopic energy of the system, all I need to do is take some derivatives of q with respect to T and I have an expression that tells me something about the energy. And we'll see examples of that relatively soon. But I don't have to go to the effort of recalculating a whole sum to calculate the energy. I get the energy directly from the partition function. So that's what I mean when I say the partition function is a link between the microscopic properties of the system that let us calculate the partition function to begin with. And then if we just calculate some derivatives of that partition function, that leads us directly to macroscopic properties like the energy of the system. We can actually make this one step more convenient with an additional mathematical aside. So just like we went on a tangent to find out what dq dt is, I'll do something similar and now I'll ask what is the temperature derivative of the log of q? And of course the derivative of the log of anything is 1 over that anything multiplied using the chain rule multiplied by the derivative of the stuff that was inside the log. So d log q dt is 1 over q dq dt and again it's convenient that that 1 over q dq dt is something we have over here. So if I replace 1 over q dq dt by this log, then we can see that a different way of writing the internal energy is not kt squared 1 over q dq dt but kt squared times the derivative of the log of q with respect to temperature. And that expression is important enough, I'll put that in a box for us to use later. It's equivalent to this expression if you calculate kt squared 1 over q dq dt, that will give you the same result but oftentimes because q involves some exponentials oftentimes this expression is more convenient to calculate. So again what we've seen is once we have q that gives us a direct shortcut to being able to calculate the macroscopic energy of the system, that's called a thermodynamic connection. It makes a connection between the energies, between the partition function and the macroscopic energy. Turns out there's a thermodynamic connection formula like this for other properties as well as the energy. And what we'll do in the next video lecture is talk about a similar thermodynamic connection formula that will let us calculate the pressure of a system.