An ecosystem is a group of living things and non-living things that are linked together. Inputs into an ecosystem include water, carbon dioxide, and oxygen while outputs include oxygen, water, and carbon dioxide. Ecosystems operate at different scales from small ponds to vast rainforests. Within ecosystems, energy and matter are stored and flow through cycles and food chains that link living things as some organisms eat others.