Hacker News new | ask | show | jobs
by ajkjk 542 days ago
Just for fun...

They are relatively easy to understand if you already understand Fourier transforms.

In a Fourier transform you can write some (suitably well-behaved) function f(x) as a sum of a bunch of sinusoids of different frequencies:

f(x) = a_0 + a_1 cos(x) + a_2 cos(2x) + ... + b_1 sin(x) + b_2 sin(2x) + ...

Or more generally a sum over all real values, f(x) = ∫ a(k) cos(kx) + b(k) sin(kx) dk, since signals can have fractional frequencies.

And in many cases the two sides are the same. Many operations in math and in ph operate on functions in such a way that they can distribute over their behavior on different frequencies, which is why Fourier transforms are really useful. For instance we hear different frequencies in different ways so if you Fourier-transform an audio waveform you can turn some frequencies up and others down (or drop them entirely, which is more-or-less what mp3 compression is).

This also works in 2d or 3d, where now you have frequencies in all three directions:

f(x,y,z) = f(0) + a_(100) cos(x) + a_(110) cos(x) cos(y) + a_(111) cos(x) cos(y) cos(z) + (all the sine terms and negative frequencies and everything else)

and this is useful in all kinds of ways also, e.g. taking Fourier transforms of a 2d image and then dropping the high frequency components that are hard to see is basically what JPEG compression is. As before it helps a lot that you can interact with the different frequency components separately.

But. Sometimes what you want is not the frequency in linear space (e.g. the frequency in x or y) but the frequency in angular coordinates: to ask "how many times does this variable change as you go around a circle in the (xy) plane?" Which is to say, you want to know the Fourier component in term like cos(ϕ), cos(2ϕ), sin(ϕ), etc. That looks like

f(x,y) = a_1 cos(ϕ) + a_2 cos(2ϕ) + b_1 sin(ϕ) + ...

Which is what we would call a "circular harmonic" (with ϕ=ϕ(x,y)=arctan(y/x)), each coefficient a_i is a function of (r). Unlike the linear Fourier transform, there can be no "fractional" frequencies---since ϕ=0 and ϕ=2pi are the same point, all the circular frequencies have to be integers.

When you try to do this in 3d using two angular coordinates ϕ and θ, it gets a lot funkier. Now you can't really write it as a simple series of the two frequencies separately; they kinda "step on each other", because a rotation in (xy) can be written as a sum of rotations in (yz) and (zx).

But you can do it in terms of a different, slightly stranger series. One variable L=0,1,2,3... will describe the "total" frequency on any plane, and another variable m=-L,-L+1,...0,...L-1,L describes how many rotations happen in your favorite choice of (xy) plane. m is allowed to range from -L to L because we have already said that L is the total frequency on any axis, so we just have to say whether they're happening in our chosen axis or not. So the series becomes

f(x,y,z) = a_(0, 0) + a_(1,-1) Y_(1,-1) + a_(1,0) Y_(1,0) + a_(1,1) Y_(1,1) + a_(2,-2) Y_(2,-2) + ... = ∑ a_(L,m) Y_(L,m) (θ,ϕ)

The functions Y_(L,m) (θ,ϕ) are the "spherical harmonics". They serve the role of sin(ωx) and cos(ωx) when you Fourier-expand a function in terms of spherical coordinates ϕ and θ.

There are lots of reasons that that's useful, but the case that is most well-known is that the state of an electron wave function in an atom can be indexed in terms of which spherical harmonic it's in, and only two electrons are allowed to be in each one (one spin up and one spin down, for much-more-bizarre reasons). So the spherical harmonic functions are also the shape of the various electron orbitals that you see in a chemistry textbook.

2 comments

Excellent explanation.

> So the spherical harmonic functions are also the shape of the various electron orbitals that you see in a chemistry textbook.

Minor nitpick: Chemistry textbooks usually use the “cubic harmonics” instead of the “spherical harmonics”. They are real-valued linear combinations of the standard spherical harmonics, with the additional benefit that the basis set respects the Cartesian symmetries.

For example, the “p_z orbital” is a l=1 spherical harmonic and a cubic harmonic. But the cubic harmonics then add p_x and p_y orbitals as basis functions, whereas the spherical harmonics choose the chiral "p_x ± ip_y orbitals” as its basis instead.

Oh thanks, I didn't know that (I studied physics and only know the chemistry part superficially). But I did know, and wondered about, the fact that the spherical harmonics have an e^imϕ factor yet there's nothing about the explanation that involves complex numbers per se (besides that writing out sine/cosine series is way more tedious than exponentials). Makes sense that they just get factored.
Thank you, this made it click for me.