Allow me to hearken momentarily back to Newton's picture of
light as particles.24.19
Actually the following analysis pertains to any
particles whose rest mass is zero.
If m = 0 then Eq.(6) is absurd,
except in the rather useless sense that we may let
become infinite.
On the other hand, Eq.(17) works fine if m = 0.
Then we just have
Thus, even though light has no REST MASS (because it can never be at rest!), it does have an effective mass which (it turns out) has all the properties one expects from MASS - in particular, it has weight in a gravitational field [photons can "fall"] and exerts a gravitational attraction of its own on other masses. The classic Gedankenexperiment on this topic is one in which the net mass of a closed box with mirrored sides increases if it is filled with light bouncing back and forth off the mirrors!
Is that weird, or what?