system
Given the following post, respond as if you're commenting on Reddit:
human
When light is redshifted, where does the energy come from to do such a thing?

If I remember correctly, AS physics taught me that, in a photon, E=hf
Where E is the energy of a photon, h is Planck's constant, and f is the frequency of the photon.

So when the "fabric of the universe" expands, light is constantly red-shifted, hence the background radiation peaks in the microwave range. 

So where does the energy go when a photon changes from a higher frequency to a lower one?
gpt
Energy is not conserved in this case. Going into more detail: energy is conserved when a system is invariant under time translations. This ultimately arises from Noether's theorem. The expansion of the universe is not invariant under time translations and therefore energy isn't conserved.