Ecology is the study of the interactions that occur between organisms and their environments. Evolution inherently occurs within an ecological context and so, as a consequence, gaining some understanding of microbial ecology, however defined, is important towards developing a better feel for microbial evolution. Microbial population biology furthermore is an explicitly ecological as well as evolutionary based discipline. Therefore, an appreciation of the science of ecology as well as that of evolutionary biology is crucial towards gaining an understanding of microbial population biology as well as a broader appreciation of microbial evolution. Here I provide a rather brief introduction to ecology, which I do especially from a more classically ecological rather than more microbial ecological perspective. Note that generally we will be returning to ecological concepts mostly from the perspective of understanding organismal fitness, the evolution of organism adaptations, and within the context of gene flow between microorganisms.

Ecological interactions can be viewed on a number of different organizational levels. The most basic distinction is between biotic and abiotic aspects of environments, i.e. interaction of an organism with other living things, particularly other organisms and their parts, versus an organism with not-living, especially never having been living things. Another basic distinction, among biotic entities, is interactions between conspecifics versus interactions with other, different species. One can also speak to the nature of interactions, with direct interactions, often mediated by molecule-to-molecule contact, contrasting with less-direct interactions, such as when one organism utilizes resources that otherwise would be available to another organism (exploitative competition). One can perform ecological research in various ways ranging from employing mathematical models to doing laboratory experiments to examining ecosystems in situ. Ecology also can be a more observational versus more experimental science. These latter two points also can be used to distinguish among evolutionary biological studies, with experimental evolution studies placed at one end of a spectrum and the observational analyses of comparative genetics or genomics found at the other.

Organisms can be studied from a more organismal perspective. Distinguishing this approach from others, such studies often are limited to considerations of organismal adaptations that enhance abilities to deal especially with abiotic aspects of environments, e.g., so-called ecophysiological studies. Behavioral ecology also can fall under a heading of ecology studies from the perspective of individual organisms and physiology generally is the study of organism functioning.

Population ecology is the study of intraspecific ecological interactions. That is, populations consist of groups of organisms that are members of the same species. As such, the needs of these individual organisms making up a single species can be fairly similar, and their interactions can be adaptive resulting in increased fitness among interacting individuals or, alternatively, can give rise to intraspecific competition. Similarly, intraspecific interactions can range from cooperative, should they give rise to increases in the fitness of the interacting individuals, or instead can be antagonistic should they result in decreases in the fitness of the participants. Competition for the same resources can result in an exploitative competition between individuals making up the same species, though the concept of exploitative competition typically is used within the context of interspecific rather than intraspecific interactions.

Communities are assemblages of more than one species type that exist sympatrically, that is, within the same location. Community ecology thus is the study of interspecific interactions. These interactions too can be competitive or antagonistic as well as (less likely) cooperative. In addition, different specifies can consume one another, forming food chains or, more realistically, food webs. In the course of these consumer-consumed relationships, both energy and nutrients are transferred between what are known as trophic levels. Since some of this transfer can involve abiotic entities, the study of energy and nutrient transfer cannot be wholly considered within the context of community ecology. Instead, one must study these phenomena at the ecosystem level, which considers both biotic and abiotic aspects of environments (contrasting communities, which describes just the biotic). Thus, ecosystem ecology considers especially energy and nutrient movement both within and between ecosystems.

Landscape ecology is the study of the movement of materials, including organisms, between ecosystems, such as between forests and ponds. Physiological ecology explores organism functioning especially from ecological perspectives, i.e., in terms of organismal interaction with environments (as opposed to, for example, organismal maintenance of homeostasis divorced from issues of organism-environment interaction or organismal fitness). Mathematical ecology is the study of ecology especially from the perspective of, of course, mathematics, such as in terms of mathematical modeling. Lastly, evolutionary ecology is the study of organismal adaptation.