A food web (or food cycle) depicts feeding connections (what eats what) in an ecological community and hence is also referred to as a consumer-resource system. Ecologists can broadly lump all life forms into one of two categories called trophic levels: 1) the autotrophs, and 2) the heterotrophs. To maintain their bodies, grow, develop, and to reproduce, autotrophs produce organic matter from inorganic substances, including both minerals and gases such as carbon dioxide. These chemical reactions require energy, which mainly comes from the sun and largely by photosynthesis, although a very small amount comes from hydrothermal vents and hot springs. A gradient exists between trophic levels running from complete autotrophs that obtain their sole source of carbon from the atmosphere, to mixotrophs (such as carnivorous plants) that are autotrophic organisms that partially obtain organic matter from sources other than the atmosphere, and complete heterotrophs that must feed to obtain organic matter. The linkages in a food web illustrate the feeding pathways, such as where heterotrophs obtain organic matter by feeding on autotrophs and other heterotrophs. The food web is a simplified illustration of the various methods of feeding that links an ecosystem into a unified system of exchange. There are different kinds of feeding relations that can be roughly divided into herbivory, carnivory, scavenging and parasitism. Some of the organic matter eaten by heterotrophs, such as sugars, provides energy. Autotrophs and heterotrophs come in all sizes, from microscopic to many tonnes - from cyanobacteria to giant redwoods, and from viruses and bdellovibrio to blue whales.
Charles Elton pioneered the concept of food cycles, food chains, and food size in his classical 1927 book "Animal Ecology"; Elton's 'food cycle' was replaced by 'food web' in a subsequent ecological text. Elton organized species into functional groups, which was the basis for Raymond Lindeman's classic and landmark paper in 1942 on trophic dynamics. Lindeman emphasized the important role of decomposer organisms in a trophic system of classification. The notion of a food web has a historical foothold in the writings of Charles Darwin and his terminology, including an "entangled bank", "web of life", "web of complex relations", and in reference to the decomposition actions of earthworms he talked about "the continued movement of the particles of earth". Even earlier, in 1768 John Bruckner described nature as "one continued web of life".
Food webs are limited representations of real ecosystems as they necessarily aggregate many species into trophic species, which are functional groups of species that have the same predators and prey in a food web. Ecologists use these simplifications in quantitative (or mathematical) models of trophic or consumer-resource systems dynamics. Using these models they can measure and test for generalized patterns in the structure of real food web networks. Ecologists have identified non-random properties in the topographic structure of food webs. Published examples that are used in meta analysis are of variable quality with omissions. However, the number of empirical studies on community webs is on the rise and the mathematical treatment of food webs using network theory had identified patterns that are common to all. Scaling laws, for example, predict a relationship between the topology of food web predator-prey linkages and levels of species richness.