The equation E = pc is valid
In Physics, the Energy-Momentum relation of a particle is given by
=Energy; =Momentum; =Velocity of light; =rest mass of particle. For Photon, =0 and thus is valid. For electron, and thus is not valid.