Ecology (from Greek: οἶκος, "house"; -λογία, "study of"[A]) is the scientific analysis and study of interactions among organisms and their environment, such as the interactions organisms have with each other and with their abiotic environment. Topics of interest to ecologists include the diversity, distribution, amount (biomass), number (population) of organisms, as well as competition between them within and among ecosystems. Ecosystems are composed of dynamically interacting parts including organisms, the communities they make up, and the non-living components of their environment. Ecosystem processes, such as primary production, pedogenesis, nutrient cycling, and various niche construction activities, regulate the flux of energy and matter through an environment. These processes are sustained by organisms with specific life history traits, and the variety of organisms is called biodiversity. Biodiversity, which refers to the varieties of species, genes, and ecosystems, enhances certain ecosystem services.
Ecology is an interdisciplinary field that includes biology and Earth science. The word "ecology" ("Ökologie") was coined in 1866 by the German scientist Ernst Haeckel (1834–1919). Ancient Greek philosophers such as Hippocrates and Aristotle laid the foundations of ecology in their studies on natural history. Modern ecology transformed into a more rigorous science in the late 19th century. Evolutionary concepts on adaptation and natural selection became cornerstones of modern ecological theory. Ecology is not synonymous with environment, environmentalism, natural history, or environmental science. It is closely related to evolutionary biology, genetics, and ethology. An understanding of how biodiversity affects ecological function is an important focus area in ecological studies. Ecologists seek to explain: