Time to build two very different shapes and feel the difference. Carbon dioxide has no lone pairs on its carbon, so its two double bonds stretch out perfectly straight — a linear molecule. Ammonia has a lone pair on its nitrogen that pushes the three N–H bonds down into a pyramid.