Einstein's famous theory of relativity is based on the general equation:
```
E^2 = p^2*c^2 + m^2*c^4
(E = m*c^2 is derived from this)
```
This tells us that energy **E** squared is equal to momentum **p** squared times times the speed of light **c** squared, plus mass **m** squared times the speed of light **c** to the fourth power.

Light is massless, but it can still have momentum. So, for the energy of a photon, we can simplify the general equation to get:
```
E = p*c
```
Photons are massless particles, and so get all their energy from momentum. If they were to ever run out of momentum, they would cease to exist.

When a photon enters a medium other than a vacuum it slows down. Since energy cannot be created or destroyed, this means that momentum increases to compensate! Since the new medium is not a vacuum the photon now has other particles it can bounce off. Because the speed of light for that medium is constant, whenever it hits a particle the photon transfers some of it's momentum/energy to it. Since light is both a particle and a wave, we can observe the light's reduced energy by looking at how the wavelength of the light changes. Shorter wavelengths of light like ultraviolet light are high in energy, while longer wavelengths like radio waves have lower energy. When the photon returns to a vacuum, the speed of light increases. But remember, energy can't be created or destroyed, so the photon's momentum decreases to compensate for the increased speed.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence