Final answer:
CO₂ is linear with no lone electron pairs making it nonpolar, while NH₃ has a trigonal pyramidal shape with a lone pair that makes it polar.
Step-by-step explanation:
The molecular shapes of carbon dioxide (CO₂) and ammonia (NH₃) are different due to the electron-pair geometry around their central atoms and the presence of lone electron pairs. In CO₂, the central carbon atom is bonded to two oxygen atoms and there are no lone pairs, resulting in a linear shape. This symmetry causes the bond dipoles to cancel out, leading to a nonpolar molecule.
In contrast, NH₃ has a central nitrogen atom bonded to three hydrogen atoms and one lone pair of electrons, which gives it a trigonal pyramidal shape. This asymmetry, combined with the difference in electronegativity between nitrogen and hydrogen, results in a net dipole moment, making ammonia a polar molecule. A molecular dipole for NH₃ would point from the hydrogen atoms towards the nitrogen atom.