 All right, so we've progressed to the point where we understand equilibrium as being summed up by this expression, where if we're at equilibrium, if a chemical reaction is at equilibrium, this must be true. Some product of the amounts of each reactant and product raised to some powers must be equal to the product of some partition functions raised to some powers. This right-hand side, the partition functions raised to these stoichiometric coefficients, those partition functions are constants at a particular temperature. Stoichiometric coefficients are constant. This whole collection of things is a constant, and that's what we call the equilibrium constant. On the other hand, on this side, these numbers of molecules, those are going to depend on the extent of reaction. If we have the reaction hasn't proceeded forwards or backwards, then we have certain amount of reactants and products. If it's proceeded a little bit forwards, then the number of atoms or moles of products has changed. These n values depend on the extent of reaction or the reaction coordinate that we're calling C or squiggle. Depend on squiggle. What I mean by that, let's do an example so we can see in detail what I mean by that. Let's go back to our favorite reaction at the moment, the equilibrium reaction between hydrogen and bromine gas, forming hydrogen and bromide gas. Let's suppose as initial amounts of each of these substances, we have my initial, I'll write n naught, the initial amount of H2, let me make the initial amount of H2 and Br2 and HBr all equal to one another just for simplicity. Let's just say I have a mole and a half of each of these. I have a container, I throw in a mole and a half of hydrogen gas, mole and a half of bromine gas, and a mole and a half of HBr. Those are my initial amounts. After that reaction proceeds, maybe it's, and in fact, let me tell you one more thing about this reaction. Let's say we're doing this reaction at a particular temperature where the equilibrium constant is 1800. So put these molecules in a container, the reaction is going to proceed maybe forward, maybe backward. We want to find out how far forward, how far backward that reaction will proceed until it reaches equilibrium under which conditions this set of terms is equal to that equilibrium constant. So after the reaction has proceeded some amount, forwards, backwards, the number of molecules or number of moles of H2 remaining will be however many I started with. Since H2 is a reactant, I will have lost as many as the reaction coordinate says. I've lost as many as this extent of reaction. Likewise, number of moles of Br2 is its initial amount minus the extent of reaction HBr, on the other hand, I'm going to have the initial amount of HBr. And then since that's a product, I'm going to gain HBr if the reaction goes forward and in fact I'm going to gain two HBr, so I add twice Xe. And what I do with those amounts of each species is I say at equilibrium, this condition must be true. Amounts raised to the stoichiometric coefficients must equal the equilibrium constant. So setting this term equal to this term, reactants remember have negative stoichiometric coefficients when I raise them to the negative power they're going to appear in the denominator. So this looks like moles of the product HBr raised to its stoichiometric coefficient over moles of reactants H2 and Br2 raised to their stoichiometric coefficients, those negative coefficients put them in the denominator. That has to be equal to the equilibrium constant. So this is why we wrote down these equations for how much of each reactant and product we have at some particular extent of reaction just inserting these values into this equation. Moles of HBr is, let me go ahead and start using initial amount 1.5 moles of HBr plus twice the extent of reaction that gets squared in the numerator. In the denominator I've got initially one and a half moles of H2 minus some quantity and one and a half moles of Br2 minus squiggle. That all must equal the equilibrium constant K. So now I just have K remember something I know, I know the value of K. I'm solving for the value of squiggle. I just have an algebraic expression to solve for squiggle. What we do from this point is going to depend on what the particular reaction looks like. Every different set of initial conditions, every different set of stoichiometric coefficients will lead to a different algebra problem. In this case, since I have something squared on the top and conveniently this quantity times the same quantity is something squared on the bottom, so if I take the square root of both sides, I've got this ratio of one and a half moles plus two squiggles in the numerator, one and a half moles minus squiggle in the denominator has to equal the square root of K. Rearranging that, moving this denominator over to the right hand side. I've got one and a half moles plus two squiggle must be root K times one and a half minus squiggle. To solve for the extent of reaction I'll pull that over both of those squiggle terms over to the left side of the reaction. So I've got negative root K squiggle that I'm going to pull over here and make positive root K and I've also got a two squiggle on this side. On the right, I'm going to take this one and a half moles and put it over here. So I'll end up with one and a half moles from here and also one and a half moles times root K. So all together I've got one and a half moles times root K plus one. So then I can write down solving for the extent of reaction. It's going to be one and a half moles times root K plus one over root K and it looks like I have a sign error. Yes, I do have a sign error. This one and a half moles when it went over to this side was negative. Positive one and a half moles over here is negative one and a half moles over here. So the numerator is root K minus one, the denominator is root K plus two. So now I've delayed as long as I can sticking in this value of 1,800. If I take one and a half moles times square root of 1,800 minus one divided by square root of 1,800 plus two, that square root, that ratio of these square roots plus and minus some quantities, that works out to about 0.93. So I take 93% of one and a half moles and I end up at about 1.4 moles. All right, so algebra work is done. I've solved for squiggle, I've solved for the extent of reaction. All that tells me, however, is how far the reaction went forwards or backwards. I'm not quite done yet. I wanted to know how much of each reactant and product we had when we reached equilibrium. So if the reaction proceeded to this extent, 1.4 moles, then the amount of H2, Br2 and HBr, the amount of H2 and Br2 are both, in this case, one and a half moles minus the extent of reaction. So one and a half moles minus 1.4 gives me 0.1 moles. So I've only got 0.1 moles left of each of these reactants. The reaction went almost all the way forwards to completion, but not all the way. And then the amount of product I've got, the amount of HBr, that's the initial one and a half moles that I started with plus twice squiggle. So I'll go ahead and write that one out, one and a half moles plus twice the 1.40 moles that the reaction proceeded, 1.5 plus 2.8 gives me 4.3. So I've got 4.3 moles of HBr when the reaction reaches equilibrium. So in that sense, we're now done. As you can probably guess, when you solve equilibrium problems like this, the algebra problem is detailed enough that there's enough likelihood of an algebraic mistake if I hadn't caught my own algebraic mistake here. It's nice to be able to do a double check. We know that if we've successfully reached equilibrium, this must be true. The moles of HBr squared over the moles of H2 and the moles of Br2, that should come out equal to the equilibrium constant. So if I haven't made any mistakes, then if I take HBr squared, 4.3 squared, divide by H2 divided by Br2, so divide by that number twice, 0.1 mole for H2, another 0.1 mole for Br2. If we do this calculation, 4.3 squared divided by 0.1 divided by 0.1, plug that in the calculator, that'll give us a double check. In fact, that does when we round it off to two sig figs. That does give us 1,800 as it should. If we hadn't made any mistakes, this will always work out. But it's nice to be able to do this double check and make sure that you confirm your assumption that you had reached this value of the equilibrium constant. If I pay attention to units here, notice mole squared in the numerator cancels a mole and a mole in the denominator. That points out the fact that this value of K is unitless. If we didn't have a reaction where the molecularity was the same on the reactant and product side, if I didn't have two molecules of reactants turning into two molecules of products, then it wouldn't have been the case that the units of moles canceled in the numerator and the denominator. In that sense, even though the algebra might have felt a little bit tedious, this is a relatively easy problem because of the convenience of that molecularity being the same on the reactant and product side. These get a little more complicated and there's an extra source of complication when we have reactants where we have a different number of products than reactants. We'll see examples of that coming up soon.