The interrelationships between organisms and between organisms and their environment; the study of such interrelationships.