In ecology, these terms refer to various levels of species diversities. Alpha diversity is on the habitat level. It is usually calculated by taking into account both the number species in a given habitat and each species' abundance (Shannon or Simpson indices), though sometimes it is expressed simply as the number of species in that habitat (species richness). Beta diversity refers to the differences between habitats. Gamma diversity is the product of the two, thus is the total species diversity in a landscape. These terms were introduced by Whittaker in 1972 and are used in somewhat different modes by ecologists.