How is light affected by gravity?

In general relativity, gravity affects anything with energy. While light doesn't have rest-mass, it still has energy --- and is thus affected by gravity.

If you think of gravity as a distortion in space-time (a la general relativity), it doesn't matter what the secondary object is. As long as it exists, gravity affects it.


When you think about how gravity affects light you really need to think in terms of general relativity, which describes gravity as the effect of a curved space-time on moving particles. Summarized by John Wheeler, mass tells space how to curve and space-time tells mass how to move.

When we apply this to light we start with the fact that light travels in straight lines (null geodesics). However when we have a large mass (say the Sun) it curves space around it, so our light ray will follow a straight line in this curved space-time. This path will appear bent to us and leads to the phenomena of gravitational lensing.

As an aside, this also easily answers the question of why all masses fall at the same rate (or gravitational mass equals inertial mass). Massive particles also follow geodesics (straight lines) in this curved space-time, so if I throw two objects of different masses with the same initial velocity they will follow the same geodesic through space-time, and we see this as both objects having the same acceleration.


The source of gravity in general relativity is an object called the stress-energy tensor, which includes energy density, momentum density, energy flux, momentum flux (which includes shear stress and pressure) etc. Obviously, light has energy, so it acts gravitationally in GR. Since $E = mc^2$, we see that mass contributes an enormous amount of energy - so, massive objects have very strong gravitational fields, so that the other terms are negligible, which is why Newton's law works so well. However, they are there - so, light does have a gravitational field, even though it has zero mass.