Why is the light affected by gravity if photons are massless ?
1 Answer
Photons are "kind of" massless.
Explanation:
In the normal expression of mass in physics, yes, photons have zero mass. However, this can be misleading.
I am not sure how much familiarity you have with relativity, so I will keep this as concise and high-level as possible.
Light is composed of photons. Saying photons are massless is true to some extent, but let's be more explicit:
It is this relativistic mass that allows it to be influenced by gravity if you are still picturing the typical "gravity pulling on me because I have mass" scenario.
Typically in modern physics we consider an equivalent, but much more generalized geometrical picture of gravity. Spacetime and gravity have a beautiful geometric representation thanks to Einstein's Theory of General Relativity. Massive objects distort spacetime in their vicinity. Since light follows the shortest possible path, it tries to move in a straight path. However, when it encounters a bend in spacetime, it inevitably follows the shortest curved path available.
This "bending" of light's path can be visually interpreted as the object "using its gravity to pull on the light". In fact, every situation can be visualized in this way. When you drop an object and it falls to the floor, the object has actually moved along the shortest curved path in the curved spacetime created by Earth's gravitational field. You may think "Ok, but when things are dropped they move in a straight line to the floor. They don't curve or bend." You would be mostly correct. Curved paths over very, very short distances are almost identical to linear paths. We can't actually identify this in everyday life. However with light and massive galaxies, we certainly can view this bending of an object's path through spacetime (this is called gravitational lensing).
One last thought that is better to remember than gravity affecting objects with mass is:
If you think of gravity in this way then it doesn't lead to this type of question, as you should know that a photon has an energy given by
hence, gravity is definitely going to influence it.
Let me know if this is sufficient. If not, I will elaborate further on any of these ideas.