In fact, life has established itself in just about all conceivable habitats. The body surfaces, body cavities, and even cells of living things also provide potential habitats for other organisms. Additionally the food, bodies or secretory products of the host may provide resources for the symbiont. When two symbionts obtain their energy quite differently, the partnership can be very productive in terms of opening up niches and evolutionary pathways for the pair. Coral live in tropical oceans where nutrients are very scarce.
Coral are colonies of tiny animals which trap plankton for food.
There is very little plankton in tropical ocean water. However, within the tissues of the coral live symbiotic algae which photosynthesize using nutrients liberated from the animals ingested by the coral, passing some of the organic matter produced back to the coral. This tight nutrient cycling enables the coral reef to be one of the most productive ecosystems in the world, even though the surrounding ocean is no more productive than a terrestrial desert. Most higher plants have mycorrhizal fungi associated with their roots. The minute filaments of the fungus greatly extends the surface area for absorption of nutrients.