Photons are interesting little things. Modern physics teaches us that photons have zero mass and can therefore travel at the speed of light. It’s impossible for anything with mass to travel through spacetime at the speed of light. Pure energy. No mass.
Even so, pure energy is nothing to be trifled with. I’ve talked about radiation pressure before; radiation pressure, quite simply, is light pushing objects around. Radiation pressure from massive stars drives powerful stellar winds. If a star is too massive, radiation pressure can tear it apart. In fact, this is what happens in Wolf-Rayet stars.
At the same time, the humble photon has a surprising number of ways it can affect objects with mass. The simplest is that photons carry away energy, which can lead to a reduction in mass. Actually, this is one way in which stars lose mass — through photons. The same way, photons being absorbed increase the energy of a system, increasing the mass.
The process of gravitational lensing also tells us that photons are affected by gravity. More accurately the spacetime they move through is affected by gravity. A gravitational lens is caused by a strong gravitational field warping the path of light that travels through it. Photons are so affected by mass that black holes are (theoretically, at least) surrounded by a ‘photon sphere’ — a shell of photons actually captured into an orbit around the black hole.
The frequency of a photon is actually lowered by moving to a higher gravitational potential. In fact, this is responsible for the Integrated Sachs-Wolfe effect. The ISW effect is a nice little cosmological concept of how EM radiation is propagated by gravitational fields. Photons are accelerated towards a gravitational well. The resulting acceleration acts like a catapult, slinging them away from the other side of the gravity field with higher energy than they had initially. It’s the ISW effect that explains many of those fluctuations in the cosmic microwave background.
Photons can also affect the momentum of objects they interract with. The Poynting-Robertson effect, for instance, causes dust grains orbiting stars to slowly spiral inwards. The Yarkovsky effect, in turn, has an impact on the orbital paths of asteroids, due to both visible photons being absorbed by and infrared photons being emitted from the asteroid.
Photons even exert a gravitational attraction on other objects, which is strange for an object that supposedly has no mass. According to general relativity, photons contribute to the stress-energy tensor and hence, they have their own gravity. An infinitessimally small quanta of gravity, but gravity nonetheless. And there are a lot of photons in the universe. Relativity famously says that E=mc2. Or in natural units, c=1 and therefore E=m. Interesting, wouldn’t you say. Natural units also consider that h=1, so the “mass” of a photon would be directly equal to it’s frequency. In other words, an x-ray photon is more massive than an infrared one.
So, despite what we’re taught, photons apparently do have mass, are affected by gravity, and exert gravitational attraction on other objects with mass. Or at least they seem to. Kinda makes you wonder if we really need dark matter, don’t you think?