Electron-Pair Repulsion Sets Molecular Shape
Electron pairs around an atom are all negative charge, so they push one another away. They spread as far apart as they can, and that arrangement is the three-dimensional shape of the molecule. Bonding pairs and lone pairs both take up room and both repel. Just counting the electron domains fixes the skeleton, linear, trigonal planar, tetrahedral, and so on; add lone pairs and the angles get squeezed into bent or pyramidal shapes. Sum the bond polarities as vectors and you also learn whether the whole molecule is polar or nonpolar.
Electron domains repel and try to get as far apart as possible. With two they go straight opposite, giving linear at 180 degrees; with three you get trigonal planar at 120 degrees; with four, tetrahedral at 109.5 degrees. Five gives a trigonal bipyramid and six an octahedron. Change the count with the buttons and watch the arrangement settle itself.
A bonding pair is pinned between two atoms and stays narrow, but a lone pair is held by only one atom and bulges out wider. So it pushes the neighboring bonding pairs harder. Water has four electron domains, so ideally the angle would be 109.5 degrees, yet its two lone pairs press the H-O-H angle down to 104.5 degrees and bend the molecule. Toggle the lone pairs on and off and watch the angle shrink.
When we name a molecular shape we must separate the electron-domain arrangement from the atom positions. Four electron domains always arrange as a tetrahedron, but if some of them are lone pairs, the shape you see from the atoms alone is different. AX₄ stays tetrahedral; AX₃E with one lone pair becomes trigonal pyramidal; AX₂E₂ with two lone pairs becomes bent. Toggle between all the electron domains and the atoms only to see the difference.
Why does the arrangement settle exactly there? Because that is where the total repulsion energy, the sum of every pair pushing on every other, is smallest. Drag one domain off its best spot and, as it crowds a neighbor, the repulsion sum shoots up. Let go and it snaps back to the widest, lowest-energy arrangement. That minimum is the shape we actually observe.
Each bond is a small dipole because the difference in electronegativity pulls the electrons to one side. The polarity of the whole molecule is the vector sum of these bond dipoles. In carbon dioxide the two C=O dipoles point exactly opposite, so they cancel and the net is zero: nonpolar. Water is bent, so its two O-H dipoles do not cancel but add upward, leaving a net dipole: polar. Switch between the bond dipoles and the net dipole to check the sum of the directions.