The scientific study of relationships between organisms and their environment. It is concerned with the life histories, distribution, and behavior of individual species as well as the structure and function of natural systems at the level of populations, communities, and ecosystems.