in this lesson we're going to talk about how to write the chemical formulas of ionic compounds now before you do so you need to know the charges of certain ions so let's focus on the elements in group one like lithium sodium potassium these elements they have one valence electron and so they tend to form plus one charges or cations with positive one charges now in the second column you have the group two elements the alkaline earth metals and these include elements such as calcium magnesium and so forth these elements they form ions with a two plus charge now in the middle you have transition elements which can have variable charges so we're not going to focus on those too much but moving on to group 13 also known as group 3a you have elements such as aluminum i'm going to write it over here and this element has a 3 plus charge and then you have elements like carbon silicon germanium which are found in group 4a and for ionic compounds it's rare that you'll see those elements in group 5a you have nitrogen and phosphorus these form negative charges specifically minus three charges and then you have elements like oxygen sulfur selenium these are the calcagents which form a negative two charge and finally you have the halogens like fluoride chloride bromide and iodide and these halogens they form anions with negative one charges and so make sure you understand how to determine the charges of ions for certain elements used in the periodic table because that's going to be important now let's start with our first example let's say if we want to write the chemical formula that corresponds to sodium bromide how can we do so the first thing we need to do is list the ions that are involved here the sodium ion has a positive one charge and the bromide ion it's a halogen it has a negative one charge so how can we use this information to write the chemical formula of sodium bromide now if the charges are the same in magnitude even though they're opposite in sign so like this is plus one this is minus one if the charges are the same these ions will combine in a one to one ratio so you can simply write them together as n a b r so that's the answer for this example so anytime the magnitude of the charges are the same you could just write the elements together let me give you another example of that so let's say if we want to write the chemical formula for calcium sulfide now the first thing we're going to do is write the the ions so calcium is an element in group two so therefore as an ion is going to have a two plus charge sulfide is a calcagen in group six a so it's gonna have a two minus charge now notice that the magnitude of the charges are the same two plus and two minus so you can simply write them in a one-to-one ratio this is going to be c a s calcium sulfide that's the answer for this example now let's try another similar problem aluminum phosphide so what is the charge on the aluminum cation aluminum is found in group 13 or group 3a so it has a three plus charge and the element phosphorus has a negative three charge as an anion so write them together the answer is simply going to be alp because they have the same charge magnitude but now what if the magnitude of the charges what if they're different what if they're not the same so what do we do in a situation like that so for instance let's say if we want to name aluminum chloride let's try this example so we know that aluminum has a three plus charge and chloride is a halogen with a negative one charge so how do we work with this now there's a technique that we could use we need to swap the charges with the subscripts so let me show you so this three we're going to write it as a subscript towards the right and in the 1 not including the negative sign we're going to write it as a subscript to the left so this is going to be a l1 cl3 now there's no point in writing a subscript of a one so in this case we can just omit the one and say alcl3 it turns out that this is the correct chemical formula for aluminum chloride now let's make sense of it so why do we need the three the answer is to balance the charges we have one aluminum ion with a three plus charge so the total positive charge in this compound is positive three to balance that three plus charge we need three chloride ions each with a negative one charge so that the total of all the negative charges is minus three so these cancel and they add up to zero and so that's why the chemical formula is alcl3 is to neutralize the charges we need three chloride ions to neutralize the one aluminum plus three cation now let's work on some more examples the next one we're going to try is sodium oxide what is the chemical formula that corresponds to this compound so let's start with sodium it's n a plus now what about oxide so we have the element oxygen and oxygen is a calcagen in group 6a so it's going to have a negative 2 charge so using the method that we used before we're going to swap the charges with subscripts so it's going to be na201 or simply na2o so this is the answer so this means that we need two sodium cations to neutralize the oxide ion the total of all the positive charges will be plus two and the total of all the negative charges is minus two so that's why we need two sodium cations to balance the negative two charge on the oxygen and so this is the answer na2o now let's work on this example barium phosphate feel free to pause the video if you want to work on that problem now barium is an alkaline earth metal found in group two so it's gonna be ba2 plus and phosphate is a polyatomic ion which is po4 three minus and the polyatomic ions you need to commit that to memory now i've created a video on youtube and you can search it out just type in polyatomic ions organic chemistry tutor in the youtube search bar and you can get a list of polyatomic ions that you need to know so make sure to take a look at that now using what some called the crisscross method this is going to be ba3 po4 times two but because we have a polyatomic ion because we have multiple polyatomic ions rather we need to enclose the po4 ion in parentheses and so that's how you can write the chemical formula for barium phosphate so anytime you have multiple polyatomic ions make sure you surround it in parentheses now the last case will be one with a transition metal so let's say if we have iron iii sulfate how can we write the chemical formula for this compound now it's important to understand that the roman numeral that you see here tells us the charge on the metal so iron has a three plus charge and sulfate is a polyatomic ion which you need to know is so4 two minus so with this information we can swap the charges with the subscripts so it's going to be fe2 so4 3 and that's basically it so now you know how to write the chemical formula of ionic compounds thanks again for watching