Solution:Rubies and Sapphires are both gem varieties of the mineral Corundum. Chemically, corundum is Aluminium Oxide (Al₂O₃). which owe their characteristic colours to trace impurities.
The difference in color between rubies (red) and sapphires (typically blue, but can be almost any other color) comes from the presence of trace elements (impurities) within the aluminium oxide crystal structure:
Rubies get their red color from trace amounts of chromium (Cr).
Blue Sapphires get their blue color from trace amounts of iron (Fe) and titanium (Ti). Other colors of sapphire are due to other trace elements.
Therefore, chemically, they are both Aluminium Oxide.