The study of the distribution of species and how it is influenced by geological and environmental factors.