Photosynthesis converts sunlight into chemical energy through autotrophs. This process of energy fixation through photosynthesis provides energy for all organisms. Autotrophs include photoautotrophs that use light energy and chemoautotrophs that use inorganic molecules. Heterotrophs obtain energy by consuming other organisms, including herbivores that eat plants, carnivores that eat animals, and omnivores that eat both. Saprotrophs obtain nutrients by decomposing dead and decaying matter. Primary productivity is a measure of the energy converted by autotrophs, while net primary productivity accounts for energy lost to respiration and is available to primary consumers. Energy flows from producers to consumers to decomposers and is