Most gems form in the Earth's crust, while a few form even in the deeper layer called the mantle, as…