Here's why:
* Quartz is a major component of both rhyolite and andesite: Rhyolite and andesite are both felsic to intermediate igneous rocks. This means they have a relatively high silica content. Quartz is a silica-rich mineral, making it a common constituent.
* Crystallization process: During the cooling and crystallization of magma, quartz tends to form relatively late in the process. This means it's often found in both rocks, even if other minerals are present in varying amounts.
However, it's important to note that:
* Other minerals are present: Rhyolite and andesite can also contain other minerals like feldspar, mica, and amphibole.
* Variations in composition: The exact mineral composition of rhyolite and andesite can vary depending on the specific magma source and the conditions under which it cooled and crystallized.
So, while quartz is a reliable indicator of these rocks, it's not the only mineral you'll find in them.