Sunday, 22 January 2012

What is Music?

We hear music all the time, but has it ever crossed your mind how it works? Why do pianos and guitars sound different, and some notes work together particularly well with others?

This might strike some of you as being somewhat irrelevant to this blog, but the connections with Maths and Physics are very deep-rooted; the very bases of sound and harmony are founded on Mathematics, and possibly the very essence of the Universe is founded upon Music.

So, the first question that I’ll answer is what actually makes sound? When we hear sound, what we’re actually hearing are the patterns of air particles hitting our eardrum and different speeds and timings. This is caused by an object vibrating, after being struck, plucked, or blown, as seen in the diagram below. For the purposes of this post, I am going to use strings as an example, as they are the easiest to represent diagrammatically.
Credit to for image.
When the string is pulled back at a, it creates an area of low pressure just below a on this diagram, this is called rarefaction. When the string gets to i though, it has compressed all the air particles below it on the diagram, creating an area of high pressure, which is called compression.
So, a diagram of the position of air particles after a sound has been made would look like this:
Credit to for image.

When graphed against time, the pressure due to a sound wave at any point looks like this.

Credit to for image.
The diagram above is where we get the idea of “sound waves,” it is these repeating patterns that make up sound. Different notes are made by varying the time difference between the compression and rarefaction (changing the length of the wave), and the volume varies depending on how great the pressure difference is between compression and rarefaction (changing the height of the wave).

This all seems fairly simple so far, but if this was all there was to it, everything would sound the same! A guitar and a piano can play the same note with the same volume, which would create an identical sound wave. But how come the same note played on different instruments sounds different? Why do people’s voices sound different?

This is all because of a mathematical series known as the “Harmonic Series,” which is as follows:

Essentially, this series is basically the sum of 1 divided by the integers, where the nth term is 1+12+13+⋯+1n. Unlike some series of this form (e.g. 1+12+14+⋯), it doesn’t tend towards any particular value. Whilst 1+12+14+⋯+12n  gets closer and closer to 2 the higher n is, and eventually equals 2 exactly when n = ∞, the Harmonic Series doesn’t converge on any number. When n = ∞, Hn = ∞ (where Hn means the nth Harmonic number, or simply the nth term of the series). This is what is known as a divergent series.
This is all very well, but what does this have to do with music?

Well, when a string vibrates, it doesn’t just move back and forth like the first diagram shows. The string is actually vibrating in an infinite amount of ways, all simultaneously! The diagram below shows how:

This looks familiar doesn’t it? It doesn’t stop at 17 though, theoretically the pattern continues indefinitely.

An important thing to note here is that the string is actually doing all of the vibrations show in the diagram at the same time, and the sound you are hearing is the sum of all these frequencies. When a note is played on the guitar, for the open B string, it is the first frequency (at the top of the diagram) that you notice the most: it is that that makes the note a B. This is called the fundamental frequency of the note, or just f, and this is what is meant when the ‘frequency’ or ‘pitch’ of a note is used in everyday language, even though we now know that there are actually infinite different frequencies.

The frequencies of the 12, 13 and other vibrations are known as harmonics, or overtones, so the fundamental frequency is known as the 1st harmonic, the 12 vibration as the 2nd harmonic and so on. These harmonics have pitches themselves. Here are the first few:

However, most of the upper harmonics are much quieter than the fundamental. This shows that not all the harmonics are played at an equal volume, indeed it varies greatly. An expression for the sound that we hear then, would be this:

x0(1f) + x1(2f) + x2(3f) + ...
Where f is the fundamental frequency, and xn is a variable.
In other words, we hear all of the overtones (at least all the ones within our hearing range), and they're all at different volumes.

Certain instruments or playing techniques emphasise different harmonics (by having different values of xn), which creates the different tones of instruments. Having a larger body to a guitar may emphasise the 7th harmonic for example, which gives the whole guitar a different sound.

The values of xn don't remain constant though. The expression above only describes the xn values at that particular point, when in reality, the values change, and they change at different rates for different harmonics on different instruments. For example, on a guitar, the 2nd harmonic may take a very long time to 'decay,' or get quieter, but on a violin it may be one of the first to decay.

So, it is a combination of the volumes of the various harmonics, and the rate of change in this volume that gives an electric guitar that twang, that gives a saxophone that mellow tone, and gives a bass that warm sound.

Pythagoras was one of the first to look into the mathematical properties of sound, and only really discovered the first harmonic: the octave. He realised that when you halve the length of a string (thereby doubling the frequency), the note becomes exactly one octave higher. However, it was not until the 14th century and Nicole Oresme that the entirety of the Harmonic Series was discovered.

Recently, String Theory and related theories have stated that the entirety of the universe, all the sub-atomic particles that make up our world are themselves made up of vibrating strings. Michio Kaku explains this in this video:

If String Theory is correct, then harmony is emanating all throughout our universe: the sub-atomic particles are the notes, the atoms and molecules are the melodies, and our entire universe combines into one glorious piece.

Please follow us, @theaftermatter, or email us at We really like hearing your feedback or just talking about the posts or other physics and maths. We hope you enjoyed this post.


Check out our last two posts:
What are the Subatomic Particles? - What are the most basic things that make up everything we see, hear and know?
What is Time? - It is one of the most debated phenomenon of the universe so, what is time? Is time travel possible? Does time even exist?


  1. When I was a Computer Science fresher, back in 1995, I went to an optional lecture course in the physics department titled "The Physics of Music", talking about exactly what you're describing here. As a musician, it was doubly interesting to get to grips with how my instrument actually created its characteristic sound, and how that could vary depending on the input but would still retain a definite timbre.

    The analogy to string theory is a tad overstated though, isn't it? Saying String Theory 'states' anything is a bit strong -- 'state' implies that what is being stated is in fact true, where that isn't clear at all from what I understand of the current state of physics (where String Theory is barely deserving of the term 'theory').

  2. First part is fine but the link with the Harmonic Series is a non sense. I am sorry, the Harmonic Series has nothing to do with acoustic harmony, names in science are sometimes chosen just for fun.
    What you are talking about is related to the Fourier series but if you don't understand maths just forget it.
    The conclusion on string theory is just a joke, right ?

  3. Harmony is 'emanating' all throughout our universe?
    I do not think that word means what you think it means.

    1. This one goes to 11.

  4. Anonymous: the link between Harmonic series and acoustic harmony is not nonsensical at all. The 12 tone system is indeed a weak approximation of the ratios that emerge from the string diagram (instead of using lengths ... 1/2, 1/3, ..., shorten by those lengths for the series 1/2, 2/3, 3/4, 4/5, 5/6, ... 8/9 which are octave,fifth,fourth,majThird,minThird,...wholeTone, etc. The metaphor is particularly apt to handle chords, where summing together these powers of ratios (n/(n+1)), essentially gives recognizable standing wave shapes that serve as landmarks; while imperfect approximations to these intervals give beating where the waves don't stand perfectly still. (If you play around with these ratios which turn out to be sums of small primes like 2^a*3^b*5*c... you will see that it fits well with physical phenomenon like wave cancellation and explains why any equal temperment isn't completely sufficient, why acoustic pianos stretch octaves, etc.) Characterizing particles as various standing wave shapes is a well known analogy that you will encounter from many sources.

    1. no, you don't get a wave form with the harmonic series. you get a number.

    2. Anonymous, there are two different (but closely related) Harmonic Series: the mathematical series you are talking about, and the Harmonic Series that musicians would refer to. The nth term of the mathematical harmonic series is a number, but musically, the nth 'harmonic' is the note formed by multiplying the fundamental frequency by n, or dividing the string length by n. I hope that makes things clearer.

    3. Exactly, two different things. But they are not related at all, that was my point.

    4. This comment has been removed by the author.

  5. Clarifying why I used the inverted ratios (wavelength vs frequency): Pluck a string on its longer length while holding down point 1/2, then point 1/3, 1/4, etc. Frequency is inverse wavelength, so 2/1, 3/2, 4/3, 5/4, 6/5, 7/6, 8/7, 9/8, 10/9, ... The frequencies related to harmonic series. The nut and bridge are in fixed positions, which is what causes these frequencies to be special. Do something like this in spherical space and there are special combinations that make standing waves, etc. How you get from standing wave shapes to particle properties is for physicists who do the math (like MK) to say, but I think the analogy is helpful.

    1. Rob, I insist, you are dishonest. I can't believe you used the word metaphorical, it's maths, believe it or not.
      There may be a straigthforward useless symbolic link between the sequence 1/2, 1/3, ... and acoustic harmony. But the harmonic series is a sum, and it is absurd to sum acoustic frequencies. What happens is we sum trigonometric series with harmonic frequencies.
      sum_k f_k or sum_ 1/f_k is stupid, where as\sum_k a_k cos(2\pi f_k t) is the Fourier serie of a waveform and is a pillar of digital sound processing.
      The 'beating' is explained by simple trigonometric formulas cos a+ cosb= 2cos((a+b)/2)cos((a-b)/2).

  6. x0(1f) + x1(2f) + x2(3f) + ...

    made me laugh you don't know much do you ?

  7. remove this article it is stupid

  8. [Playfully] . . . here's an AV for 'stringularity'

    Touch Look & Play for harmonic-series - [for what this maths looks & sounds like].