Firstly I’d like to thank Pratik for asking me this question and making me think of an easy way to explain it, secondly a photon is not truly massless.
What do you mean?
Well, technically a photon has zero rest mass. The mass of a photon is derived from E=mc^2, where E is derived from the photon’s frequency using E=hf. If it were possible to slow down a photon to below the speed of light, it would cease to be observable.
Rest mass? What is that?
When things aren’t moving, they have a specific mass, and that is considered their rest mass. If a human is sitting still, their mass is approximately m, but if they’re moving at a speed relative to the speed of light their mass changes. This is called the relativistic mass. A proton has a rest mass of 938 MeV, and its relativistic mass depends on how fast it is moving. Using the energy-momentum relation (E^2=mc^4+pc^2), you can derive that mass is a relationship of energy and momentum (m^2=E^2-p^2). In the rest frame where p is zero, you know that E=m when m is greater than zero. When there is a momentum involved, E increases from the rest mass. To see a full derivation of relativistic energy, check out my professor’s notes here(the derivation is page 31 and 32).
Why use eV?
Particle masses are measured in electron volts (eV) because regular units like the gram are too large for such a small particle. To compare, a proton is about 938 MeV, and in grams it’s 1.67×10^-27kg, which is 1.6 preceded by 27 zeroes. When doing calculations with lots of different numbers, having to type in 27 zeroes or using a scientific notation can get messy, so physicists started describing particle masses and energies in terms of electron Volts, which is the amount of energy gained by an electron when it is moved across a potential difference of 1 volt.
Another reason we use eV instead of a normal unit like grams or kilowatt-hours is because if we used normal units, regular people would know what we’re talking about.
So back to the photon…
If you used E=mc^2, you would find that as a particle accelerates closer and closer to the speed of light, it takes more and more energy to accelerate it. If you wanted to accelerate a particle with mass to the speed of light, you would need an infinite amount of energy. Since the photon takes no energy to travel at c, and instead has an inherent energy when it is moving, we know that the photon is massless.
Wait a minute. If the photon is massless, how does it interact with gravitational fields in space?
Good point, but when you talk about gravitational lensing, and try to apply classical physics, you get a big big big mess.
To understand this, you need an understanding of general relativity, which I’ll explain in a later post.