In the context of Newtonian gravity, all masses exert a force of attraction on each other, depending on the distance and the mass of each. In the context of general relativity, any mass is a source of gravity by the deformation of the geometry of space-time. So what about zero-mass particles? Are they also affected by gravity?
When Isaac Newton first proposed his law of universal gravity, a real revolution was born. The same law that explained the falling of objects on Earth also explained the movements and attraction of bodies throughout the Universe. Objects fall to Earth due to gravity; the planets have a spheroid shape because of gravity; the moons orbit the planets, and the planets orbit the Sun because of gravity.
Newton's law of gravitation is simple but profound:massive objects attract each other based on their mass, distance, and gravitational constant. Multiplying the gravitational constant by any two masses, divided by the squared distance between them, was enough to universally express gravity.
This law made it possible to explain all types of orbits:circles, ellipses, parabolas and hyperbolas. It allowed to explain the gravitational potential energy, and the transformation of this one into kinetic energy. It also explained escape velocity and how to escape Earth's gravity. For nearly 200 years, Newtonian gravity solved all problems involving gravity.
This is the essence of universal gravity:it acts instantaneously at any point in the Universe between all massive objects. However, with the improvement of observation instruments, many cosmological problems have begun to taint Newton's law. In particular the observation of the curvature of light around massive objects, which proved to be incompatible with a law that only takes mass into account to describe gravity.
In addition, many clues called into question another major postulate of Newtonian gravity:the rigidity of space-time. More precisely, for Newton, space and time are two different entities, separate, rigid and immutable. It was not until the work of Albert Einstein on general relativity, in 1915, to understand that to be correct and faithfully account for the observations made, a theory of gravity must be true for any observer, in any any repository.
Such an assertion therefore required postulates radically different from those of Newton. In general relativity, space and time no longer form a single entity, space-time, dynamic and relative, of which each observer has a vision as valid and correct as the others. This space-time is deformable under the effect of constraints applied to it. The source of these deformations is no longer mass, but energy, of which mass is only one form. And this deformation propagates at the speed of light in a vacuum, not instantaneously.
Related topic:Spacetime, Curved by Mass or by Energy?
Thus, any source of energy can distort the geometry of space-time and is at the origin of a gravitational field. This is therefore the case for particles of zero mass such as the photon which, even without mass, still has a non-zero energy (which is not calculated with the formula E=mc² since the photon is not at rest in no reference frame, but with the formula E=hv, where "h" is Planck's constant and "v" the photon frequency), and is therefore also the source of a gravitational field.
Einstein's equation clearly shows the relationship between spacetime geometry and energy-matter distribution. Matter and energy bend spacetime, and curved spacetime tells matter and energy how to move. So unlike Newtonian gravity where the planets orbit the Sun only because of the gravitational force of attraction, in general relativity the planets move in the curvature of space-time produced by the Sun.
These curved trajectories in spacetime are called geodesics. In other words, the generalization of a straight line in a curved space is a geodesic. The planets therefore follow the geodesics around the Sun. Similarly, photons always travel in a straight line; so when a source of energy or matter bends space-time on their trajectory, they are forced to follow the geodesics thus formed. This is how zero-mass particles are affected by gravity.