Within ecosystems, energy can be added, stored, or transferred through food chains. Producers, like plants, convert solar energy into chemical energy through photosynthesis. Primary consumers, or herbivores, eat producers. Secondary consumers are carnivores that eat primary consumers. Tertiary consumers are large carnivores that eat secondary consumers or omnivores that eat both plants and other animals. Decomposers break down dead organic matter and release energy and nutrients back into the ecosystem. As energy passes between trophic levels some is lost as heat, so less energy is available at higher levels of the food chain.