A food chain shows how each living thing gets energy by eating other organisms and being eaten by others. Producers, like plants, are the base of the food chain by producing their own food through photosynthesis. Consumers, like herbivores and carnivores, obtain energy by eating producers or other consumers. Decomposers, like bacteria and fungi, obtain energy by breaking down dead organisms and recycling nutrients in the ecosystem. A food web is more complex than a food chain, as organisms can be part of multiple food chains that interconnect in an ecosystem.