Various values of $w$ in the equation $p=w\rho$ In cosmology, while deriving how the energy density dilutes with the scale factor one assumes $p=w\rho$ with $w=0$ for the matter, $w=-1$ for vacuum energy and $w=1/3$ for the radiation. In know the energy density of radiation varies as $p=\frac{1}{3}\rho$. But I do not understand why is it taken to be zero for matter and $-1$ for vacuum energy (This implies vacuum energy doesn't dilute with expansion. But if vaccum energy is the zero point energy of the fields I don't see a why it shouldn't dilute.)? I was reading Kolb and Turner's book but didn't get any answer there.
 A: Dark matter is assumed to be a pressureless fluid, only affected by gravity, therefore $p_{\rm dm} = 0$, or $w_{\rm dm} = 0$. In general, Friedmann equations coupled with the First Law of thermodynamics implies that the density of a component with EoS $p = w \rho$ should scale as
$$
\rho \sim a^{-3(1 + w)}
$$
From this, you can see again that for regular matter $w = 0$, so that $\rho\sim a^{-3}$ as expected. If you take $w = -1$ you see that $\rho\sim 1$, that means that the density does not change over time. One possibility for such a fluid is vacuum, indeed, the more cubic meters of empty universe you create, the more vacuum there is
A: The Friedmann equations assume that all our matter fields are perfect fluids. Those, in the rest frame of the fluid, assume the form of the stress-energy tensor
$$T^{\mu\nu}_{fluid} = \begin{pmatrix} \rho & 0 & 0 & 0 \\ 0&P&0&0 \\ 0&0&P&0 \\ 0&0&0&P  \end{pmatrix}$$
where $\rho$ is the total energy density including both the energy coming from the rest mass of the particles and the internal energy coming from random microscopic motion velocities. A good model for matter at finite temperature, with $k_B T \ll mc^2$ to linear order, is the ideal gas non-relativistic in its rest frame
$$p = n k_B T,\; \rho = mn + \frac{3}{2}n k_B T$$
where $n$ is the number density of particles in the rest frame of the fluid and $m$ is the particle mass. Now you see that for this gas there is really no relation $p=w\rho$ with $w$ a constant factor. 
We may, however, still compute that under the assumption of adiabatic expansion (entropy per particle constant),  the $\sim n k_B T $ term will scale with $(a/a_0)^{-5}$ whereas the $mn$ term will scale with $(a/a_0)^{-3}$. 
A common approximation in cosmology is to do the "quick and dirty" approximation where even the $\sim n k_B T$ terms are completely neglected with respect to $\sim mn$. 
This makes the computation tidy and tractable, verifiable to a certain degree by hand, but I cannot advocate for this approximation beyond that. Naturally, this leads to a trivial $p = w \rho$ with $w=0$.

As for vacuum energy, this is simply the cosmological constant which shows up in Einstein equations as $\Lambda g_{\mu \nu}$ on the "left-hand-side" (the gravitational part). This can be somehow linked with vacuum energy, but it can be simply understood as a constant of nature determining the properties of gravity in our universe. If we move it to the "right-hand side" of matter in the Einstein equations and understand it as vacuum energy, we get a stress-energy tensor in the frame of the cosmological fluid
$$-\Lambda g^{\mu \nu} = T^{\mu\nu}_{vac} = \pmatrix{\Lambda&0&0&0\\0&-\Lambda&0&0\\ 0&0&-\Lambda&0\\0&0&0&-\Lambda}$$
If, then, you purely formally understand this stress-energy tensor as the stress-energy tensor of a perfect fluid as shown above, you get $P_\Lambda = - \rho_\Lambda$ and $w$ is simply $-1$.

If you would like to dig deeper, the reason why vacuum energy is allowed to behave this way comes from the construction of the Einstein equations which I have briefly described here.
A: Considering the FRW metric for the one can derive the energy conservation law:
$$\dot{\rho}=-3H(\rho+p)$$
where $\rho$ is energy density (not energy but energy density) and 
p is the pressure.
Equation of state of the matter:
Energy density of matter is given by (taking $k_{B}=1$)
$$\rho=nm+\frac{3}{2}nT$$
whereas the pressure $p=nT$. For a non-relativistic particle i.e., 
matter, $m\gg T$. So, $$\frac{p}{\rho}\approx\frac{T}{m}\approx0$$
Hence, w=0 for the matter
Equation of state of vacuum energy density:
Vacuum energy density is a constant energy density in the 
Einstein's equation.So, $\rho_{vacuum}=\Lambda$ remains 
constant.This gives, $\dot{\Lambda}=0$. Now, using the energy 
conservation law
This implies, 
$$-3H(\Lambda+p)=0$$
which gives $p=-\Lambda$. This means, w=-1 for vacuum energy density 
Presently, the vacuum energy density ( Dark energy) dominates the 
universe. And the proportion of vacuum energy density increases 
in the future as the temperature of universe is dropping due to 
expansion.
