Food webs and food chains show the flow of energy in an ecosystem with arrows that connect organisms to those that eat them. Since food webs can be quite complex, ecologists organize organisms into trophic levels depending on their position in the food web.
Primary producers are always the basis of a food web or food chain, and therefore make up the first trophic level. These organisms convert inorganic energy (such as sunlight) into energy that is available to the rest of the food web (such as plant material).
The organisms that form the second trophic level eat primary producers and are called primary consumers. Both herbivores, which eat only plants, and detritivores, which eat decaying matter, are primary consumers.
Secondary consumers make up the third trophic level, since these carnivores feed on primary consumers and detritivores.
Carnivores that eat other carnivores are tertiary consumers. These animals don't occur in all ecosystems, but if they do, they form a fourth trophic level.
Trophic Level Dynamics
Only a small percentage of the energy contained in each trophic level is available to the next level. Therefore, higher level organisms can only survive if the lower trophic levels are sufficiently large.