 So one of the most useful uses of the chemical potential will be, will allow us to talk about phase equilibrium in multi-component systems. So we understand a lot about phase equilibrium in single-component systems already from our work with phase diagrams. So just as a reminder, if we have a liquid and a gas in coexistence with each other, that's what we mean by phase equilibrium, two different phases in equilibrium with each other. We understand that by thinking about things like phase diagrams that tell us at a particular temperature and pressure, which phase is more stable where the coexistence line is between the liquid and the gas phases and so on. So that's a reminder of how to think about phase equilibrium in a single-component system. What do I mean by phase equilibrium in a multi-component system? If we only have one substance, water and water vapor existing in two different phases, for a multi-component system, the equivalent picture would be, so I have again a liquid phase with two components, component A and component B both floating around in the liquid phase. You can think of that as a mixture of water and propanol or hexane and pentane or something like that, a mixture of two different fluids in equilibrium with their gases. So above that liquid phase we have compound A and compound B up in the gas phase and molecules of A might evaporate from the liquid or condense from the vapor back down into the liquid and similarly for B. So that would be a multi-component two-phase equilibrium system. The question is then what would a phase diagram look like in that system? When we use what we know about thermodynamics to predict the same sorts of things we can predict for the single-component system. We can predict boiling points, we can predict vapor pressures, turns out we'll be able to predict the same information about a multi-component system as well as questions about composition. If I make a 50-50 mixture in the liquid, will it also be 50-50 in the vapor phase or will it not? So chemical potential will help us understand those types of questions. So to begin answering those questions, let's say first of all we don't need to only be talking about liquid and gas, let's say we have phase alpha and phase beta. So I've drawn a picture of a liquid and a gas, but that could be solid and liquid, it could be solid and gas, it could be any two phases that we're interested in. I'll just call them phase alpha and phase beta to keep it general. And let's say, let's start by saying as a way of working our way towards chemical potential, let's start with the free energy, the Gibbs free energy. So the total Gibbs free energy of this system is the Gibbs free energy of phase alpha plus the Gibbs free energy of phase beta, the two phases added together. What I want to do now is I want to make a change to that system. Let's consider moving some amount of species A, compound A, from phase beta into phase alpha. So I'm moving some small number of moles of compound A from beta into alpha. What that means is from the point of view of the alpha phase, it's gaining that number of moles. So however many moles I decided to move, that's the same as the change in the number of moles in the alpha phase. On the other hand, in the beta phase, I've lost that number of moles. So the terminology here is getting a little cumbersome that what this means is the change in number of moles of compound A in the beta phase or in the alpha phase is either this change dn or it's equal to negative dn. So with that change, the free energy is going to change. In particular, the free energy of the alpha phase is going to change. The free energy of the beta phase is going to change. But because we know the system is in equilibrium, if I have a two-phase system in equilibrium with each other, the free energy is not going to change. Since it's in equilibrium, moving a little bit of a molecule A from the liquid phase to the vapor phase is not going to change the free energy. That's the definition. Oops, I shouldn't write dg. That's true. But because we know it's in equilibrium, I can say that the free energy change is zero. When a system at constant temperature and pressure, and I suppose I should specify that, if we do this at constant temperature and pressure, we know that the Gibbs free energy for a system in equilibrium at constant temperature and pressure has no free energy change. If it had a free energy change that was positive, it would be non-spontaneous. Negative would be spontaneous if it's equal to zero, then it's equilibrium. So we know that these two changes in free energy have to cancel each other and add up to zero. We also know how to write down what the differential change in Gibbs free energy is. That's what the fundamental equation tells us how to do. So if I rewrite this equation, so moving over here, zero is equal to change in free energy for phase A alpha. Actually, I'm going to write these often enough. I'll change my notation. Let me write the alphas and betas as superscripts. So I'll save the subscripts for compound A, compound B, like I've done on this term here. So free energy change for compound alpha. Fundamental equation tells us that's minus SDT plus VDP plus for a multi-component system, mu dN, summed over each component. So chemical potential of A, dNA, and chemical potential of B, dNB. All these are in the alpha phase, so entropy of the alpha phase, volume of the alpha phase, chemical potential in the alpha phase, change of number of moles in the alpha phase. Notice I don't have to write a superscript alpha for the temperature of the alpha phase or the pressure of the alpha phase. These are in equilibrium with each other at constant temperature and pressure. The temperature of phase alpha and the temperature of phase beta are the same as each other. So what I've written down here, that's dG for the alpha phase. I need to add to that same thing, but for the beta phase. So just writing one of these terms with all the alphas turned into betas. So chemical potential of A in the beta phase times the change in number of moles of A in the beta phase. Likewise, mu B beta dNB beta. Okay, so that's a lot of terms. Luckily, most of those are going to disappear. In particular, since we're at constant temperature and pressure, dT is equal to zero, dP is equal to zero. Since we're only talking about changing number of moles of compound A, we're not changing the number of moles of compound B. Both of these dNB terms go away. There's no B compound B shifting between the two phases, only compound A. So that leaves me only these two terms. So I'll say now zero is equal to this term and this term. When I write these, I'll write mu A alpha dN alpha. Here's where I'll recall that the change in number of moles of A in the alpha phase is just dNA. While the change in number of moles of A in the beta phase, dNA beta, the change in number of moles in the beta phase, that's the opposite. Same number with the sign change, that's minus dNA. So I can rewrite that now as mu A alpha minus mu A beta times the change in number of moles. Total change in free energy, which must be zero, comes from the loss in free energy when I remove molecules from the beta phase countered by the gain in the free energy when I move molecules into the alpha phase. The only way to have this last expression be equal to zero is to have this difference be zero. So that requires that chemical potential in the alpha phase, chemical potential in the beta phase must be equal to each other if when I move some molecules from one phase to the other, the free energy doesn't change because the system's in equilibrium. So that is a pretty important requirement. What we've just determined is that in a multi-component system, if the system's in equilibrium, the chemical potential of a component is equal in the two different phases. So we're going to use that requirement, that equilibrium requirement for multi-component systems to a pretty great benefit to learn a lot of things about phase changes. But it's important enough that I think it's worth pausing and talking about the repercussions or the consequences of that expression and we'll do that in an entire video next.