Final answer:
Carbon dioxide is nonpolar because it has a linear shape and equal dipoles that cancel out, while hydrogen cyanide is polar due to an uncanceled dipole resulting from its linear shape and asymmetric distribution of electronegative atoms.
Step-by-step explanation:
To understand why carbon dioxide (CO2) is nonpolar and why hydrogen cyanide (HCN) is polar, we need to consider both the electronegativity of the atoms involved and the overall molecular geometry. Carbon dioxide has a linear molecular geometry, and although it contains polar covalent bonds (due to the difference in electronegativity between carbon and oxygen), these dipoles point in opposite directions and are of equal strength, thus canceling out and giving CO2 a nonpolar characteristic.
In the case of hydrogen cyanide, although not explicitly mentioned in the question, the molecule is actually polar. This is because HCN has a linear geometry, but with different atoms at each end of the linear molecule (H and CN), resulting in a dipole that doesn't cancel out. Therefore, HCN is polar because the electronegativity difference creates a dipole moment that is not canceled due to the asymmetric distribution of the electronegative atoms around the central carbon atom.