Fungi play various roles in an ecosystem.
Many are saprophytes decaying dead plant or animal material, and others are parasites. Those fungi that form lichens with algae are obviously symbiotic, while another fungus lifestyle is less apparent. The fungus mycelium interacts with the root cortex, significantly increasing the plant's uptake of water and important elements such as phosphorus and nitrogen. Many genera of gilled mushrooms form partnerships with temperate forest trees. The genus Lactarius is one example.