Insect ecology is the scientific study of how insects, individually or as a community, interact with the surrounding environment or ecosystem.
Insects play significant roles in the ecology of the world due to their vast diversity of form, function and lifestyle; their considerable biomass; and their interaction with plant life, other organisms and the environment. Since they are the major contributor to biodiversity in the majority of habitats, except in the sea, they accordingly play a variety of extremely important ecological roles in the many functions of an ecosystem. Taking the case of nutrient recycling, insects contribute to this vital function by degrading or consuming leaf litter, wood, carrion and dung and by dispersal of fungi.
Insects form an important part of the food chain, especially for entomophagous vertebrates such as many mammals, birds, amphibians and reptiles. Insects play an important role in maintaining community structure and composition; in the case of animals by transmission of diseases, predation and parasitism, and in the case of plants, through phytophagy and by plant propagation through pollination and seed dispersal. From an anthropocentric point of view, insects compete with humans; they consume as much as 10% of the food produced by man and infect one in six humans with a pathogen.
Community ecology is the process by which a group of organisms which live in the same location interact. There is direct interaction, which takes the form of symbiosis, competition and predation, which are the most easily notable. There is also indirect interaction, such as reproduction, foraging patterns and decaying. Every organism at its most basic state could be a consumer in some situations, and a producer in others. The culmination of all these interactions is what defines a community and what differentiates one from another. Insects often play several roles in these communities, though these roles vary widely based on what species is present.
Decomposer insects are ones that feed on dead or rotten bodies of plant or animal life.