 Okay, so qualitatively, at least, we understand the condition that a reaction should obey when it's at equilibrium. That should be when its free energy is at a minimum. So more quantitatively, we can say that when the rate of change of the free energy as I change the extent of reaction, if I move a little bit forwards or a little bit backwards, if that rate of change of the Gibbs free energy is zero, when I do that reaction at constant temperature and pressure, then that's our condition for being at equilibrium. So in order to understand how to use that in an actual chemical system, let's see if we can understand what this condition, equilibrium condition means. We can start with the fundamental equation for the differential change in the Gibbs energy. That's going to be minus S dT plus V dP. And since we have a multi-component system, I need terms that look like chemical potential times the change in number of moles for each of this species, each of the components in my chemical reaction. We've specifically talked about the change in the free energy at constant temperature and pressure. So that simplifies this equation a bit. When I'm at constant temperature and pressure, dT is equal to zero, dP is equal to zero, and I can say that dG is equal to just the chemical potential term, some of the chemical potentials times the change in number of moles. So let's see what this looks like for an actual chemical reaction so we make sure we understand what that equation means. So if we stick with our chemical reaction that looks like H2 and Br2 reacting to form HBr. So the species we're talking about are H2 and Br2 and HBr. So the sum over species, chemical potential times change in number of moles, that's going to say the differential change in the Gibbs energy is going to be chemical potential of one component H2 times the change in number of moles of that component, plus chemical potential of Br2, change in moles of Br2, plus chemical potential of HBr, change in moles of HBr. So that's just a literal interpretation of what this equation says. But of course, when I undergo a chemical reaction, H2 and Br2 forming HBr, the change in moles of H2, change in moles of Br2, change in moles of HBr, those are all coupled to one another. I lose one mole of each of the products, of each of the reactants each time I gain two moles of product. So that's encapsulated in the fact that as we talked about when we define the extent of reaction and define this reaction notation, the change in number of moles is a stoichiometric coefficient times the change in the extent of reaction. So again, that feels a little abstract so let's make sure we understand what that means for this concrete specific case of this chemical reaction. The change in moles of H2, change in moles of Br2, change in moles of HBr, those are all related to one another. If I have some particular change in extent of reaction, the extent of reaction shifts a little bit forwards, a little bit backwards by some amount d-squiggle, then the stoichiometric coefficient for H2 is negative one. It's a reactant. So every time the reaction goes forward c times, I lose negative that many moles of H2. Likewise for Br2, change in moles of Br2 is its stoichiometric coefficient negative one multiplied by the change in the extent of reaction. With product HBr, I gain moles of HBr every time the reaction proceeds forward. So this notation, number one, couples these amounts together. They're all proportional to one another using the stoichiometric coefficients. It also allows me to define the change in extent of reaction. I can shift squiggle forwards. I can make the reaction go forwards in case I'm losing reactants and gaining products or if dc d-squiggle is negative, if the reaction is going backwards, dc is negative and I'll be gaining reactants and losing products. So with those substitutions, I can insert dNH2 is equal to negative d-squiggle here and this equation becomes muH2 times negative change in extent of reaction and then a negative change in extent of reaction times mu of Br2 and then a positive two mu of HBr times dc. That now that I've written all these in terms of change in the extent of reaction, I can rewrite this equation factoring out those dc terms. So I've got minus muH2 minus mu Br2 plus twice chemical potential of HBr. All of those multiplying dc, that's my change in the Gibbs free energy. Now remember the reason we started talking about the change in Gibbs free energy is I know that at equilibrium change in Gibbs free energy with a certain amount of change in the extent of reaction, that derivative is equal to zero. So now this equation I can just take that derivative, I can divide dg by dc, do that at constant temperature and pressure, which is when this equation is valid. At equilibrium dg, dc will be equal to zero and that derivative dg divided by dc is just negative muH2 minus muBr2 plus twice mu of HBr. All right, so that's what this equilibrium condition looks like for our specific reaction, the H2 and Br2 reaction. If I switch back to the general case, so maybe now it won't feel as abstract with this example to keep in mind, if I insert this dn into this expression to find that dg is equal to sum of mu times dn, but dn is equal to nu times d squiggle and that squiggle I can pull out of the parentheses just as I did over here, that's enough for me now to take this derivative dg with respect to dc and learn that that derivative is equal to zero when this quantity in parentheses is equal to zero. Sum, and I'll actually switch these around because I like them better in the other order, stoichiometric coefficient multiplying chemical potential. That matches the form I have it in over here, stoichiometric coefficients of negative one, negative one, positive two, multiplying chemical potentials of each component. Same thing is true here, I'll put this equation in a box because it's relatively important. This is our condition for chemical equilibrium. This statement says when the sums of the stoichiometric coefficients times the chemical potentials all add up to zero, the reaction is in equilibrium. You can look at this specific case and see that that makes a fair amount of sense. I am at this equilibrium point, my free energy is not going to change when I shift the reaction a little bit forward, a little bit backward as long as the amount of chemical potential that I lose when I consume 1H2 and Br2 is exactly balanced by the amount of chemical potential that I gain when I create two molecules of HBr. That's all this equilibrium condition says is the total change in chemical potential when I generate products and consume a stoichiometric amount of reactants, that doesn't end up changing the net total chemical potential or the net free energy of the system. This equilibrium condition, we can use that to identify when we're at equilibrium. If the sum is equal to zero, then we know we're at equilibrium. We can also use it to predict when a reaction will reach equilibrium, in particular we can predict what the extent of reaction will be that will result in this condition being true. That will get a lot less abstract when we do a particular example, so that's what we'll consider next.