The gravitational redshift of a light wave as it moves upwards against a gravitational field (produced by the yellow star below). The effect is greatly exaggerated in this diagram.
Gravitational redshift can be interpreted as a consequence of the equivalence principle (that gravitational effects are locally equivalent to inertial effects and the redshift is caused by the Doppler effect) or as a consequence of the mass–energy equivalence and conservation of energy ('falling' photons gain energy), though there are numerous subtleties that complicate a rigorous derivation. A gravitational redshift can also equivalently be interpreted as gravitational time dilation at the source of the radiation: if two oscillators (attached to transmitters producing electromagnetic radiation) are operating at different gravitational potentials, the oscillator at the higher gravitational potential (farther from the attracting body) will tick faster; that is, when observed from the same location, it will have a higher measured frequency than the oscillator at the lower gravitational potential (closer to the attracting body).