A food chain is a linear network of links in a food web starting from producer organisms (such as grass or trees which use radiation from the Sun to make their food) and ending at apex predator species (like grizzly bears or killer whales), detritivores (like earthworms or woodlice), or decomposer species (such as fungi or bacteria). A food chain also shows how the organisms are related with each other by the food they eat.
Each level of a food chain represents a different trophic level. A food chain differs from a food web, because the complex network of different animals' feeding relations are aggregated and the chain only follows a direct, linear pathway of one animal at a time. Natural interconnections between food chains make it a food web.
A common metric used to quantify food web trophic structure is food chain length. In its simplest form, the length of a chain is the number of links between a trophic consumer and the base of the web and the mean chain length of an entire web is the arithmetic average of the lengths of all chains in a food web.
The food chain's length is a continuous variable that provides a measure of the passage of energy and an index of ecological structure that increases in value counting progressively through the linkages in a linear fashion from the lowest to the highest trophic (feeding) levels