The Pauli Exclusion Principle
You may have heard that matter is 99.999% empty space. If that is the case, why doesn’t matter go through other matter? There are two pieces to the answer: the first one is the electrical repulsion between electrons; the second is something called the Pauli exclusion principle.
Fermions have quite a remarkable property: no two of them can be in the same quantum state. What does that mean? Every particle in the universe is described by a set of numbers that specify its state. Some of these numbers are its energy, its momentum or its position. There are also other things like spin, which tells us the way the particle is spinning. What the Pauli exclusion principle tells us is that no two particles can have exactly the same numbers.
For example, in atoms electrons move in “orbits” around the nucleus. I say “orbits”, but electrons are really spread around a certain location we call an “orbital” and only have a definite position when we measure it. Let’s stick to orbits for now. It turns out that only some orbits are allowed: let’s call them 1, 2, 3, etc, going from less to more energy. Now just like people, electrons want to be in the state of least possible energy, so they will tend to want to be in the first orbital.
Let’s say we have three electrons. Our first electron chooses first and goes to the first orbital, because it has the least energy. The second one also wants to be there: can it? According to Pauli’s exclusion principle, it can if at least one of the numbers that describes it is different. If it stays in the same orbit, the energy will be the same: however, the electron can still have a different spin, so we can fit it in the first orbital.
Now, the third electron has a problem, because if it were in the first orbital it would have an identical state to one of the two electrons. Therefore, it cannot stay there and has to go to the second orbital. This is what causes atoms to have different sizes: otherwise all electrons would just be in the least-energy orbital!
This is what happens to our charm quark up there: being a fermion, it cannot be in the same state as its friend. So, even though it would love the steak, it has to settle for salad. Sucks being a quark.
Now, once all electrons are happy in their orbits, the atom has some decent size. If I put it next to another atom, the electrons in the outer orbitals will repel each other and the atoms will not be able to touch. This is what prevents matter from going through other matter. First, the Pauli exclusion principle gives atoms sufficient size; then, the electric repulsion does the rest.
Does This Work for Bosons?
No, it does not. As explained here, bosons have no problem occupying the same state, which makes them capable of going right through each other. In fact, you can have as many bosons as you want in the lowest energy state. This is the basis for Bose-Einstein condensates.
Why does this happen?
Honestly? We don’t have a clue. The usual, technical answer is something akin to “the wave-function of a group of fermions has to be anti-symmetrical” or “the creation-annihilation operators must follow certain anticommutation relations.” Now, this probably sounds like Chinese to you as it refers to the mathematical structure of a quantum theory. However, even though either of the two conditions above are equivalent to the Pauli exclusion principle, both have to be introduced without justification: that is, we add them because they work. A theory with these properties gives the right experimental results. That’s it. Why does nature behave this way? Nobody has a clue.
If this seems unsatisfactory to you, bear in mind that we have exactly the same problem with the speed of light. You know that the speed of light has to be the same for every observer; but why? Again, we don’t know. The constancy of the speed of light was introduced by Einstein as one of the two postulates of his theory. A postulate is a statement that you give without proof: its ultimate justification is that it agrees with experiment. We know that the speed of light is constant because we’ve measured it many, many times and always got the same answer. Could the universe be different? Most certainly. But it isn’t.
Maybe in the future we will find a deeper theory that explains both of these things. But this theory, by definition, will also have unjustified assumptions. This is the nature of science: we look for the theory with the minimum number of assumptions, but we cannot have one without any.