A food chain is a linear sequence of organisms through which nutrients and energy pass as one organism eats another. It consists of producers, primary consumers, secondary consumers, tertiary consumers or top carnivores and decomposers. Energy trapped by the producers are transferred to other organisms in the food chain. Therefore a food chain in an ecosystem represents both the feeding relationship and energy flow in the ecosystem.