We classify rock-forming minerals in many ways. Often, geologists contrast primary minerals and secondary minerals. Primary minerals are those that are present from the time a rock first forms. Secondary minerals form later by chemical or physical reaction within the rock. Often, such secondary reactions involve H2O or CO2 and occur during weathering, diagenesis, or other low-temperature alteration of a preexisting rock. The distinction between primary and secondary minerals is not exact. A primary mineral in one rock may be a secondary mineral in another.
We further divide primary minerals into essential minerals and accessory minerals. Essential minerals are those whose presence is implied by the name of the rock. All limestones, for example, contain calcite or dolomite, and all granites contain quartz and K-feldspar. Essential minerals, for the most part, control rock properties.
Accessory minerals are generally present in minor amounts and do not affect most rock properties. These minerals may be made of common elements such as iron in magnetite (which is a common accessory mineral). Accessory minerals also commonly contain incompatible elements, elements that are not easily incorporated into essential minerals. Zirconium (Zr), for example, often concentrates in zircon, ZrSiO4, a minor accessory mineral in many rocks. Phosphorus (P) may lead to formation of phosphate minerals such as apatite, Ca5(PO4)3(OH,F,Cl), also a common accessory mineral. In most igneous and metamorphic rocks, silicates make up the essential minerals, while oxides, sulfides, and other kinds of minerals make up the accessory minerals.