 All right, so let's talk a little bit about how to actually obtain the value for an equilibrium constant. We have seen that we can obtain the value for an equilibrium constant. Equilibrium constant is the product of a bunch of partition functions. So if we're talking about a gas phase reaction with relatively small molecules where we can write down the partition functions, then we can calculate the equilibrium constant using this equation from scratch. And that works pretty well, but it's a lot of work. It's fairly hard work. And it doesn't apply in cases where we don't have a good way to write down the partition function. The other thing that we can do to calculate partition functions is we can take a step back. This is an equilibrium condition. This is the...actually, that's not true. The equilibrium condition is that product is equal to this product of molecules raised to their stoichiometric coefficients. The other equilibrium condition that we've seen, if we think back a few steps before we obtain this expression, is that when a system is in equilibrium, the sum of the stoichiometric coefficients times the chemical potentials had to add up to zero. When the reaction proceeds forwards or proceeds backwards, destroying reactants to make products or destroying products to make reactants in neither direction does it end up changing the net chemical potential of the system. So we can use this expression as it turns out to learn something about the equilibrium constant, and specifically it's going to tell us something about how the equilibrium constant is related to the free energy of the reaction. So let's explore this equation a little more. The chemical potential of the system for each species we've seen can be written as the standard state chemical potential plus RT log of activity. Activity, and that's certainly true under all circumstances, so that we can make this about some specific examples that we can make progress with. For gas phase reactions, I can write that chemical potential, I'm sorry, that activity. So first let's break this up into a sum of nu times mu naught. So I'm going to expand this sum, and I've also got nu times RT natural log. So I'm going to break this up into two separate sums instead of writing natural log of activity. If it's a gas phase reaction, and if I can trust the ideal gas law, then the activity is pressure, partial pressure of the gas divided by the standard pressure. So I've made an assumption or two in going from this equation to this equation, but this is true for gas phase reactions under relatively low pressure conditions. So this is the one that can turn out to tell us something about equilibrium constants. So let's take this second sum and move it over to the left side of the equation. So when I do that, it's going to become negative. As I do that, I'm going to pull the RT out of the sum. So I'm going to write RT times the sum of stoichiometric coefficients times the log of PI over P naught. That is equal to what's left on the right side is this sum of stoichiometric coefficients times standard state chemical potentials. So there's a few manipulations we can do here. Let's start, I guess, with the right side and remind ourselves that the chemical potential is the partial molar Gibbs free energy. So if I'm adding up stoichiometric coefficients times chemical potentials in the standard state, that's chemical potentials of the products minus chemical potential of the reactants all with their appropriate stoichiometric coefficients. So in other words, it's free energies of the products minus free energy of the reactants. This ends up being the free energy of the reaction under standard state conditions, the molar free energy of the reaction under standard state conditions. So that's just another name for some of the stoichiometric coefficients times chemical potentials. On the left side, inside the sum, I've got a constant times a log. So I can write that as log of this stuff raised to that constant. The RT, I'm going to prefer to have that over on the left side. So instead of putting a minus RT out front, I'm going to say minus 1 over RT on the right side. Next, what I'll do, since I have a sum, since I've gotten rid of all the things other than these logs that I'm adding up, I'm adding up log of this for i equals 1 and for i equals 2 and for i equals 3. The sum of these logarithms is the logarithm of the product. So I can rewrite that as log of, again, Pi over P0 raised to the new sub i multiplied together. Again, the sum of some logs is equal to the log of the product. And right side is still the same, minus free energy of the reaction over RT. Now that this is just the log of one quantity, I can undo that natural log by expeditiating both sides. So the log will disappear. On the right side, I'm going to have e to the minus delta g over RT. So I'll just rewrite the term in brackets, product of these pressures raised to the new i's over P0 raised to the new i's. I'll go ahead and pull the pressures out of the product like we've done several times before. They don't depend on which species we're talking about. So in fact, I pull out not just pressure 1 over P raised to the new, but since I pull that out for every term, I pull out 1 over P raised to the delta new, the change in the stoichiometric coefficient. And now that's enough for us to recognize that this term, product of pressures raised to their stoichiometric coefficients, that's an equilibrium constant. It's not molecules raised to their stoichiometric coefficient, so it's not K sub n. It's pressures raised to the stoichiometric coefficients. So this equation is going to become, that term I've underlined here becomes Kp. That's the pressure-based equilibrium constant. On the right side, I have e to the minus delta G over RT. And then instead of leaving 1 over P0 to the delta new on the left, I'll write P0 to the delta new on the right. So that's the main result we were after. That tells me how to obtain the pressure-based equilibrium constant if all I know is the Gibbs free energy of that reaction. So if I do know the change in Gibbs free energy of a reaction, I don't have to go to all the effort of calculating partition functions. I can use this expression instead. If I remember to include this term, standard pressure raised to the difference in stoichiometric coefficient. That turns out to be there largely to make sure our Kp has the units that it's supposed to, as we'll see when we work an example. So let's take a reaction like the formation reaction for ammonia. Nitrogen gas and hydrogen gas combine to form ammonia. If I do that reaction in the gas phase, I can ask myself, what is Kp for that reaction? To calculate it using this expression, I need to know the Gibbs free energy of the reaction. So the other piece of information I have to tell you is the Gibbs free energy of formation of NH3. If we go look that up in a table of Gibbs free energies under standard conditions at 298 Kelvin, that's negative 16.4 kJ per mole. So that's enough information now to ask the question, what is the equilibrium constant for that reaction? So first step is to calculate delta G of the reaction. We were given the delta G of formation for forming one mole of ammonia out of standard state products and reactants in their pure elements in their standard state. We need to know the delta G for this particular reaction, which is similar to the formation reaction, but not quite. So that's going to be products minus reactants. So add up Gibbs free energies of products times the stoichiometric coefficients minus the Gibbs free energy of reactants multiplied by their own stoichiometric coefficients. So the product we have is NH3. Its Gibbs free energy is negative 16.4 kJ per mole. It shows up twice. I subtract from that Gibbs free energy of formation of N2. N2 is an element in its standard state, so it has no Gibbs free energy formation. Subtract Gibbs free energy of formation of H2 three times. It's also an element in its standard state, so it has no Gibbs free energy. So this difference between Gibbs free energy of products minus Gibbs free energy of reactants works out to be twice negative 16.4 is negative 32.8. So that's the Gibbs free energy of reaction that we need to plug into this expression. So kp e to the minus delta g over RT. Now we just need to times standard pressure to the delta nu. We just need to plug this number in here. So I've got e to the, on the top we've got negative 32.8 kJ per mole or negative 32,800 Joules per mole. I'm going to divide that by R and by T. So R in Joules per mole kelvin is 8.314. This, I didn't write it down, but I mentioned as we were writing down the problem that this Gibbs free energy of formation is correct at 298 kelvin. So the temperature we need is 298 kelvin. So that's the exponential. This whole thing we're going to multiply by standard state pressure. So if we're doing this with a standard state of one atmosphere, now we need to figure out what delta nu is when we convert four molecules of reactants, one of N2 and three of H2. Four molecules of reactants are turning into two molecules of NH3. So I'm losing two molecules every time the reaction goes once. So the delta nu is negative 2. And now what our calculator tells me for this particular exponential, that works out to be a fairly large number, 5.6 times 10 to the fifth. The units are atmospheres to the negative 2. So what that's told us is all we need to know is the Gibbs free energy in order to calculate the pressure-based equilibrium constant for a reaction in the gas phase. If we didn't want a Kp, if we wanted a Kn or Kln, we could then convert to a different type of equilibrium constant if we're interested. Notice, as I said earlier, the purpose of this P0 to the delta nu, if you're using a standard pressure of one atmosphere, essentially all that does is introduce the correct units into the problem. Kp needs to have units of one over atmosphere squared in order for when we solve equilibrium problems that look like pressure of NH3 squared over pressure of N2, pressure of H2 cubed. The units on that Kp are not going to work out correctly unless it's got units of one over atmosphere squared because there's more pressures in the denominator than in the numerator. So that's told us something we didn't know before about how to calculate a value for Kp. The next thing to talk about is there is some temperature dependence to the equilibrium constant. Not only the temperature that appears explicitly inside this one over RT, but also the Gibbs free energy has some temperature dependence to it as well. So that's the next thing we'll talk about is how to understand what happens to the value of K as the temperature changes. And so that's coming up next.