Energy enters, flows through, and exits an ecosystem, whereas chemical nutrients cycle within it.

Energy (orange arrows) enters an ecosystem as solar radiation, moves as chemical energy transfers through the food web, and exits as heat radiated into space. Most transfers of nutrients (blue arrows) through the trophic levels lead eventually to detritus; the nutrientss then cycle back to the primary producers.