This is because lichen is a symbiotic relationship between fungi and algae that makes them versatile. The fungi hyphae are able to produce enzymes extracellularly that dissolve the substrate and absorb the nutrient. These shallow roots are therefore able to grow on bare rocks and provide an anchor. The algae, on the other hand, are able to photosynthesize and provide carbohydrates to the fungi while the fungi protect the algae.