What is the mass of a photon moving at the speed of light? [duplicate]

1. What is the mass of a photon moving at the speed of light?

2. And if it does not have mass, how is it affected by gravity?

3. Also why does Einstein's general relativity support that a gravitational wave must travel at the speed of light?

I'm just an A-level student. So, I would appreciate it if you could explain it as idiotically as possible.

marked as duplicate by Waffle's Crazy Peanut, akhmeteli, ManishearthApr 23 '13 at 7:29

Zero. Mass is defined as the constant specific to each type of quantum, satisfying $$E^2 = p^2c^2 + m^2c^4$$
For a photon, $E=pc$ or in other words is 4-momentum is a null vector, meaning its timelike component and spacelike components have equal magnitude (after applying the spacetime conversion constant $c$ appropriately). Thus we put $m=0$.
In quantum field theory, electromagnetic forces are described in terms of virtual photons, for which $m$ does not have to be zero. These virtual photons are sometimes said to be "off the mass shell".
• In that formula $m$ is the rest mass. I think the OP is asking about effective mass. – kotozna Jan 9 '16 at 12:09