Worked example 2
Draw the Lewis structure of carbon dioxide.
CO2: Carbon has an electron configuration of [He]2s22p2 and that of O is [He]2s22p4, so C has 4 valence electrons and O has 6 valence electrons. The molecular framework for CO2 is:

Addition of non-bonding pairs gives:

In this case it is necessary to minimise the formal charges on all atoms. So for CO2, the formal charge on C is (4 – 2) = +2 and the formal charge on each oxygen is (7 – 6) = –1. The formal charge on each oxygen and the formal charge on carbon can be minimised by converting a lone pair on each O atom to a bond pair to give:

Note that in this structure the formal charge of all atoms is zero.