Why do matter and radiation densities scale differently in expanding universe, when all matter is energy and all energy is matter? I sometimes see the first Friedmann equation expressed with different terms for the density of "matter" and the density of "radiation". It is said that with an increase in scale factor of $a$, the density of "matter" drops by a factor of $a^3$, since the volume of space has expanded by $a^3$; but the density of "radiation" drops by a factor of $a^4$, because in addition to the expansion of space, it also gets redshifted.
But as we know, matter and energy are equivalent. So I am trying to understand what exactly distinguishes "matter" from "radiation" here.
Although a photon traveling through expanding space gets redshifted, a massive particle traveling through expanding space also has its de Broglie wavelength redshifted, which causes it to lose kinetic energy. So is part of the energy of moving particles also considered "radiation"? Is the difference between "matter" and "radiation" that "radiation" means kinetic energy and "matter" means rest energy?
But the rest energy of ordinary matter is mostly the rest energy of protons and neutrons. A large part of the rest energy of protons and neutrons is the kinetic energy of the quarks and gluons inside. Does that kinetic energy also decrease as space expands? Or does it not decrease because it is confined in a fixed volume of space? So does "radiation" only cover the kinetic energy that is used to travel from one part of space to another, and "matter" cover energy that is confined?
 A: If you place ordinary matter of mass $M$ in a cubical container (length = 1unit), then density of this matter is $\rho=M$ (/unit^3). Now in FLRW cosmology, the three dimensional separation scales by a factor of $a(t)$, so overall the volume scales as $a^3$. The density will ,therefore, vary as $\rho=\frac{M}{a^3}\propto a^{-3}$.
Due to mass-energy equivalence, this is same as the energy density of the ordinary matter.
For radiation we know that $E=p=\frac{h}{\lambda}$(from de-Broglie's hypothesis). If we consider that the radiation forms a standing wave inside the container, then wavelength must satisfy $2L=n\lambda$, here $L=a(t)$. So we see that $E\propto a^{-1}$, and so energy density should decay as $\rho\propto a^{-4}$.
If we try to approximate an ordinary massive particle by a highly localized wave pulse, then Fourier transformation rule says that such a localized wave pulse can be obtained by superimposing many monochromatic waves, so naively we will have to add many contributions of $a^{-4}$ terms to obtain the $a^{-3}$ relation. Overall, the intuitive understanding is that a massive particle can be represented using many massless particle states.
A: 
So does "radiation" only cover the kinetic energy that is used to travel from one part of space to another, and "matter" cover energy that is confined?

To see the difference between radiation and matter one has to look at the four vector algebra, necessarily in special and general relativity.
The "length" of the four vector is different between radiation and matter:


The length of this 4-vector is the rest energy of the particle. The invariance is associated with the fact that the rest mass is the same in any inertial frame of reference.

For matter composing particles,  $m_0$ is never zero. Radiation, in cosmology, is composed by particles whose  $m_0$  is equal to zero (or very nearly so, neutrinos for example), and move with the velocity of light .
Seems to me that it is obvious that the densities will be different.
