An ecosystem is a biophysical system composed of a set of biotic and abiotic elements and relations between them through which they are interdependent in affecting each other and the overall state of the system. An ecology is before anything else a physical system, that is to say on its most fundamental level we are dealing with the interaction of energy and matter. Energy is being processed through the system, and each stage of that process involves the construction and deconstruction of matter into various structures as the resources are processed across some potential energy gradient. Ecosystems exist on all scales from microbial ecosystems to the entire biosphere of the planet Earth.