Earth is a closed system where matter does not enter or leave, but energy can be exchanged with the outside environment.

Welcome to Environmental Science! – The Four Spheres of the Environment