Pyridine is less basic than dimethylamine because the lone pair of nitrogen in pyridine is delocalised.
Pyridine is a heterocyclic compound that is colourless to yellow liquid with a chemical formula C5H5N. Basicity of amines is due to the availability of an unshared pair (lone pair) of electrons on nitrogen. Pyridine is the hydrogen derivative of this ring; it is benzene in which a nitrogen atom replaces one CH- or methane group. Pyridine is an aromatic cyclic structure in which the lone pair of electrons are not involved in resonance. Hence, the lone pair of electrons are not delocalised but localised. This lone pair of electrons are available to form a new bond with a proton or Lewis acid. Pyridine is less basic than dimethylamine because the lone pair of nitrogen in pyridine is delocalised.