The study of the chemical composition of rocks and minerals, and how they interact with the environment.