Ecosystem functions are the physical, chemical, and biological processes that take place within an ecosystem. These include primary production (conversion of light energy into organic matter, 'production'), consumption (herbivory, predation), decomposition (breakdown of organic matter, leading to 'nutrient transformation'), and the overall flow of energy and cycling of materials ('influx and efflux of energy and materials'). These processes describe how an ecosystem works and maintains itself.