 In modern mathematics, we usually introduce irrational magnitudes in the context of either algebra or geometry. We might make the observation that the square root of 2 cannot be expressed as the ratio of whole numbers. Or we might say things like the ratio between the diagonal of a square and its side cannot be expressed as a ratio of whole numbers. But it's possible the Pythagoreans discovered them through an entirely different root. And that has to do with music. Musicians know that two notes, when played together, might be discordant or cacophonous. They'd clash when you sound them together, like these notes. Or they might be consonant or euphonious. They'd go well together, like these notes. According to well-documented legend, which is to say a lot of people tell the story, Pythagoras was walking by a smithy one day. Now, for those of you who don't live near historical reenactment sites, a smithy is a place where blacksmiths take hot metal and they pound it into various useful objects, horseshoes, nails, and various other items. And there's a lot of quacking pieces of metal with metal hands. Now, a normal person might not like to hang around listening to the sound of this anvil chorus, but Pythagoras was not a normal person. He was a mathematician. And he noticed that the sounds of the hammers on the anvils sometimes sounded euphonious and sometimes sounded cacophonous. And he went up to the blacksmiths and said, Do you mind if I interrupt you in the middle of your work? And the blacksmiths were completely obliging. And upon investigation, Pythagoras found that the smith's hammers had a weight ratio of 1 to 2 to 3 to 4. Now, there are so many improbabilities in this story that it's likely that this is a complete fabrication. Somewhat more reliable is the claim that Pythagoras invented the first scientific instrument, the monocord. The monocord is a single stringed instrument with a movable bridge. By moving the bridge, the string can be divided into two parts with any given ratio, and the two parts can be plucked to produce two notes. Here's some instructions for making a monocord. Since the two parts have the same string under the same tension, the only difference is the length. And so any difference in the notes is attributable to the length alone. And while it's not really important for our discussion, it is worth noting the shorter string will produce the higher-pitched note. And so Pythagoras discovered that some length ratios produced euphony, the consonant ratios. So if both parts, if both strings had the same length, that's a ratio of 1 to 1. That was euphonious. That shouldn't be too surprising. The strings have the same length, so they produce the same sound. Another consonant ratio occurred if one part was twice as long as the other, or if the two parts had a 3 to 2 ratio, or a 4 to 3 ratio. Meanwhile, other ratios like 9 to 8 produced a cacophony. If you plucked the strings at the same time, what you got didn't sound very good unless you were a fond of caterpulling. And based on his experiments, Pythagoras came to the following conclusion. Beautiful music involves mathematical ratios of small whole numbers. So here's a brief overview of Western music theory, mostly so that we have a language to talk about our following results. We use the following terms. The 1 to 1 ratio produces notes that are the same, their monotone. The 2 to 1 ratio produces notes that are separated by an octave, or span the interval of an octave. The 3 to 2 ratio produces notes that are separated by a fifth, or span the interval of a fifth. The 4 to 3 ratio produces notes that are separated by a fourth, or span the interval of a fourth. Now, if you know something about music, you know there are other intervals, like a third or a sixth, that are also regarded as consonant, at least sometimes. Thirds didn't actually become popular until the Renaissance. These consonant ratios, by the way, seem to be tied into the physiology of sound. And what this means is that most cultures will also recognize these as consonant ratios. And the real difference in musical traditions is which ones of the consonant ratios we incorporate into the music. However, Western musical tradition has one more unusual feature. Okay, among the unusual features of Western music, there is one that's noteworthy. Again, in most musical traditions, the two-to-one ratio produces a consonant, but the notes are regarded as different notes. The unusual feature about the Western musical tradition is that in the Western musical tradition, we regard the two notes as equivalent notes. This is a feature known as octave equivalence. So, while we recognize they are different notes, we view the higher note as a higher pitched version of the same note. And this leads to what's known as the tuning problem. Given octave equivalence, we can produce a musical scale as follows, we'll begin with any note, and we'll produce higher notes, separated by a consonant, and then at the end of it, we'll scale all of our notes back into a single octave. So, if we start with this note, then go up by fifths, we can then scale these notes back into the same octave. So, going up a fifth from our first note leaves us in the same octave, but our next note has to be scaled down, and similarly for the remaining notes. But the devil is in the details, so let's see how we can solve the tuning problem.