Ecology is the study of interactions between living organisms and their environment. It examines both biotic factors like plants, animals, and microorganisms, as well as abiotic factors such as sunlight, water, and soil. Ecology views environments holistically and studies the complex relationships within and between populations in an ecosystem. Organisms depend on each other through food webs, with plants and algae as primary producers, herbivores and omnivores as primary consumers, and carnivores and decomposers recycling nutrients and matter. Ecology analyzes these interactions across different levels of organization from organisms and populations to communities, ecosystems, and the global biosphere.