Now when it comes to the reaction with halogens, we're going to say both groups 1A and 2A react with halogens to produce ionic pallets. If we take a look here, if M here represents a group 1A metal, it reacts with a diatomic halogen to produce an ionic halid. Remember, group 1A is plus one in charge. Halogens are in Group 7A, so they're -1. The numbers are the same, so they just cancel out. So our ionic halid is MX.
We have to balance this out. There's two halogens here, but only one here. So I throw 2 here. But now I have two metals on the product side, so I'd have to put a 2 here. M could also represent a group 2A metal which have a charge of two plus or +2. They would still react with the halogen, which is -1 and create M2X2 solid as a product.
In that case, you get that as a product and you still have to balance out your overall reaction if necessary. So just remember group 1A and 2A metals react with diatomic halogens to produce ionic halts.