How can interstellar space have a temperature of 2-3K? Several different sources online state that the average temperature of interstellar space (or the universe in general) is around 2-3K.
I learned that temperature is basically the wiggling of matter, and I find it somewhat counterintuitive that the wiggling of so few particles can cause a temperature of 2-3K. Is there a (order-of-magnitude) calculation which can show that this average temperature estimation is correct, using an estimation of the average density of interstellar space (or the universe in general)?
 A: To avoid more complex definitions of temperature (which do not require matter), you could say instead that "an object in interstellar space would be in thermal equilibrium with its environment when it is at a temperature near $3K$."
The matter nearby is too diffuse to affect the temperature much.  Instead, it is thermal equilibrium mostly due to radiation.  This is the measured temperature of the microwave background.  The object would be the same temperature even if it were a perfect vacuum in the vicinity.
A: Temperature in a gas is the average kinetic energy per particle. As an intrinsic property its value is entirely decoupled from how much stuff has the property. Whether there are 100 particles per cubic centimeter or only 1 particle per cubic meter, the temperature can be anything.
The coldest parts of the ISM are about 3 K, and getting colder than this is difficult, because the entire universe is bathed in a sea of 3 K photons. But some parts of the ISM are much, much hotter. The diffuse gas filling the space between galaxies in galaxy clusters can be hundreds of millions of degrees. This just means each particle is whizzing about very fast.
A: Too long to be a comment, this is an extension to Chris's answer.
Suppose a macroscopic object, a thermometer, for example, was placed in that hot intracluster medium (ICM) Chris mentioned in his answer. Even though that thermometer is surrounded by this hot gas, the thermometer will not get hot. It will instead cool to a tiny bit above the cosmic microwave background radiation temperature, about 2.73 Kelvin. At that equilibrium temperature, it will be absorbing a tiny bit of energy from the cosmic microwave background radiation and it will also be receiving a tiny bit of from extremely rare collisions with that hot medium. It will also be emitting a tiny bit of radiation to space, exactly equal to the total energy received.
That equilibrium temperature is so low because even though that medium is very hot (107 to 108 Kelvin), there's nothing there. Even the densest parts have 1000 particles per cubic meter. Compare that to air at standard temperature and pressure, which has on the order of 1025 molecules per cubic meter, or the very best ultra-high vacuum chambers found in physics labs, which at 10-12 pascal still have on the order of 108 molecules per cubic meter. Only a thousand particles or less per cubic meter means there's nothing there!  In lay terms, that medium has very low heat content.
