![A simple ecosystem diagram.](http://static.sciencelearn.org.nz/images/images/000/001/113/full/Simple-ecosystem-diagram_v2.png?1674165524)
An ecosystem is a community of living things and their non-living environment, and may be as large as a desert or as small as a puddle. An ecosystem must contain producers, consumers, decomposers, and dead and inorganic matter. All ecosystems require energy from an external source – this is usually the sun.