Skip to main content
K12 LibreTexts

18.2: Roles in an Ecosystem

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Can you pick out the organisms at the bottom and at the top of this food chain?

    What's at the bottom of this food chain? Plankton. These tiny creatures incorporate energy from the Sun through photosynthesis. The energy is then passed between the various levels of the food chain. After plankton, corals are next. Coral are animals that live with tiny zooxanthellae that also photosynthesize. This means that all of the energy in the food chain originates from the Sun! Of course, you know what's at the top of this food chain!

    Roles in Ecosystems

    All ecosystems have living things that play the same basic roles. Some organisms must be producers. Others must be consumers. Decomposers are also important.


    Producers are living things that use energy to make food. Producers make food for themselves and other living things. There are two types of producers:

    • By far the most common producers use the energy in sunlight to make food. This is called photosynthesis. Producers that photosynthesize include plants and algae. These organisms must live where there is plenty of sunlight.
    • Other producers use the energy in chemicals to make food. This is called chemosynthesis. Only a very few producers are of this type, and all of them are microbes. These producers live deep under the ocean where there is no sunlight. An example is pictured below (Figure below).

    A picture of an ecosystem on the ocean floor

    Microbes use chemicals to make food. The chemicals pour out of a crack on the ocean floor at a mid-ocean ridge. What consumers live in this ecosystem?


    Consumers can’t make their own food. Consumers must eat producers or other consumers. Listed below are the three main types of consumers (Figure below): herbivores, carnivores, and omnivores. Which type are you?

    Herbivores, carnivores, and omnivores are the three main types of consumers

    Examples of the main types of consumers. Can you name other consumers of each type?

    Consumers get their food in different ways (Figure below). Grazers feed on living organisms without killing them. A rabbit nibbles on leaves, and a mosquito sucks a drop of blood. Predators, like lions, capture and kill animals for food. The animals they eat are called prey. Even some plants are consumers. Pitcher plants trap insects in their sticky fluid in their “pitchers.” The insects are their prey. Scavengers eat animals that are already dead. This hyena is eating the remains of a lion’s prey. Decomposers break down dead organisms and the wastes of living things (Figure below). This dung beetle is rolling a ball of dung (animal waste) back to its nest. The beetle will use the dung to feed its young. The mushrooms pictured are growing on a dead log. They will slowly break it down. This releases its nutrients to the soil.

    The different ways consumer get food

    Ways consumers get food. Do you know how earthworms get food?


    • Herbivores eat plants, carnivores eat meat, and omnivores eat both.
    • Predators are animals that eat a prey animal. Scavengers eat organisms that are already dead. Decomposers break down dead plants and animals into component parts, including nutrients.
    • Producers create food energy. They are the base of all life on Earth. Most producers use photosynthesis but a very small number use chemosynthesis.


    1. What are consumers? What are the three types of consumers and what do they eat?
    2. Compare and contrast photosynthesis and chemosynthesis.
    3. What role do decomposers play in an ecosystem? What would happen if there were no decomposers?

    Explore More

    Use the resource below to answer the questions that follow.

    1. What is competition?
    2. What is predation?
    3. What is symbiosis?
    4. How do stable communities develop?
    5. What is succession?
    6. What is a niche? What does a niche include?
    7. What causes competition?

    This page titled 18.2: Roles in an Ecosystem is shared under a CK-12 license and was authored, remixed, and/or curated by CK-12 Foundation via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    CK-12 Foundation
    CK-12 Foundation is licensed under CK-12 Curriculum Materials License