# Maths and Music

You might think that maths and music are a million miles away from one another. Music is considered a very creative subject, full of emotion and feeling – a piece of music can be interpreted in different ways by different people and although there are rules, they can be bent from time-to-time. Maths on the other hand….well….it just doesn’t have the same reputation. The strict rules surrounding the subject can often leave people with a cold feeling when it comes to maths. It’s difficult to imagine someone choosing to read a good proof in their free time rather than listen to a good piece of music (although some proofs are very exciting to read, I promise). But, somewhat surprisingly, maths and music are more closely related than first impressions might suggest.

Musicians use sounds produced by different instruments to create music – and on the other side of the coin, mathematics can describe in very precise way how those sounds interact. Musicians don’t necessarily need to understand the mathematics to produce amazing pieces of music and the mathematician may be completely tone-deaf but still be able to go into great detail about how sound waves combine in different ways.

I am going to try and explain from the perspective of a mathematician/non-musician how different musical notes combine and why some combinations sound pleasant and others dissonant.

This graph is of what you hear when a pure note is played – this example is an A of frequency 110Hz.

Graph of a pure A-110Hz note

If you multiply the frequency of this note by 1.5 you get the frequency of another note which is an E of frequency 165Hz. The melodic interval that you hear when you play the A followed by the E is called a perfect-fifth. If both of these are played at the same time then you hear the harmonic interval of a perfect-fifth. The waveform of a harmonic perfect-fifth interval looks like this.

Graph of the waveform of a perfect-fifth

Again starting with the A at 110Hz, multiplying the frequency this time by 1.25 we get another note, C# with frequency 137.5Hz. The A followed by the C# is called a melodic major-third and played together they would be a harmonic major-third. The three notes A, C# and E with frequencies110Hz, 137.5Hz and 165Hz played together make an A major chord and the waveform looks like this.

A graph of the waveform of a major chord

Similarly if you multiply the frequency 110Hz by 1.2 you get a frequency of 132Hz – this is a C and if instead you play the notes A, C and E together, the chord is a minor chord which has a waveform that looks as in the graph below. Notice that the waveform is not quite as regularly repeating as for the major chord – the level of irregularity of the wave is what makes something sound dissonant.

A graph of the waveform of a minor chord

So using mathematics we can now “see” what the music and the chords looks like. These are really simple examples – notes produced by musical instruments are not typically perfect sine-waves but this is a starting point to a scientific analysis of music. An example that I really like is to take the A at 110Hz and another note at 112Hz (which is a bit higher frequency than an A but lower frequency than an A#) and have a look at the graph.

If you were to play these two notes together you would hear a regular beating effect – this is the waveform of the two when played together. The beating effect that you would hear are clearly visible on the graph – I have extended the horizontal time-axis to 2 seconds to make the beats more noticeable.

Beating effect of notes of slightly different frequencies

Notes can be derived from other notes in a variety of ways – the way that I have used here uses particular ratios of small whole numbers to get from one note to another called just intonation. Another way is to use powers of 12th roots of 2 called twelve-tone equal temperament, and it doesn’t have to be limited to twelve notes. As a non-musician I’m finding this music theory very interesting…I’ll be coming back to this again very soon I expect.