The nitrogen in ammonia has 5 valence electrons and bonds with three hydrogen atoms to complete the octet. This would result in the geometry of a regular tetrahedron with each bond angle equal to cos−1(−1/3) ≈ 109.5°. However, the three hydrogen atoms are repelled by the electron lone pair in a way that the geometry is distorted to a trigonal pyramid (regular 3-sided pyramid) with bond angles of 107°. In contrast, boron trifluoride is flat, adopting a trigonal planar geometry because the boron does not have a lone pair of electrons. In ammonia the trigonal pyramid undergoes rapid nitrogen inversion.[1]
The electron pair arrangement of ammonia is tetrahedral: the two lone electrons are shown in yellow, the hydrogen atoms in white
The molecular geometry can be inferred from the electron pair arrangement, showing that ammonia has trigonal pyramidal geometry.