Ecosystems theory was derived from early sociologists who compared society to a living orgainism. It attempts to apply an ecological perspective to the social sciences, using an ecosystem as an analogy. Ecosystems are defined by their interrelated nature, and the idea of applying this idea to people is to understand human behavior in the context of their environment as well as interpersonal relationships. Ecosystems theory deals with several factors, including the environment and the way it affects people, the impact of stresses on a human environment, and the dynamics of interpersonal relationships. The extent to which ecosystems theory deals with the literally physical and material environment varies, and the crucial interactions are between people. Ecosystems theory is applicable to social work, management, criminal justice, poverty studies, and in a host of other areas.