Explain how chemistry is related to geology