I have read over the definition of the derivation of the energy relationship with momentum and rest mass and I am a little confused. By looking at the definition of relativistic mass we have the definition m = m0 / SQR(1 - v^2/c^2) where m0 is the rest mass. Now a photon always travels at speed c (part of the relativity axioms) so the speed must be c and therefore the rest mass must be zero. Now enter quantum mechanics. It turns out that the energy of the photon comes in "lumps" and the energy component of a photon is given by E = hf. Now i'm ok with these two. Now I also understand that mass != matter and that you can have something with mass and no matter thats fine. What I don't get is how you can suddenly use the equation E^2 = p^2c^4 + m0^2c^4 and get a non-zero rest mass or even non-zero relativistic mass and as such even a non-zero energy given the mass of the photon in any state should be zero from the relativistic formula. It seems that the E=hf expression is completely incompatible with mass in the first place. So as you can see I'm a little confused as to how a photon of light can have any energy at all under standard mechanics (although i understand it when dealing with quantum mechanics). For example if v = c then m0 must equal 0. Now any relativistic mass should by the definition of mass equal zero since both a) the rest mass is zero and b) the photon always travels at c which results in a). I understand the definitions of momentum and how you use differential and integral calculus to go from momentum to force to energy etc. Sorry for repeating this but it seems like there is an inconsistency in the whole system to me but i'm probably missing something so I'd welcome anyone to tell me what I'm missing. Many thanks to any responses.