Ionic compounds are chemical compounds composed of ions (negative and the positively charged particles). The negatively charged ions gain an electron and are known as anions, while positive charge ions have lost an electron and are known as cation. Anions are known to be nonmetals, while cations are metals. The ions are bonded together to form compound through an "ionic bong" wherein one atom gives an electron to the other atoms. There are many examples of ionic compound, one being Potassium chloride. Potassium chloride is a salt formed by a K+ ion and a Cl-. Ionic compounds are an important part of chemistry. 
When Cations, a positively charged atom/molecule are attracted to Anions, which are negatively charged atoms/molecules, a Ionic compound is formed. Also, when a metal and nonmetal are forming ions the resulting compound is called an ionic compound. Cations are formed when metal ion losses and valence electron, while anion is formed when a nonmetal gains a valence electron. An example of an ionic compound is NaCl or table salt. The sodium (Na) is bonded to the chlorine (Cl) through ionic bonding. 
Ionic bonds form through electrovalence, which is the loss or gain of an electron.The gain or loss of valence electrons allows the atom to fulfill the octet rule. The octet rule states that the atom prefer when the electron fill the outer most shell. Noble gasses such as Helium, Neon, Argon and Krypton have a full outer shell because helium has 2 electron which fills the first shell. Ionic compound and bonds seek a neutral charge.
To find the formula for ionic compound we must balance out the charges of the ions. For example Magnesium has a 2+, because Magnesium has two valence electron that it would have to get rid of. Fluorine has seven valence electron which means it is Fl-, because it only needs to gain one electron to fulfill the octet rule, as shown in the periodic table Fluorine is only one element away from a noble gas. The two ions need to balance each other, so we need two Fl atoms, because two negative Fluorine atoms and two postive magnesium atoms balance each other out. At the end the formula would be MgF2. 
Ionic compounds are constructed to be close or packed up next to each other. The structure is created through the lattice energy. The lattice energy is the amount of energy contained in the crystalline compound. The strength of the bond is determined by the charges of the ions. The bonds are strongest when the ions are small, because the valence electron is closest to the nucleus. The bonds are stronger when they are larger. For example the lattice energy for NaCl as shown in the image has a Na+ and Cl-. The lattice energy is large for the sodium and small for the chlorine. The two combined is what created this structure. This structure is a giant ionic structure, which means it contains a lot of atoms. The structure of the ionic compound is very important. 
- .what are ionic compounds "study".Study. No Author No date.
- .Ionic compound examples'bright hub education'. Bright hub education. No date, No author.
- .Lattice energy and the strength of the Ionic compound"Lumen Learning".Boundless chemistry.
- .Lattice Energy"Lattice Energy".Lattice Energy. No author no date.