I recently discovered Mark Dominus' blog, which I subsequently lost spent a whole evening reading. It has lots of good stuff on physics, maths and history in addition to some more traditional techie fare. One of his earlier posts asked the question: how can solid and liquid materials be transparent? I think I know the answer.

First of all, it's worth explaining why this isn't a stupid question. You might think that glass is transparent because photons pass through it unimpeded. That this isn't true is demonstrated by the phenomenon of refraction, which you can experience by putting your foot in a bath of water and noticing that it looks closer to the surface of the water than it is. This shows that photons are interacting with water molecules rather than just passing through.

It turns out that we can explain this behaviour very easily if we treat light as if it were waves rather than particles. For example, sea waves can get refracted as they move towards the beach without losing their coherence. This refraction as waves encounter the slower medium of shallow water explains why waves always hit a beach head-on, whatever direction they're travelling at sea.

Of course we know that light isn't made of waves - it's made of photons. But sometimes it behaves like a wave, and sometimes like particles. This strange duality was inexplicable until the advent of quantum mechanics. Indeed it's only with the formulation of quantum electrodynamics (QED), a theory which treats electromagnetic quantum mechanical interactions in a way that is compatible with special relativity, that we have a way of explaining things like transparency fully. The best introduction to QED that I know is Richard Feynman's book, and as luck would have it, almost the first half of the book deals exactly with the problem of how light interacts with matter.

The reason why photons behave like waves under certain circumstances is due to a fundamentally mind-bending fact about quantum mechanics. This is that a particle, let's call her Erina, in travelling from A to B behaves as if she goes through every single possible path between A and B in doing so, and interacts with every single particle she encounters. However when we measure the state of the system (which includes the totality of particles in the system, including the measuring device) at any point, we will discover Erina in one particular place. What quantum mechanics can tell us is the probabilityof Erina ending up in one particular place - but no more than that.

To reiterate: all the possible paths that Erina could take will have an effect on her final position. This is exhibited by the fact that certain paths Erina could take interfere with each other. This is demonstrated by the famous two slit experiment (scoll down to the quantum version of the experiment). The crucial thing to note with the two slit experiment is that even if you send particles through one at a time they'll still display interference patterns as if they were actually a wave.

So the answer to Mark's question, "how can it be that the photon always comes out in the same direction that it went in, even though it was wandering about inside of glass or water, which have random internal structures", is that things are actually a lot more complicated than this. Where the photon ends up depends on the entire configuration of the system it passes through, not just on the interactions it participates in if you assume it travels in a straight line. You have to account for all the possible couplings between the photon and all the atoms it meets along the way (and also, worse still, the possibility that the photon will spontaneously turn into an electron and anti-electron, which then annihilate to create a photon again, et cetera).

However when you consider the actual possible interactions between a photon and the atoms it encounters, things are actually not so bad. Atoms are bound systems, and so there's a finite number of states that the particles that make up an atom can be in. A photon hitting an atom isn't like two billiard balls smashing against each other, due to the huge difference in energy between the photon and the atom. In fact, the most likely interaction by far is that the photon will hit the electron cloud around the atom's nucleus, be absorbed by it hence putting the electron cloud into a slightly more energetic state, and then a tiny fraction of a second later be re-emitted with the same energy and momentum as the original photon as the electron cloud returns to a lower energy state.

Finally much like the two slit experiment, the possible paths that a photon can take through water, glass or air will interfere with each other such that it appears to behaves in a wave-like manner - hence the phenomenon of transparency.

Update (23 April 2009): This fascinating news article describes how a material's transparency is affected by the coupling between photons and the spin of the nucleus of atoms, and how you can use a laser to turn this coupling on and off and hence switch a material from transparent to opaque.