An ecosystem is a community of living organisms and the nonliving environment they interact with, functioning together as a unit. It can be as large as the Amazon rainforest or as small as a rotting log. Every ecosystem runs on two fundamental engines: the flow of energy (starting with sunlight) and the recycling of nutrients through soil, water, air, and living things.
The Two Building Blocks: Living and Nonliving
Every ecosystem is made up of two types of components. The living parts, called biotic factors, include all organisms: plants, animals, fungi, bacteria, and everything else alive. The nonliving parts, called abiotic factors, include sunlight, temperature, water, soil, and air. An ecosystem isn’t just a collection of these parts. It’s the web of interactions between them: a plant pulling nitrogen from the soil, a hawk eating a mouse, bacteria breaking down a fallen tree.
Each species fills a specific role within its ecosystem, sometimes called its niche. This is different from a habitat. A habitat is where an organism lives. A niche is what it does there: what it eats, what eats it, how it affects the soil or water or other species around it. A woodpecker’s habitat is a forest. Its niche includes drilling into bark to eat insects, creating cavities that other animals later use for shelter, and spreading fungal spores between trees.
How Energy Moves Through an Ecosystem
Energy enters most ecosystems through sunlight. Plants and algae capture that light and convert it into food through photosynthesis, making them the producers at the base of every food chain. Herbivores eat those plants, carnivores eat the herbivores, and decomposers like fungi and bacteria break down dead material from all levels, releasing nutrients back into the soil and atmosphere.
At each step in this chain, most of the energy is lost as heat. Direct measurements of different ecosystems show that only about 10 to 25 percent of energy transfers from one level to the next. This is why ecosystems support far fewer predators than prey. A grassland can sustain millions of insects, thousands of mice, but only a handful of hawks. The energy simply runs out as it climbs the food chain.
Nutrient Cycling Keeps Ecosystems Running
Unlike energy, which flows in one direction and eventually dissipates as heat, nutrients cycle repeatedly through an ecosystem. The three most important cycles involve carbon, nitrogen, and phosphorus.
Carbon moves from the atmosphere into plants during photosynthesis, gets stored in plant tissues, passes to animals that eat those plants, and returns to the atmosphere when organisms breathe, die, and decompose. Soil microorganisms are major players here: they break down dead organic material and release carbon dioxide back into the air, completing the loop.
Nitrogen follows a more complex path. The atmosphere is roughly 78 percent nitrogen gas, but most organisms can’t use it in that form. Specialized bacteria convert atmospheric nitrogen into forms that plants can absorb through their roots. Some of these bacteria live in the soil freely, while others form partnerships with the roots of legumes like beans and clover. Lightning also converts small amounts of nitrogen into usable forms. Once nitrogen moves through plants and animals, other bacteria eventually convert it back into gas, returning it to the atmosphere.
Phosphorus is different from both carbon and nitrogen because it doesn’t have a gas phase. It enters ecosystems slowly, released from rocks as they weather over time. Once in the soil, phosphorus gets taken up by plant roots, moves through the food chain, and returns to the soil when organisms die and decompose. Because this cycle depends on rock weathering rather than atmospheric exchange, phosphorus is often the nutrient in shortest supply.
Types of Ecosystems
Ecosystems are broadly divided into terrestrial (land-based) and aquatic (water-based) categories. Terrestrial ecosystems include forests, grasslands, deserts, and tundra. Forests alone span a huge range, from tropical rainforests receiving 150 to 200 centimeters of rainfall per year to boreal forests in cold northern latitudes. Deserts, by contrast, are defined by extreme scarcity of water. Tundra ecosystems exist in polar regions where temperatures are too low for trees to grow.
Aquatic ecosystems split into freshwater and marine. Freshwater ecosystems include still bodies of water like ponds and lakes (lentic systems) and flowing water like rivers and streams (lotic systems), plus swamps and wetlands. Marine ecosystems include the open ocean, coastal zones, estuaries where rivers meet the sea, and coral reefs. Coral reefs are built by tiny coral animals whose calcium carbonate skeletons accumulate over centuries, creating complex structures that support enormous biodiversity.
Keystone Species and Ecosystem Stability
Some species have an outsized effect on the ecosystems they inhabit. Remove them, and the whole system can unravel. These are called keystone species, and they come in different forms.
Apex predators are one type. Jaguars, the largest wild cats in the Americas, keep populations of deer, peccaries, and capybaras in check. Without jaguars, these herbivores would multiply and strip vegetation, triggering a cascade of species loss. A very different kind of keystone species is ivory tree coral in the Caribbean and Gulf of Mexico. Rather than controlling other populations through predation, this coral provides food and shelter for thousands of invertebrate and fish species. Its loss would collapse the community that depends on it.
Even humble organisms can be keystone species. Mosses, liverworts, and hornworts form the bulk of peat in peatland ecosystems. They slow down microbial processes that produce greenhouse gases and lock carbon dioxide into peat. Without them, peatlands lose their ability to store carbon, with consequences that ripple far beyond the local ecosystem.
How Ecosystems Change Over Time
Ecosystems are not static. They develop through a process called ecological succession, which comes in two forms. Primary succession begins on completely bare surfaces where no life existed before: newly cooled lava, or rock exposed by a retreating glacier. Pioneer species like lichens are the first to colonize, slowly breaking down rock into the beginnings of soil. As those pioneers die and decompose, they create enough soil for small plants, then shrubs, then eventually trees. This process can take centuries.
Secondary succession is faster because it starts with soil already in place. After a disturbance like a wildfire or a cleared farm field, grasses appear first, followed by shrubs, then young trees, and eventually a mature forest. Fire can actually accelerate this process by recycling nutrients locked in dead wood and leaf litter back into the soil.
What Ecosystems Provide to Humans
Ecosystems provide services that human economies and societies depend on, generally grouped into four categories. Provisioning services are the tangible products: food, fresh water, timber, fiber, and medicine. Regulating services are the behind-the-scenes benefits: forests filtering air and water, wetlands absorbing floodwater, insects pollinating crops, and ecosystems regulating climate by storing carbon. Cultural services are nonmaterial: recreation, spiritual value, aesthetic enjoyment, and the scientific knowledge ecosystems provide. Supporting services underpin all the others: soil formation, nutrient cycling, and photosynthesis that produces oxygen.
Ecosystems Under Pressure
Global assessments paint a sobering picture of the state of the world’s ecosystems. Thirty-eight percent of the world’s tree species are threatened by a combination of deforestation, urban development, agriculture, invasive species, and climate change. One quarter of assessed freshwater species face extinction. Between 2000 and 2021, roughly 3.5 percent of the world’s mountain areas experienced harmful land cover changes. While protection of key biodiversity areas has increased from about 25 percent to 44 percent over the past 25 years, more than half of each site on average still lacks formal protection.
Perhaps more concerning are tipping points, thresholds beyond which ecosystems shift irreversibly into something fundamentally different. The Amazon rainforest is one prominent example. As temperatures rise, drought and wildfire increase, killing trees and releasing carbon, which makes the forest hotter and drier, which kills more trees. Scientists warn that by 2050, nearly half of the Amazon could face multiple stressors that push it past a tipping point, potentially converting dense rainforest canopy into dry savanna for centuries. Tropical coral reefs face a similar threshold: above 1.5 degrees Celsius of global warming, there is a 99 percent chance that low-latitude reefs cross their breaking point. These shifts don’t just affect the organisms living there. They disrupt services that billions of people depend on, from carbon storage to fisheries to weather patterns shaped by ocean currents.

