An ecosystem is defined as a self contained unit of living things and non living things. An ecosystem required Sunlight to maintain its working. The two main components of an ecosystem are following :
1. Abiotic component: It includes all the non-living components such as soll, water, air temperature, rocks, etc.
2. Biotic component: It includes all living components. All flora and fauna comes under biotic components.