# What is the density and energy of a photon?

As I understand, photons are considered mass-less, which is a necessary condition for moving at the speed of light. However, does that mean their density is 0, as they will occupy some volume. If their density is zero, that means there is no matter inside a photon. Thus, shouldn't a photon be able to pass through matter instead of colliding with it? As $E = mc^2$, shouldn't a photon have zero energy, as it has zero mass?

The complete energy relation is $$E^2 = m^2c^4 + \lvert \vec{p} \rvert^2 c^2$$ The photon has $m=0$, so we are left with $$E = \lvert \vec{p} \rvert c$$ (we don't care about the negative solution here). But according to De Broglie, it is $\vec{p} = \hbar \vec{k}$, so we have $$E = \hbar c \lvert \vec{k} \rvert$$ but $k=\frac{2\pi}{\lambda}$ and $\hbar=\frac{h}{2\pi}$. Therefore $$E=h\frac{c}{2\lambda} = h \nu$$ where $\nu$ is the frequency of the photon.