Chemical nutrients produced by plants and other photosynthetic organisms cycle through other living and non-living components of the ecosystem.
Energy flows from a source (usually sunlight) through organisms in the ecosystem, eventually leaving in the form of heat.