An ecosystem is defined by the interaction between living and non-living factors. Living components are called biotic factors, while non-living components are called abiotic factors. Abiotic factors like sunlight, water, air, and soil affect biotic parts of an ecosystem by providing warmth, energy for photosynthesis, oxygen, nutrients, and habitats.