* Olivine is a mafic mineral, meaning it is rich in magnesium (Mg) and iron (Fe). It forms at high temperatures and pressures deep within the Earth's mantle. Olivine is characteristic of ultramafic and mafic igneous rocks, like peridotite and basalt, which are typically formed from the cooling of molten rock from the mantle.
* Quartz is a felsic mineral, meaning it is rich in silicon (Si) and oxygen (O). It forms at lower temperatures and pressures than olivine, typically in the Earth's crust. Quartz is common in felsic igneous rocks, like granite and rhyolite, which are formed from the cooling of magma that has been enriched in silica.
The fundamental reason for their incompatibility is their differing silica content. Olivine has a relatively low silica content (SiO2), while quartz is almost entirely silica. When magma cools, the minerals crystallize out in a specific sequence, with the minerals containing more silica crystallizing last.
Therefore, a magma that is cooling down will form olivine first if present, and then as it continues to cool, quartz will eventually form if the magma is rich enough in silica. By the time quartz forms, the magma will no longer be saturated in the elements needed for olivine to form.
In short, olivine and quartz are not found in the same igneous rock because they form at different stages of the cooling process and have different chemical compositions.