— 2017 — Oct 22

Music and an Accident of Mathematics

by Anton Schwartz

Did you know that much of what we understand as music rests on a big mathematical coincidence? Namely, that two to the \frac{7}{12} power is approximately equal to 1.5.

    {\Large\[2^\frac{7}{12} \approx 1.5\]}

If you’ll stick with me for a minute I’ll show you what I mean.

Consider these two basic facts of music:

  1. The circle of fifths tells us that if we start on a note and move up or down a fifth 12 times, we get back to the same note we started on (though in a different octave).
  2. The two most fundamental intervals in music are the octave and the fifth. The frequencies of two notes an octave apart have a ratio of 2:1. For a perfect fifth, the ratio is 3:2.

The problem is… (1) and (2) can’t both be correct. We have to choose!
Let’s see why that is.

Almost all of the #music we listen to relies on a crazy #coincidence of #math. Click To Tweet

The A string on a bass has a frequency of 55 Hz, or 55 vibrations per second. (The unit of frequency, hertz, abbreviated Hz, means vibrations per second.) When we multiply 55 by 1.5, what we get is the frequency of the note (E) a fifth higher—namely, 82.5 Hz. We can get the frequency of B by going up another fifth from E: it has a frequence of 123.75 Hz because 123.75 = 82.5 × 1.5 = 55 × 1.5 × 1.5. If we continue to generate all the notes by going up in fifths twelve times, we arrive again at A:

A → E → B → F# → Db → Ab → Eb → Bb → F → C → G → D → A

The frequency of this high A, 7 octaves above the original one, is 55 Hz multiplied by 1.5 twelve times, which is to say 55 \times1.5^{12} or 7136 Hz.

Since this A is seven octaves above the low A (55 Hz) we started with, we could have found its frequency by just doubling 55 seven times. After all, moving up an octave just doubles a note’s frequency, right?

By that reasoning the frequency of that high A is 55 \times 2^7, which is to say 7040 Hz.

That’s close to 7136 Hz but not the same. The two pitches differ by 23.45 cents, or approximately a quarter of a half-step.

Listen to what I’m talking about. Here’s an example of a starting note (middle C), followed by G, D, A… going around the circle of fifths and finally arriving back at C. In each case the next note is a fifth higher, 1.5 times the frequency of the previous one. (Sometimes we lower it an octave so it stays in the same general range.) We keep the original C playing underneath. Listen to the sequence and the final C that it arrives at. And notice how out of tune it sounds with the original C:

Moving around the Circle of Fifths: Intonation Diverges

What you’re hearing is the 23.45 cent difference that’s accumulated over the course of the journey around the circle of fifths.

What’s up with that?!?

The Problem

The inescapable bad news is that our notion of an octave—the most basic interval, found throughout nature and representing a 2:1 ratio of frequencies—and our notion of a perfect fifth—the second most basic interval, also found throughout nature and representing a 3:2 ratio of frequencies—are incompatible with the very notion of the circle of fifths—the notion that moving up a fifth twelve times should move us up seven octaves from the original note.

But the good news is that they’re close enough that we can “fudge it” and never even worry about the difference. (Almost never, anyhow. It does cause subtile problems in situations where musicians do tune their fifths to a 3:2 ratio, such as a choir in a church.)

The Solution: Equal Temperament

The solution is to redefine the perfect fifth so that it is compatible with the octave. Instead of using the 3:2 ratio, we divide up an octave into twelve equal half steps and define a fifth to be equal to seven of those half steps. In other words, every half step interval represents a pitch ratio of \sqrt[12]{2}, i.e., 2^\frac{1}{12} — we design it that way so that twelve half steps together yield a ratio of 2^\frac{1}{12}\times 2^\frac{1}{12} \times\dots\times 2^\frac{1}{12} multiplied by itself 12 times, or \left(2^\frac{1}{12}\right)^{12}, which is equal to 2^\frac{12}{12} or, simply, 2. Thus twelve half steps make up an octave. We call this solution the Equal Temperament tuning system. In it, the perfect fifth, which is made up of seven half steps, has a ratio of 2^\frac{1}{12} multiplied by itself seven times, which is to say \left(2^\frac{1}{12}}\right)^7 or 2^\frac{7}{12}. Which equals 1.4983. That’s not 1.5 but it’s pretty darn close.

Listen to the difference. Here’s a “just” perfect fifth interval—two notes with a frequency ratio of 1.5:

Just Perfect Fifth Interval (3:2 Frequency Ratio)

And now listen to the same interval played with equal temperament, so that the frequency ratio is 1.4983:

Equal Tempered Fifth Interval (1.4983 Frequency Ratio)

Can you tell the difference? Most people don’t notice it. The telltale sign is the “beats” present in the equal-tempered version that are absent in the other one. Those are the pulsations in the sound—in this case, a bit more than one per second—caused by the misalignment of the lower and the higher pitched waves. A 3:2 ratio means that the higher pitch vibrates three times in the same amount of time that the lower pitch vibrates twice… so every other time the lower pitch vibrates, the two waves align. But with equal temperament, the alignment is not perfect. Like windshield wipers that are almost, but not quite in sync with the beat of the music that’s playing on the radio—or two metronomes keeping slightly different time—they are in and out of sync, periodically meeting up.

The effect is more pronounced when you listen to the equal tempered fifth sounded against the just tempered fifth:

Just and Equal Tempered Fifths Together

The Upshot

For all practical purposes, the adoption of Equal Temperament has put an end to the issue of systems of tuning in western music. Alternate tuning systems are still in use, and are discussed at great length in academia, but rarely, if ever, appear in the music listened to by the vast majority of people.

But if you’re interested…

Still, tuning systems are a fascinating subject. For instance, it turns out that the octave and the perfect fifth are not the only intervals to correspond to simple ratios of whole numbers. Rather, all of our western intervals can be expressed that way. Some more simply than others. (For example, the major third, as it appears in nature, represents a 5:4 ratio, whereas the tritone is 45:32.) Not only are these intervals incompatible with equal temperament, they are also incompatible with each other and the circle of fifths.

Major Thirds

For instance, let’s look at the major third. The simplest formulation of the major third, called the just major third is taken from the fifth member of the overtone series, and represents a \frac{5}{4} frequency ratio. But conventional harmony tells us that we ought to be able to derive the ratio of a major third by going up a fifth four times and down an octave twice. If the ratio of a fifth is \frac{3}{2} then that means the ratio of a major third ought to be \frac{81}{16}\times\frac{1}{4}  or  \frac{81}{64}. This is called the ditone or Pythagorean major third, and it’s different from the just major third because \frac{5}{4} is equal to \frac{80}{64}, not \frac{81}{64}. Listen to a just major third:

Just Major Third Interval (5:4 Frequency Ratio)

And now a Pythagorean major third:

Phythagorean Major Third Interval (81:64 Frequency Ratio)

Can you hear the difference? The pitch discrepancy is especially noticeable when you hear the two major thirds together:

Just & Phythagorean Major Thirds

Both these major thirds are different from the equal-tempered major third which we are used to hearing from our instruments, though the Pythagorean third is closer to equal temperament: It is only 8 cents above the equal tempered major third, whereas the just third is 14 cents below. Here is the equal tempered major third:

The difference between the just and Pythagorean major thirds—a ratio of 81/80 or about 21.5 cents—has a name: the syntonic comma. (The gap in pitch between two variants of a given note is called a comma.)

Here’s one last example of incompatibility, this time between the just major third (5:4) and the octave (2:1): Three stacked major thirds should add up to an octave, right? That’s what our music theory tells us. But in fact three just major thirds combined yield (\frac{5}{4})^3 or \frac{125}{64}, which is 1.953, not 2 (which equals \frac{128}{64}). This comma has a name too: the diesis. It amounts to about 41 cents, which is super easy to hear:

The Diesis: Stacking Just Tempered Major Thirds

Epilogue: What is a coincidence, anyhow?

There are thousands upon thousands of books and articles written about tuning systems, in much, much more detail than I’ve touched on here. What surprises me so much is that every one I’ve seen “buries the lead.” For me, the most gripping part of the story is the obscure mathematical fact that lies at the heart of all of the music I listen to. There’s no shortages of “coincidences” in math. For instance, there’s a sequence of six 9’s in a row within the first 800 digits of π. What makes 2^\frac{7}{12} \approx 1.5 so different is that it has consequences. HUGE consequences. We think of music as not a random construct of society but something much bigger, many would say an essential part of the universe. How can it rely on a two things being not-quite-equal-but-really-close? Doesn’t that make all of music a coincidence?

Maybe the answer is that music is the same kind of coincidence as carbon based life on Earth. Life as we know it depends heavily on various properties of chemistry in conjunction with specific conditions on Earth. As far as I know, those properties and conditions have no special significance apart from the fact that they give rise to life… much the same way 2^\frac{7}{12} \approx 1.5 is of no particular importance except as far as music is concerned. In which case, music may be a coincidence, but it is no more of a coincidence than life itself.

Me, I suppose I’ll settle for that, for now.

As always, I welcome your thoughts!

Related Post:

Almost all of the #music we listen to relies on a crazy #coincidence of #math. Click To Tweet

UPDATED March 3, 2018: added audio examples of major thirds.

27 Responses

  1. Peter Persoff says:

    In my circle of musical acquaintances (traditional Irish music mostly but also concertina afficionados who are interested in various ways of tuning) I’m about the only one who cares about this. Thank you for the audio samples — I was thinking of making my own audio samples and now I don’t have to. I would also like to hear the other comparisons between the major thirds.

    • Yes – how to tune the fiddle strings! Interestingly, the fifth, and its inverse the fourth, of all the equal tempered intervals, are the ones that are most accurate to their just tempered, integer ratio, counterpart. (Good thing too, because they’re the ones with the simplest ratios, which I’m guessing would mean that inaccuracies would be easier to hear for them than the rest.) I’ll try to add audio comparison of major thirds when I have a moment. Good idea, though I wonder how many people make it that far down into the post. :)

  2. Brett Gaines says:

    Thanks for the post. I read the whole thing then took about a 45 minute excursion through Wikipedia and the web to learn more about equal temperament as applied to the guitar and tuning. Among other things, I now have a better appreciation for why major-third intervals between the 2nd and 3rd strings on a properly tuned guitar have nearly driven me to drink for decades.

    • Yes, Brett, I have no idea how one would go about tuning a guitar (with equal-tempered frets) with harmonics (that obey just temperament)! Is that an argument for tuning using fully fretted notes and going equal temperament all the way?

      • Brett Gaines says:

        Anton, this article I found on my sojourn on the subject of guitar fretboard and equal temperament says it well, I think. It also explains why that major third interval between the 2nd and 3rd strings drives me nuts when the guitar is perfectly in tune. It’s 14 cents sharp! The article goes on to discuss various “do” and “don’t” tuning methods, with correct methods using both fretted notes and harmonics. Or, just use an electronic tuner like I do. :-)


        “Equal temperament is the ultimate compromise. Tonal purity is sacrificed for ease of modulation. Depending on your viewpoint, equal temperament either a) makes every key equally in tune, or b) makes every key equally out of tune… The idea is to make it possible to play all intervals and chords, in all keys, with the same relative accuracy. Although every key is very slightly out of tune, every key is also useable. No key sounds worse than any other key. The same applies to all chords. Theoretically, that is. In practise certain intervals and chords can still sound dissonant. Thirds are especially troublesome, as the even-tempered minor third is 16 cents flat to the “pure” minor third and the even-tempered major third is 14 cents sharp of pure. The equal-tempered major sixth is 16 cents sharp of just, and the equal tempered major seventh is 12 cents sharp of just. The only interval which is identical in the two scales is the octave.”

  3. Susan Dahlseide says:

    Thanks for posting. I’m teaching piano and working in the math as I go along with my students. They’re really interested in the why’s and how’s. I can see this as a very useful tool, even its basic paradigm shift. Another way to reach the student is always welcome.

  4. Cameron says:

    I have a masters degree on music theory and this is quite possibly the dumbest thing I have ever read.

    • Keith Herbert says:

      Which part do you dispute?

    • Oran says:

      And written. ;-)

  5. Keith Herbert says:

    Jacob Collier is one of the few people I’ve encountered who can actually use these anomalies in his compositions.
    Check out his song My Hideaway (youtube). He starts in one intonation and adjusts upward at the chorus based on the major third discrepancy.
    In some of his discussions he sings a major third with the keyboard and then plays the third on the keyboard to show the difference.
    He also sings microtonal intervals which to me challenges equal temperament even further.

    • Thanks, Keith. I’ve heard Jacob has a lot to say about music theory – I look forward to checking it out since he’s a deep musician!

  6. Equal-Temperament changed everything. It used to be (before we adopted it completely) that when you modulated, the new key sounded slightly out of tune, so you actually HAD to go back to the old key (and also only ending on a triad sounded right.) Now we can modulate to where ever we want and there is no need to ever go back. Also, we can play something other than a triad and it can function as the “tonic” chord or ending chord, etc. Actually in Jazz, “common-practice” tonality, i.e. V-I (if used at all), is only referential at best. You may be surprised that even Beethoven was not writing for equal-temperament, so the way we hear his pieces now are not how he did (and no, Bach was not equal-temperament either, that was “well-temperament” something different.) Actually they knew about Equal-Temperament in the Renaissance, but never used it, because everyone thought it sounded “bland” and ruined the subtleties.

    • Great points you make, Michael. Especially the way non-equal temperament systems give an elastic pull toward a piece’s tonal center that is absent in jazz and the rest of today’s music. Though I don’t agree that common practice tonality is not a major ingredient in jazz.

      Yes, I think (hope) that most serious musicians are aware that much of the great classical must was written before equal temperament. Just because I coldly state that almost all of the music society listens to is played in 12TET, it doesn’t mean that I don’t have a great affection for the other temperaments. The purpose of this piece was really just to marvel at 2^19 ≈ 3^12 and its importance in music.

  7. To be fair… all of WESTERN music depends on this coincidence. There are plenty of music systems that think of intervals differently.

    • I agree completely, Brian. At first I had “western music” but I was dismayed to learn that some people understood that to mean country/western! So I settled on “virtually all of the music we listen to”.

  8. Michael C says:

    Second vote for Keith Herbert’s point above re: Jacob Collier. He is doing incredible things with alternate tunings and microtonality. Check out what he does on the last verse of “In the Bleak Midwinter” where he modulates to a made-up key (G-half-sharp major, I think). The emotional impact is unexpected and astonishing.

    This has been done before, but I think the unique thing about Jacob C. is that he’s using these advanced music concepts in the service of provoking emotional responses in the listener from music that could be characterized as “pop” music (in the sense that it’s not an academic exercise in experimental music).

  9. Cliff says:

    For sax, can you vary the pitch per-note enough to effectively choose the temperament you’re playing in. I recall from playing the flute as a kid that I could adjust flat or sharp by rolling the mouthpiece forward or backward. That would seem like a really difficult skill to use in performance.

    • It’s something we all do naturally – vocalists, wind players, and non-fretted string instruments. You don’t have that option on a piano/keyboard or a fretted instrument. So I’m being a bit disingenuous to say that non-equal temperament is gone from our music, though I’d say few musicians deal with it on any conscious level. On the other hand, so much music these days is examined and manipulated using auto-tune and to my knowledge – someone please correct me if I’m wrong about this – that’s virtually always equal-tempered. So in commercial music, even musicians’ subconscious use of pure intervals is often subverted in post-production.

      • Tom Yeshe says:

        Thank you, Anton, for your beautiful music and fascinating website. I love your extraordinary version of Jobim’s “Wave.”

        A way around post-production subversion of pure intervals is by using Hermode Tuning, an option available in both Apple’s Logic and Steinberg’s Cubase digital audio workstations.

        “The Hermode Tuning, or ‘HMT,’ is a method of dynamically tuning musical instruments. The algorithms of the program are based on the idea of analyzing harmonic structures and retuning the notes in these harmonic structures towards just intonation. However, HMT also keeps the retunings close to equal temperament so that the performance retains compatibility with familiar instruments. Thus HMT is different from other notions of just intonation. It is an elastic system, retuning the frequencies of nearly every new note. But these retuning steps are – by careful design – almost below audibility. The HMT reduces tuning commas to small, nearly inaudible pieces.

        “HMT was created as a result of my own practice in chamber and orchestral music. I still remember that in chamber music about 30% of the audition time had to be applied for controlling the tuning in common near to the ideal of just intonation. In orchestras there was less time for such discussions. Nevertheless – as to my experience – many of the instrumentalists in orchestras try to follow the ideal of just intonation. An orchestra performing music in equal temperament – if ever possible – would sound weak and rough. Indeed, no orchestra performs a continuous perfect intonation. But everyone who has ears to hear will be aware that the ideal of tuning in orchestras is the ideal of just intonation.”
        — Hermode co-developer Werner Mohrlok, in a sixteen-page white paper, “The Hermode Tuning system”: http://extras.springer.com/2005/978-1-85233-797-1/pdf/hermode.pdf

        Hermode Tuning website, with audio comparisons of HMT and equal temperament: http://www.hermode.com/index_en.html

        Salutations to your friend William Allaudin Mathieu, the “badass” Sufi saint of Sebastopol!

  10. Bruce says:

    In my conversations with violinists and players of non fixed-pitch instruments (I’m a guitarist),I’ve learned that to them enharmonics are not identical, so, in orchestral music at least, pitch is not as fixed as we might think. Does anyone know if there is a name for this pitch system?

  11. Jeff Taylor says:

    Loved the article and thank you for publishing it. The book that got me intrigued with the “effect” of being able to think about, hear and vocalize (through chanting against a drone) these musical systems was W.A. Mathieu’s tome “Harmonic Experience: Tonal Harmony from Its Natural Origins to Its Modern Expression”. He has wonderful grids that show all the ratios mentioned in this article and has a great sense of humor in bringing this arcane subject matter to life, as do you, Anton :)


    • “Harmonic Experience” is brilliant and W.A. Mathieu is a badass! I’ve recently made a couple pilgrimages to him—to learn from him and absorb his ideas. He lives up in Sonoma County, north of SF. His ideas are so refreshing, and YES, he’s got great humor.
      Glad you enjoyed this post, Jeff!

  12. Jim Kangas says:

    Love the blog! Here’s another broader question for you. I’m trying to understand voice leading (in a jazz context) more deeply than just on ii-V-I’s. I’ve heard that some (Spud Murphy) have algorithmic approaches for this, which would seem to be a mathematical function of “minimizing motion” or something similar (with tie-breakers). Any insights into this?


    • I haven’t heard of algorithmic approaches to voice leading, but it seems like a natural optimization problem and I bet it’d be pretty easy to come up with an objective function (to minimize) to produce decent results. Making no claims about masterful, artistic results, though, haha! Decent results would have to factor in things like desirable range of the instrument, which is different for different voicings, but even that seems manageable. Let us know if you find anything!

  13. bohne forsberg says:

    Master Anton, I studied, if you want call it that, TUNING THEORY quite late in my music endendevours…. should have made it much, much earlier…. discovering how the sound universe ( the truth ) and our ears ( evolution ) and our instruments ( a man-made expressive beautiful compromise ) … work together… or as one of my students said so succinctly… HOW COME I CAN WHISTLE A SOLO BUT I CAN’T PLAY IT… as efficiently?… lead me to focus on tuning… if you will… gonna keep reading, testing… the TUNING GROUNDWORK and my ear and my instrument… and some math!!!! Love your brain and loquacious presentation!!!!!

    bohne forsberg, bass player

    • Dennis Dougherty says:

      Bohne, Be careful of your use of the word ‘evolution’ for some may think you are talking of macro evolution which is one species giving birth to a new entity or species’ improving themselves over time: Certainly not science! or even history. The human ear was designed so that we could hear what we needed to and this includes being able to be enriched by music and the joy to experience different qualities in different keys. Equal temperament spoils this totally. A sad period in music history for sure (spoiled some great music).

  14. Dennis Dougherty says:

    Brett Gaines and others who believe 12ET has any validity: It was actually a “cop out” by a generation of piano technicians who could not hear and did not understand “the music”. They did, however, want to popularize a new system to stop people from tuning their own pianos and hire them instead.

    Very little of the music “I” listen to is equally tempered but rather “genuinely tuned”. Only instruments with fixed pitches have been mistreated with temperaments. These have, in all cases, failed to be true to the music. The ratios given on this post are somewhat misleading. “A perfect fourth plus a perfect fifth is slightly more than a 2:1 octave…”. A statement over a century old that was given to students by Rudolf Steiner has since proven to be more correct than the ancient Sumerians and later by Pythagoras in Greece of the 2:1 simplified version. I am sure that if I paid Anton all the money I would earn in my lifetime; he could not play a familiar full melody on his saxophone to equal temperament. IT JUST SOUNDS FALSE! And who wants all keys to sound the same anyway? If that is the reason for ET, why would we want to use all keys? (except for amateur singers with a limited range).

    Everyone!: Check out these performances when you get a chance… Pianos NOT tuned to your simplified math ratios as you suggest they should be yet fully “in-tune in all 24 major and minor keys”. MATH should stay out-of-the-way of ART (as should amateurs).


    Dennis Dougherty
    New York

Leave a Reply

Would you like to be notified about future comments?
Or just replies to your comment?

ScaleMate App


ScaleMate is the interactive app for visualizing scales. It shows you scales in ways that make their harmonic qualities apparent, while playing you the sounds you see. Choose from its library of scales or use it as a playground to create on your own.

Average App Store rating:
★ ★ ★ ★ ★  5.0 out of 5

Watch the short video… or visit ScaleMate.app.


Random Roots App


Random Roots is a groundbreaking practice app I've created for players looking to deepen their musicianship and increase the efficiency and effectiveness of their practice. Guaranteed that you've never experienced anything like it.

Average App Store rating:
★ ★ ★ ★ ★  4.8 out of 5  (100+ reviews)

To learn more and download it for free, visit randomroots.app.


Sound is made by vibrating objects, such as a vibrating string. The frequency of a sound is the number of vibrations per second. The higher the pitch, the more vibrations each second. That is, the higher the frequency.