The law of Conservation of Energy states that in a closed system (the entire universe or the Earth and Moon?) the total amount of energy is conserved through time. The gravitational interaction between the Moon and Earth creates tides. Humans can use these tides to create electrical energy. In the cosmos, stars full of energy are created by gravity pulling together clouds of matter and heating them. My question is: In both of these instances, it seems to me like energy is being added to the system through gravity. Why is this not a violation of The Law of Conservation of Energy? Thanks.