The structure of molecules determine their function. The reactivity of a given atom is specified by the outermost shell of electrons, called the valence electrons. The valence electrons determine the structure of a molecule.
In order to understand the structure of molecules, scientists consider the position and movement of electrons, specifically the valence electrons-the electrons in the outermost shell available to react and form bonds. A Lewis structure reveals the valence electrons arranged to satisfy the octet rule. Explore the steps to generating a Lewis structure for nitrate.

Electronegativity measures the force of an atom’s attraction for electrons. Increasing from left to right within a period of the Periodic Table due to increasing positive charge on the nucleus leading to a stronger attraction for electrons as well as increasing from bottom to top as the decreasing distance of the valence electrons from the nucleus, electronegativities of atoms help predict the type of bonds formed. If the difference in electronegativity between two atoms is less than 0.5, the atoms form a nonpolar covalent bond. If the difference in electronegativity is from 0.5 to 1.9, the atoms form a polar covalent bond. Finally, if the electronegativity difference is greater than 1.9, the atoms form an ionic bond.

Once atoms form bonds to satisfy the octet rule, which specifies that atoms of main-group elements tend to combine in such a way that each atom has eight electrons in its valence shell, giving it the same electronic configuration as a noble gas, the next step in understanding reactivity is to calculate formal charge.
Valence electrons do not belong to any one atom in a molecule or ion. Quantum mechanics tells us that electrons are shared by a few neighboring atoms, or even by the whole molecule. Atoms differ in electronegativity and hybridization, so it is inaccurate to assume that these electrons are shared equally. A formal charge is a comparison of electrons owned by an atom in a Lewis structure compared to the number of electrons possessed by the same atom in its unbound, free atomic state. Formal charge provides some indication of electron distribution within a molecule or ion, providing a starting point to predict chemical and physical properties.
The procedure to determine formal charges on the atoms of an ion or molecule has three steps. The process is illustrated using hydronium ion (H3O+ ); an ion very frequently encountered in organic and biochemical reaction mechanisms.
Step 1: Draw a Lewis structure for the molecule, including all unpaired electrons. Be sure to show all nonbonded electrons, as these influence formal charges.
Step 2: Assign the formal charge to each atom. Formal charge is calculated using this formula: FC = GN – UE – 1/2 BE
Where:
FC = formal charge
GN = periodic table group number (number of valence electrons in free, nonbonded atom)
UE = number of unshared electrons
BE = number of electrons shared in covalent bonds.
Step 3: The sum of the formal charges of all atoms must equal the overall charge on the structure. The best Lewis structure or resonance contributing structure has the least number of atoms with formal charge. Equivalent atoms have the same formal charge.