Science · Ecosystems & the environment

Ecosystems, habitats and niches

An ecosystem is a community of living things plus the place they live in. See how ecologists describe one, what a niche is, and why similar climates grow similar communities on different continents.

4 short lessons · about 16 minutes · 6 sources · updated November 2026

What you will learn

  • Tell an individual, a population, a community and an ecosystem apart
  • Explain what an ecosystem includes beyond its living things and why that matters
  • Tell a species' habitat apart from its niche
  • Explain why two species can't share one niche for long and how they avoid it

Lesson 1 of 4 · 4 min

From one butterfly to a whole ecosystem

Before you readWild lupine, the only plant the Karner blue butterfly lays its eggs on, has declined in the United States. What has that been linked to?

Correct.Not quite. The answer is Fewer wildfires.

Lupine needs open ground, and putting out wildfires lets trees and shrubs close in. The lesson shows why a fire can matter to a butterfly.

The Karner blue is a small butterfly listed as endangered in the United States. Its females lay eggs on just one plant, wild lupine. Ecologists study it at several levels, and each asks a different question.

At the level of the individual, they ask how one butterfly is built and behaves to fit its surroundings. A population is all the members of one species living in the same area at the same time. Population ecologists count Karner blues and ask why their numbers rise or fall.

A community is all the different species in an area and the ways they interact. The Karner blue's community includes ants. The caterpillars give off a sugary liquid the ants feed on, and the ants guard the caterpillars from spiders and predatory insects. Both sides gain, a partnership ecologists call mutualism.

Check yourselfEcologists count every Karner blue butterfly in one pine barren each year. Which level are they studying?

Correct.Not quite. The answer is A population.

Counting one species in one area over time is population ecology. A community would include the ants, plants and every other species there.

An ecosystem is the community plus the nonliving parts of the place, such as air, water, soil and fire. Ecologists call the living parts biotic and the nonliving parts abiotic. Ecosystem ecologists also track how energy and nutrients move between the two. All of Earth's ecosystems together make the biosphere.

This level explains things the others can't. Karner blues live in oak-pine barrens with poor, low-nitrogen soils. Wild lupine thrives only in open ground, and natural wildfires used to keep it open by clearing trees and shrubs. When people put the fires out, shrubs closed in and lupine declined, taking away the only plant the butterfly lays its eggs on.

Try to recallWhat does an ecosystem include that a community doesn't, and why does that matter for the Karner blue butterfly?

An ecosystem adds the nonliving parts, such as soil, water and fire. For the Karner blue, wildfires kept the ground open for wild lupine. Stopping the fires let shrubs crowd out the lupine the butterfly depends on.

Individuals make up populations, populations make up communities, and a community plus its soil, water and fire is an ecosystem.

Lessons in this topic

  1. From one butterfly to a whole ecosystem

    Follow one endangered butterfly up through the levels ecologists use, and see what an ecosystem adds that a list of species leaves out.

    Essentials · 4 min

  2. Where a species lives and how it makes a living

    Tell a habitat from a niche, and see why two species competing for exactly the same things can't share a place for long.

    Essentials · 4 min

  3. What sets the limits on where a species can live

    See how the scarcest resource caps growth, how each species has a range it can tolerate, and why most species live in only part of that range.

    Deeper · 4 min

  4. Why similar climates grow look-alike living worlds

    See how temperature and rainfall sort land into biomes, and why unrelated plants on different continents end up looking alike.

    Deeper · 4 min

Three quick stories from this topic

Butterflies with bodyguards

Karner blue caterpillars pay ants in sugar to guard them from spiders

The caterpillars ooze a sugary liquid and give off ant-like scents that draw ants in. The ants feed and in return drive off spiders and predatory insects, which raises the caterpillars' survival.

A rare butterfly

The Karner blue is endangered in the United States, and its females lay eggs only on wild lupine.

A fire-loving plant

Wild lupine needs open ground. Natural wildfires used to clear it, and putting them out has let shrubs crowd the lupine out.

Twins from two continents

A South African succulent and a Mexican cactus look like twins but aren't related

The baseball plant, Euphorbia obesa, grows in South Africa's dry Karoo. It closely resembles the cactus Astrophytum asterias, because similar dry climates favored the same round, ribbed, water-storing shape.

Convergent evolution

When unrelated lineages face the same conditions, natural selection can push them toward the same solutions.

Same climate, same biome

That's why shrubland like California's chaparral also grows around the Mediterranean and in southern Australia.

The lake split in two

In 1973 scientists hung a curtain across a Canadian lake to test what feeds algae

Both halves of Lake 226 got carbon and nitrogen, and only one also got phosphorus. That half bloomed bright green with algae while the other stayed clear. Phosphorus was the limiting nutrient.

From lake to law

The experiments in Ontario's Experimental Lakes Area helped lead to bans on phosphates in household detergents.

The scarcest wins

Growth is set by the scarcest resource. Adding more of what's already plentiful changes almost nothing.

Sources

  • Food webs and ecological knock-on effects

    Read who eats whom, tell the flow of energy apart from the recycling of materials, and reason carefully about indirect ecological effects.

    4 lessons · 14 min

  • How energy and matter move through an ecosystem

    Energy passes through an ecosystem once and leaves as heat, while matter cycles back again. That's why the two have to be tracked separately.

    4 lessons · 20 min

  • Biodiversity

    Biodiversity is the variety of life, counted in genes, species and ecosystems. See how many species there are, why the tropics hold so many, what variety does for us, and how to read the numbers on its loss.

    4 lessons · 16 min

  • The Solar System

    Meet the Sun, eight planets and the smaller bodies around them, get a feel for the real distances, and see why rocky worlds sit close in and giants far out.

    4 lessons · 18 min

  • Why things keep moving

    Moving things don't stop by themselves. Find out what stops them, what mass really measures, and why astronauts float while gravity is still pulling on them.

    4 lessons · 21 min

  • The greenhouse effect

    Follow energy into and out of Earth, see how greenhouse gases shift that balance, and tell a forcing from a feedback.

    4 lessons · 14 min

All science topics · Take the quiz