All ecosystems depend on energy from the sun which is converted to chemical energy by producers like plants through photosynthesis. This energy is transferred between trophic levels in a food chain or food web, but around 90% is lost at each level. The inefficiency of energy transfer means longer food chains are less viable as more energy is lost, limiting the productivity of the ecosystem.