Ecosystems consist of living and nonliving components that interact with each other. Energy from the sun flows through ecosystems via photosynthesis in plants and is transferred between trophic levels as organisms consume each other. Nutrients also cycle through ecosystems as organisms decompose, releasing nutrients back into the environment to be reused. Ecosystems are made up of biotic factors like organisms and biotic factors like air, water and soil. The interactions between all of these components work to sustain life within an ecosystem.