A community of organisms and their nonliving environment is called an ecosystem. In addition to living organisms, the primary components of an ecosystem are soil, atmosphere, heat and light from the sun, and water.
Ecosystems are not defined by size. A lake or forest has the characteristics of an ecosystem, but so does a puddle or a tree. Ecosystems are most successful when they contain many diverse species. For an ecosystem to thrive, all its components must be in proper balance. For example, if an ecosystem has insufficient water, some plants die, and then organisms that use these plants as energy sources do not survive. Consequently, animals that consume those herbivores also die off.