Ruby is a variety of the mineral corundum, characterized by its vibrant red color derived primarily from chromium impurities within its crystal lattice. Chemically, corundum is an aluminum oxide ($\text{Al}_2\text{O}_3$) mineral that forms under intense geological heat and pressure, typically within metamorphic or igneous environments. The hardness of corundum is measured at nine on the Mohs scale of mineral hardness, making it exceptionally durable. The gem's formation and subsequent refinement are processes that are highly valued in various forms of materials science and industry.