2500 thousand years ago Pythagoras walked by a blacksmith’s workshop and through the clang and din he heard musical notes. More specifically, he heard intervals – perfect fifths, thirds and fourths. Had he been Archimedes, he would have shouted Eureka and bolted through the streets. Instead, he ventured in and committed himself to a study of the objects the blacksmith was striking. From this moment of insight, a mystery of music and mathematics began. It remains unresolved to this day. Are music and mathematics are bound? Is sound the fundamental organising principle of everything that we see around us? Do galaxies twirl into mathematically harmonic shapes? Were the patterns of the nascent universe dictated by the pressure waves of the Big Bang? If so, what gave voice to these ripples? In the beginning, there was the word and the word was… God? Almost every culture on the planet puts breath or voice at the beginning of creationist myths, and now science, with its cosmic Big Bang has done the same. String theory puts vibration at the heart of everything. Cymatics provides vivid macroscopic examples of sound imposing structure on the chaotic swirling of matter. But it all began with a blacksmith and a man with a beard who believed that number and harmony were somehow intimately related and extremely important.

But what was the legacy of his studies of music and mathematics? He is responsible for the blueprints of 12-tone scales that have dominated western music, and are now spreading globally to become the principle means of making music. But the struggle to make these scales function perplexed scientists, musicians and mathematicians for thousands of years. Why? Because they don’t work. The intervals of nature are not compatible with neat, mathematical arrangements of notes. For this reason, you cannot tune a fretted instrument. To understand why, we need to know what he discovered.

Pythagoras found that the frequencies of the most harmonic intervals – those that are most pleasing to the ear – are defined by simple mathematical relationships as follows:

Note C G F E
Ratio 1:1 1:2 2:3 3:4

Here we have the building blocks of mathematics – 1,2,3,4. Struck by the simplicity of his discovery, he went on to suggest that the sweetest musical scales would be composed of intervals that were themselves simple. So he embarked on the construction of the first scales. What is a scale? It’s a sequence of notes that runs through an octave – from a C to a C, or a G to a G etc. Why should there be twelve notes in our palette? Pythagoras was keen on triangles, and is particularly well known for one type of triangle – the ‘3,4,5’ triangle, which has twelve steps:

Who knows if this is the reason there were twelve? The whole story is apocryphal – nobody really knows if Pythagoras was a man or a group. If he was a man, the historians struggle to pin him down and simultaneously refer to him all over the ancient world. He taught in secret. He wrote nothing down. He exists as a story. Regardless of how he came to develop the Pythagorean scale, this is our starting point, and this is how instruments became tuned. But there’s a problem here, and the problem is best understood by taking into the account the circle of fifths. The circle of fifths is the assumption that if you ascend through the notes in intervals of a fifth – C to G, G to D, D to A etc…. you will eventually get back to C – the octave. Not so. These perfect mathematical intervals cannot be bound in anything as tight or neat as a circle.

But what do we mean by ‘perfect’? We mean ‘natural’ – overtones. If you blow a pipe that is tuned to G, you will hear mostly G, but tucked in underneath the fundamental tone, the overtones are also sounding. The most significant of these is usually the fifth. So when you blow a G, there’s some D in there too. If you blow the pipe really hard, you can bring the overtone to dominance and hear mostly D. The interval between this fundamental note and the overtone of the fifth is called the perfect fifth. It’s natural. Virtually every culture on earth has discovered it from nature. It’s there, waiting to be found. And the ratio of the frequencies of the fundamental to the fifth is (as described in the table above): 2:3. Nice small numbers.

So, if we start at C and ascend through these ‘perfect’ intervals, the natural overtones, we should eventually reach another C – if music can be neatly bundled into a mathematical object. But this doesn’t happen. What we get is a note slightly above C. Not a semitone above, but somewhere in between. A fraction of a note too high. What does this mean? We don’t get a circle of notes that spans the octave; we get an infinite spiral of notes that never repeat themselves! Try making a piano keyboard or a guitar out of an infinite set of never-repeating notes! Imagine the strain on your fingers! This error, the overshoot, was known as the Pythagorean Comma, and it baffled everyone for centuries, until Bach’s Well-tempered Clavier came along and people got used to music being out of tune.

The problem for musicians was this: if you tuned an instrument to the key of G, the error in the tuning would be particularly emphatic for certain intervals. A variety of methods were employed that focussed on making some of the intervals sweet at the expense of some of the others. One particular attempt that focussed on the thirds led to the notorious wolf tones – they howled whenever you used them. Clearly not good enough. But the problem ran deeper. It’s bad enough having howling notes of discord, but what happens if you modulate a piece of music – change the key you’re playing in? The wolf tones stay where they are on the instrument, so the howls come in different places. Changing key from C to A minor and playing similar themes simply couldn’t work.

Eventually, tempered tuning was embraced by classical composers, and made famous (and acceptable) by Bach. In tempered tuning – the tuning we use today – this error is effectively smeared out across the gamut of notes. The natural harmony of every interval is compromised for the sake of flexibility and practicality. Now you can change tune as often as you like and reproduce exactly the same melodies or pleasing variations thereof. Guitars only need one pair of hands. Pianos can accommodate plenty of octaves.

Going back to the mathematical model, what have we done? We’ve taken the natural spiral and squished it into a perfect circle. We’ve sacrificed the mathematical simplicity of the intervals for the bigger picture of a more usable system. How did people react when this revolution happened? Some decried it. The root of the word ‘mode’ in music is the same as that of the word ‘mood’. Before tempering, it was believed that the modes (think: scales) all had different colours and timbres. The key of C was believed to be the key of the God, too pure for human composers to dabble with. Some modes were banned in ancient Greece for encouraging base qualities and bad behaviour. Others were prescribed for bouts of melancholy or despair. When tempering came along, effectively making all the scales identical in mathematical terms, there was a backlash. But the freedom it gave to musicians and the revolution in music it facilitated overcame the objections. And rightly so - the last few hundred years of dizzying musical innovations would never have happened without it.

So, all of our music is out of tune. The natural spiral has been bound. If your ears are exceptional, you will never be able to tune all of your guitar strings perfectly in unison with one another. Why? Because you’re struggling against an inherent error in the instrument. Tune a G chord to sound sweet, and your E will sound a little off. It can’t be tuned to perfection. Live with it. Why? Because it isn’t all bad. Music for pleasure is about discord as much as it is about harmony. It’s about going on a journey away from harmony and finding your way back. It’s about cadence. And besides, what else in life is perfect?