Lewis structure
Lewis structures, also called Lewis-dot diagrams, are diagrams that show the bonding between atoms of a molecule, and the lone pairs of electrons that may exist in the molecule. A Lewis structure can be drawn for any covalently-bonded molecule, as well as coordination compounds. The Lewis structure was named after Gilbert N. Lewis, who introduced it in his 1916 article The Atom and the Molecule . They are similar to electron dot diagrams in that the valence electrons in lone pairs are represented as dots, but they also contain lines to represent shared pairs in a chemical bond (single, double, triple, etc.).
Lewis's structures show each atom in the structure of the molecule using its chemical symbol. Lines are drawn between atoms that are bonded to one another (rarely, pairs of dots are used instead of lines). Excess electrons that form lone pairs are represented as pairs of dots, and are placed next to the atoms.

# Construction

## Choosing a central atom
For compounds containing multiple elements with only one atom in the formula, the central atom is the least electronegative single atom that is not hydrogen. For instance, in thionyl chloride (SOCl2), the sulfur atom is the central atom.
The initial Lewis structure should be drawn with each non-central atom connected by a single bond to the central atom, although not all atoms have to be connected to show bonds.
In some cases, the central atom is difficult to determine, generally when each element appears more than once. In these cases, the connectivity of the structure  that is, the determination of which atoms are connected to which others  must be determined either by trial and error or prior knowledge.
When the central atom is known or determined, the Lewis structure can be drawn in exactly the same fashion.

## Counting electrons
The total number of electrons represented in a Lewis structure is equal to the sum of the numbers of valence electrons on each individual atom. Non-valence electrons are not represented in Lewis structures.
The octet rule states molecules with eight electrons in their valence shell will be stable, regardless of whether these electrons are bonding or nonbonding.  The rule applies well to organic compounds. The 18-Electron rule is operative on atoms from period 4, which have to achieve 18 electrons to fill their orbitals and achieve a noble gas configuration. Similarly from period 6, the atoms have to achieve 32 electrons to fill their orbitals.

## Placing electrons
Once the total number of available electrons has been determined, electrons must be placed into the structure. They should be placed initially as lone pairs: one pair of dots for each pair of electrons available. Lone pairs should initially be placed on outer atoms (other than hydrogen) until each outer atom has eight electrons in bonding pairs and lone pairs; extra lone pairs may then be placed on the central atom. When in doubt, lone pairs should be placed on more electronegative atoms first.
Once all lone pairs are placed, atoms, especially the central atoms, may not have an octet of electrons. In this case, the atoms must form a double bond; a lone pair of electrons is moved to form a second bond between the two atoms. As the bonding pair is shared between the two atoms, the atom that originally had the lone pair still has an octet; the other atom now has two more electrons in its valence shell.
Aside from organic compounds, only a minority of compounds have an octet of electrons in their valence shell.
Incomplete octets are common for compounds of groups 2 and 13 such as beryllium, boron, and aluminum.
Compounds with more than eight electrons in the Lewis representation of the valence shell of an atom are called hypervalent, and are common for elements of groups 15 to 18, such as phosphorus, sulfur, iodine, and xenon.
Lewis structures for polyatomic ions may be drawn by the same method. When counting electrons, negative ions should have extra electrons placed in their Lewis structures; positive ions should have fewer electrons than an uncharged molecule.
When the Lewis structure of an ion is written, the entire structure is placed in brackets, and the charge is written as a superscript on the upper right, outside the brackets.
A simpler method has been proposed for constructing Lewis structures eliminating the need for electron counting: the atoms are drawn showing the valence electrons, bonds are then formed by pairing up valence electrons of the atoms involved in the bond-making process and anions and cations are formed by adding or removing electrons to/from the appropriate atoms.

# Formal Charge
In terms of Lewis structures, formal charge is used in the description, comparison and assessment of likely topological and resonance structures by determining the apparent electronic charge of each atom within, based upon its electron dot structure assuming exclusive covalency or non-polar bonding. It has uses in determining possible electron re-configuration when referring to reaction mechanisms, and often results in the same sign as the partial charge of the atom, with exceptions. In general, the formal charge of an atom can be calculated using the following formula, assuming non-standard definitions for the markup used:
C_f = N_v - U_e - B_n
Where:
- C_f is the Formal charge.
- N_v represents the number of valence electrons in a free atom of the element.
- U_e represents the number of unshared electrons on the atom.
- B_n represents the total number of bonds the atom has with another.
The formal charge of an atom is computed as the difference between the number of valence electrons that a neutral atom would have and the number of electrons that belong to it in the Lewis structure. Electrons in covalent bonds are split equally between the atoms involved in the bond. The total of the formal charges on an ion should be equal to the charge on the ion, and the total of the formal charges on a neutral molecule should be equal to zero.

# Resonance
For some molecules and ions, it is difficult to determine which lone pairs should be moved to form double or triple bonds. This is sometimes the case when multiple atoms of the same type surround the central atom, and is especially common for polyatomic ions.
When this situation occurs, the molecule's Lewis structure is said to be a resonance structure, and the molecule exists as a resonance hybrid. Each of the different possibilities is superimposed on the others, and the molecule is considered to have a Lewis structure equivalent to an average of these states.
The nitrate ion (NO3-), for instance, must form a double bond between nitrogen and one of the oxygens to satisfy the octet rule for nitrogen. However, because the molecule is symmetrical, it does not matter which of the oxygens forms the double bond. In this case, there are three possible resonance structures. Expressing resonance when drawing Lewis structures may be done either by drawing each of the possible resonance forms and placing double-headed arrows between them or by using dashed lines to represent the partial bonds.
When comparing resonance structures for the same molecule, usually those with the fewest formal charges contribute more to the overall resonance hybrid. When formal charges are necessary, resonance structures that have negative charges on the more electronegative elements and positive charges on the less electronegative elements are favored.

## Resonance hybridization
In Lewis resonance structures, the structure is written such that it appears the molecule may switch between multiple forms. However, the molecule itself exists as a hybrid of the forms.
In the case of the nitrate ion, there are two single bonds and one double bond in each resonance form. When the nitrate ion is examined, however, each bond appears as though it has a bond order of 1.333  that is, each has properties as if it were composed of one and one-third total bonds. The length and bond energy of each is somewhere between that of a single bond and a double bond.
The resonance structure should not be interpreted to indicate that the molecule switches between forms, but that the molecule acts as the average of multiple forms.

# Example: Lewis structure of the nitrite ion
The formula of the nitrite ion is NO2.
Step one: Nitrogen is the least electronegative atom, so it is the central atom by multiple criteria.
Step two: Count valence electrons. Nitrogen has 5 valence electrons; each oxygen has 6, for a total of (6  2) + 5 = 17. The ion has a charge of 1, which indicates an extra electron, so the total number of electrons is 18.
Step three: Place ion pairs. Each oxygen must be bonded to the nitrogen, which uses four electrons  two in each bond. The 14 remaining electrons should initially be placed as 7 lone pairs. Each oxygen may take a maximum of 3 lone pairs, giving each oxygen 8 electrons including the bonding pair. The seventh lone pair must be placed on the nitrogen atom.
Step four: Satisfy the octet rule. Both oxygen atoms currently have 8 electrons assigned to them. The nitrogen atom has only 6 electrons assigned to it. One of the lone pairs on an oxygen atom must form a double bond, but either atom will work equally well. We therefore must have a resonance structure.
Step five: Tie up loose ends. Two Lewis structures must be drawn: one with each oxygen atom double-bonded to the nitrogen atom. The second oxygen atom in each structure will be single-bonded to the nitrogen atom. Place brackets around each structure, and add the charge () to the upper right outside the brackets. Draw a double-headed arrow between the two resonance forms.

# Alternative formats
Chemical structures may be written in more compacted forms, particularly when showing organic molecules. In condensed structural formulas, many or even all of the covalent bonds may be left out, with subscripts indicating the number of identical groups attached to a particular atom.
Another shorthand structural diagram is the skeletal formula (also known as a bond-line formula or carbon skeleton diagram). In skeletal formulae, carbon atoms are not signified by the symbol C but by the vertices of the lines.  Hydrogen atoms bonded to carbon are not shown  they can be inferred by counting the number of bonds to a particular carbon atom  each carbon is assumed to have four bonds in total, so any bonds not shown are, by implication, to hydrogen atoms.
Other diagrams may be more complex than Lewis structures, showing bonds in 3D using various forms such as space filling diagrams.