Pyrite, also known as iron sulfide, is a common mineral that forms in a variety of environments. It typically forms through the precipitation of sulfur and iron from aqueous solutions.
One common way pyrite forms is through the precipitation of iron and sulfur in sedimentary rocks, such as shales and sandstones. In this process, iron and sulfur-rich fluids move through the rock, depositing pyrite in the spaces between the sedimentary grains.
Pyrite can also form as a hydrothermal mineral, precipitating from hot fluids that circulate through rocks deep in the Earth's crust. These fluids carry dissolved iron and sulfur compounds and deposit them as minerals such as pyrite.
Additionally, pyrite can also form by the reaction of iron and sulfur compounds in the presence of bacteria, which oxidize the sulfur and reduce the iron, creating pyrite. This process can happen in environments like marshes, bogs, and wetlands, where there is a lot of organic matter, and the sediment is rich in iron and sulfur compounds.
In summary, pyrite forms through the precipitation of sulfur and iron from aqueous solutions, in sedimentary rocks, through hydrothermal processes, and also through bacterial reactions.