Ecology examines how organisms interact with each other and with the physical and chemical components of their surroundings. This perfectly matches the description provided in the question.