Here's what I know about dark matter: Astrophysicists realized the movements of galaxies and other astronomical bodies cannot be explained by the gravitational effects of matter known to be there, so either there is a lot of matter missing that doesn't react with light or general relativity needs to be fixed. For the purpose of this question, assume the former. I've read that this "dark matter" can't be composed of baryons (quarks and leptons). My question is how do we know that it can't be baryonic? After all, air is invisible. Maybe that's a bad analogy, but you get my point: Why can't there be matter that is invisible, yet composed of baryons?
2 Answers
I can't find an entry level article on the subject, but the baryon density affects the relative proportions of the light nuclei formed. Have a look at this graph from this article:

This shows the calculated abundances of the light nuclei formed in Big Bang Nucleosynthesis as a function of the current baryon density. The thin horizontal lines show the measured abundances while the vertical grey line is the measured (from CMB measurements) value of $\Omega_B$. Note that the calculated curves all intersect the measured abundances at the grey line.
So if our model for Big Bang Nucleosynthesis is correct then the current baryon density must be limited. To confuse matters the graph shows $\Omega$ multiplied by $h^2$, where $h$ is a rescaled value of the current Hubble constant ($h \approx 0.7$). If we divide by $h^2$ we find the baryon density is about 5%. Since all matter, baryonic + dark, makes up about 25% of the critical density the dark matter cannot be baryonic.
- 367,598
Here are two recent review articles on the topic, on the subject of dark matter itself and the broader subject of the cosmological parameters.
The short story is that we have good evidence that the Universe is flat. The main evidence for flatness is anthropic: we are still here to observe the universe some ~14 Gyr after the Big Bang. A "closed" universe, with negative curvature, will eventually stop expanding and collapse back in on itself, while an "open" universe, with positive curvature, will expand eternally. Usually the curvature of the universe is related to its energy density $Ω$, with units chosen so that $Ω=1$ is the "critical density" for a flat universe. The thing is that flatness is an unstable equilibrium, like a pencil balanced on its tip: any deviation from flatness will be magnified as time goes on. The simple fact that the universe has not already collapsed and does not already appear empty means that it's approximately flat; run the clock backwards and you find that during the era of nucleosynthesis, in the first minutes after the Big Bang, you had to have something like $|Ω-1| \lesssim 10^{-55}$. So it stands to reason that some symmetry which we don't understand makes the Universe exactly flat, and it started off that way and is still that way. We know the total energy density of the Universe: it's $Ω=1$.
(This argument gets a little more complicated if you allow for the fact that "dark energy" is actually causing the expansion of the Universe to accelerate over time. However dark energy was less important than matter until about 5 Gyr ago, and the Universe appeared to be flat then, too. There are other arguments; see the review articles at the top if you want more.)
Now we also know the average density of baryons in the Universe. This is because in the first few minutes after the Big Bang, all of the excited, unstable baryons decayed into protons and neutrons, and the protons and neutrons formed into a fairly small number of isotopes: about 90% hydrogen and 10% helium (by number; 25% helium by mass) with part-per-million traces of deuterium and helium-3 and part-per-billion traces of lithium-7. It turns out that the fractions of those isotopes you get from Big Bang nucleosynthesis depends pretty much exclusively on the ratio of baryons to photons, and to get the concentrations that we see in our Universe you had to have about 0.6 baryons per billion photons. Those are the same population of photons that we still see in the coldest darkest parts of the sky as the cosmic microwave background, stretched to radio frequencies by the Hubble expansion. We can measure how bright this CMB is, and that tells us its energy density; that tells us how many protons and neutrons to expect, on average, per unit volume of space. It turns out to be $Ω_\text{baryons}\approx \frac1{20}$, which is pretty poor agreement with $Ω_\text{total}=1$ that we decided had to be the case since we are not all dead.
The third bit of evidence comes from the supernova-based measurements of the Hubble constant. That lets us measure what the rate of expansion used to be in the past. It turns out, as I mentioned already, that the rate of expansion is actually faster now than it was in the past. This is something that's not allowed in a model of the universe that has only matter, radiation, and gravity: matter and radiation are always attracted to each other, and so even in an open universe you would expect the cosmic expansion to slow down as time moved on. The best fit to the data has $Ω_\text{matter}\approx \frac13$, a pretty poor fit both our $Ω_\text{total}=1$ and also to our $Ω_\text{baryons}\approx \frac1{20}$.
These observations only show convincingly that there's a problem with the perfectly sensible hypothesis that the Universe is mostly made of matter and radiation in empty space. The fourth and strongest line of evidence comes from the small anisotropies in the cosmic microwave background. The CMB isn't exactly the same temperature everywhere you look: some places it's a few hundred millikelvin warmer than the average, and some places a few hundred millikelvin cooler. (It's still quite uniform: the variations don't start until the fourth decimal place of the 2.73 K temperature.) It turns out that there's an enormous wealth of information in the shape of those anisotropies. The fact that the biggest variations tend to be about 1º across tells us about sound waves in the baryon-photon fluid, which is another probe for flatness. The more fine-grained fluctuations, the 0.5º "details" on the 1º "features", have variations only about half as big as the largest features; this ratio of amplitudes is an independent measure of the baryon density. The upshot is a robust and well-accepted claim that the energy density of the Universe today is approximately \begin{align} \Omega_\text{radiation} &= \text{very small} \\ \Omega_\text{baryons} &= 0.05 \\ \Omega_\text{other matter} &= 0.25 \\ \Omega_\text{wtf} &= 0.70 \\ \hline \Omega_\text{total} &= 1.00 \end{align}
Note that none of this evidence gives any hint of what the dark matter and dark energy are, just that they must be present for us to describe cosmic evolution. (There's actually lots of evidence of what it's not. For instance, the dark matter can't be relativistic neutrinos, and it also can't be massive, nonrelativistic neutrinos, for reasons which I think are buried in some of my other links.) The astronomical evidence that galaxies contain "much more" dark matter than visible matter was present first, but the cosmological arguments for non-baryonic dark matter seem to be more quantitative at present.
- 96,301