Here's the breakdown:
* Gravity's Influence on Light: Gravity affects the energy of photons, the particles that make up light. As light climbs out of a gravitational well (moving away from a planet or star), it loses energy.
* Energy and Wavelength: The energy of a photon is directly related to its frequency and inversely related to its wavelength. So, if a photon loses energy, its frequency decreases, and its wavelength increases.
* Redshift: Since red light has a longer wavelength than blue light, the increase in wavelength is called redshift. This is analogous to the Doppler effect for sound waves, where a moving object's sound waves get stretched as it moves away from you, resulting in a lower pitch (longer wavelength).
In summary: As light travels outward from a strong gravitational field, its energy decreases due to the work done against gravity. This decrease in energy manifests as an increase in wavelength, known as gravitational redshift.