# Music and Mathematics

All my life I’ve heard people saying that J.S. Bach’s music has a “mathematical precision.”
I took the statement as gospel, and made it myself on a number of occasions, until I realised something: I’ve got no freaking clue as to what it means!

Is it that the notes and rhythms he uses follow a kind of progression using mathematical formulae? Or does it mean something different? Or is it just something that people say to make them sound superior?

Can anyone please explain it to me? I like the “mathematical precision” line, and I want to be able to use it again, this time knowing what the F— I’m talking about.

For what it’s worth, I do believe there is an old maxim that about the three M’s going together: Music, Math and Medicine. It is said that people inclined toward one of the M’s usually have a strong affinity toward the others, too.

Well, a lot of Bach’s works are canons, which means that he takes a single theme and plays around with it, forming the melody and harmony both. The simplest example of a canon is a transposition of the theme to form the harmony-- This is what’s called a round (Row, row row your boat, etc.) Bach’s works, however, are much more complex: He does things like playing the theme at exactly a third the speed to form the harmony, or reversing it, or “inverting” it, such that the low notes become high and the high notes low, and so on. Of course, just reversing a theme or whatever takes absolutely no skill, but doing so and having it sound good takes a lot of skill. You don’t usually consciously pick up on the fact that the melody is formed from the same theme as the harmony, but subconsciously, it makes the music sound very precise.

I think the usual way of referring to it is it that it follows an almost standard set of harmonies that work out very precisely; i.e. each note (of each voice) follows the next in a very orderly way. The impressive part is that this occurs in canons and fugues which means that not only is each ‘melody’ note following precisely within the melody, it’s harmonizing with other melody notes (which appear in the other voices) that precede and follow it.

A wonderful book that discusses this and many other things is Douglas Hofstadter’s Goedel, Escher, Bach: An Eternal Golden Braid.

I did however, once read a short paper on an actual mathematical study of music, deriving a ratio which depended on the time value (rhythm) and tonal value (melody, harmony) of the notes. Bach’s, and much Baroque and Classical music have ratios that the author deemed ‘pleasing’. I think the authors then randomly generated music, and the ones with ratios closer to the pleasing ratio were liked by more people than the more random ones. don’t know how popular that idea became.

panama jack

This is going to be a horribly butchered and simple version of what someone who knows something about this explained to me, but here goes.

Apparently, musical notes are based on the tones produced by the waves from a vibrating string. They follow a mathematical progression in that they are evenly spaced “nodes” on the wave. Before Bach, compostions were written with notes slightly “off” the exact node because they were considered better sounding.

Bach’s innovation was to follow this mathematical progression rather than the “prettier” music produced in his day. It was jarring to the listeners who at first thought it cacophonous, but over time it became the standard for music composition. In popular music today, singers are often slightly flat, shades of the former style showing up.

Well, Panama Jack had the closest to the proper answer. So you know all music is math in so much as the theoretical aspect goes. The part when he said that he wrote more pleasing to the ear is actually more of an opinion as non-western music violates those types of rules that Bach followed and to many westerners sounds like crap.

Anyway, Bach united harmonic and melodic theory to a degree that was really unheard of before his time. Harmonic theory is what a laymen would generally refer to as the chords below the the singer (a giant oversimplification). Melodic theory is the theory that the individual notes of a melody lead from one place to another (they could be the same place, again greatly oversimplified). Anyway, Bach made the two classes of theory a unified piece. The harmony is based on stacked melodies following a chordal pattern. What, you say? You think this was done in the Rennaissance? It sure was but they were done modally. Modal music doesn’t follow a strict harmonic structure. Oftentimes Rennaissance music ends in an open fifth (intervals are yet another mathematical aspect of music that get enveloped into the harmonic theory) or other incomplete chords. Rennaissance music is really more of a series of stacked melodies with very basic chord structures.

Out of the Baroque Period (which Bach is the representative character), harmony started gaining importance. Melody was still desired for obvious reasons (you like to hum or sing along to songs, don’t you?) but Rennaissance music seemed to lack the presence of direction as modal music typically does. Harmonic theory developed by D’Arrezzi (I believe if I remember correctly) and thus was born the Baroque. He studied music that was considered pleasing and/or patterns in the music that happened often and named them and gave them a functionality within a musical context. (IE, the leading tone leads to the tonic. Or basically half steps lead to the closest note within the key, e leads to f ascending, b leads to c ascending, f leads to e descending, c leads to b descending. Again, this is a simplification.)
This is when modal theory started losing prevalence and really when our modern Western Music evolved. All tonically based music from techno, industrial, some punk, rock, etc is based off of the principles that evolved during the Baroque and later refined more in the Classical period.

I know it may sound a little off topic to how music is mathematically based but I assure you the theoretical principles behind classical music are highly mathematical. So you know, Bach really was known for Fugues which are the exposition form of a canon. A round is very specific type of canon with exact repeats, fugues can have a transcribed repeat and inversions and all types of mathematical fun. Woohoo! Pick up some sheet music if you can read it, and look at the patterns that a Bach fugue make. They should basically have all the same shapes of musical lines starting at different places, ending in different places, and even being different notes. It takes a wonderful musician/mathematician/composer to pull all of those elements together and have them end at the same time in a manner that others find pleasing. I know that pleasing is an opinion as I stated earlier.

This takes in everything except rhythmic theory. Rhythmic theory is also math. Rhythm is just a series of fractions and how to break down measures in identifiable grouped movement. Rhythm is the most basic element of music and the most concrete mathematical. You can see how the fractions break down in the given element. Time signatures tell you what beats get emphasis and how many strong beats there are per measure. The individual notes (half, whole, quarter, eighth, etc) tell one how fast something is to be played. To give an analogy to a computer it is like the clock speed. It tells you how fast to play something so it is still enjoyable. Would you like to play Doom so slow that everyone can kill you before you can turn around? Or so fast that you can’t get off the wall because you keep hitting the side when you barely touch the keys? It is that type of idea.

Sheet music is just a graph that shows music through time in a mathematical sense.

HUGS!
Sqrl

gigi - background on equal temperament and Bach:

http://ubmail.ubalt.edu/~pfitz/play/ref/tmprment.htm

I think what most people mean when they talk about the “mathematical precision” of Bach is his compositional technique using very orderly and precise rules of harmony and thematic development, as alluded to by other posters.

gigi is talking about Bach’s system of tempered tuning, which is still used today. If you take a note and double its frequency, you go up one octave. Now if you instead multiply the frequency by 3/2, you go up what is called a perfect fifth. By doing this continuously you can get all 12 notes in the chromatic scale, though of course in different octaves. That’s OK because you can just divide or multiply the frequencies by two until they fall into one octave. The circle of fifth goes C - G - D - A - E - B, etc. You can do the same by going down perfect fifths. In this case, you get C - F - Bb - Eb - Ab, etc.

OK, so going up you eventually reach the sharps, like F# and C#. Going down, you reach the flats. In theory, Bb and A# should be exactly the same note, but using this circle of fifths, they were slightly different. Tempered tuning forces them to match exactly, by depensing with the circle of fifths and using the the twelfth route of two to calculate each note instead. This makes certain notes fall a bit outside their “natural” frequencies, but it makes tuning a lot easier. Bach composed a series of keyboard works called “The Well-Tempered Clavier”, one piece in each key, to prove that tempered tuning was a viable system. What a guy!

Maybe I’m just dense, maybe it’s just a Monday, maybe a bit of both. But I can’t help but read these explanations (wonderful though they are) as music theory. I still don’t see where mathematics comes into play.
Could it be my conceptual fixation that math is numerical? I just can’t see how the notes are being interpreted as mathematical units.

Or should I just take it on faith?

Does it help to think of them as ratios? Two notes an octave apart have frequencies in a 2:1 ratio. Thirds have a 5:4 ratio, a fourth is a 4:3 ratio, a fifth is a 3:2 ratio. (I hope I got those right, it’s been a while since music theory.)

At any rate, common “pleasing” intervals have frequencies which are small multiples of each other. Part of the reason they are pleasing is that they share a lot of harmonics, so that they blend together. Frequencies which are not related tend to produce harsh, clashing overtones.

So for notes a fifth apart, for example, the mathematical relationship is particularly simple and they sound good together – they harmonize well. Your ear is programmed to recognize the simple mathematical relationships as pleasing. Of course, you don’t have to be aware of the mathematical relationship to enjoy the music. But it can add a dimension of understanding to your enjoyment.

Let’s try to make a little clearer. Besides the whole tempered tuning thing, one of Bach’s main strengths was in counterpoint. In the average song, if you remove the melody, you just hear a relatively uninteresting harmony. In many of Bach’s works, there were four separate melodies playing at once. Any of them could stand alone as its own melody, but when played together, they harmonized with each other.

Furthermore, this idea of harmony is based on ratios. Notes at certain ratios from each other seem to harmonize, while other ratios produces dissonance. For example, C and G sound right together. C,E, and G form the familiar C-major chord. C, Eb, and G form a minor chord, which produces a different mood from the major. C, Eb, and A played together would sound strange and jarring.

Imagine now that you have to compose four separate melodies that will interlock in such a way as to make a pleasing of pattern of consonance and dissonance. At any given time four notes will be played, and the ratios between them will determine the ultimate sound. It’s not purely a math problem. If it were, a computer could solve it. Still, you can see how math becomes involved.

Erm, C, E-flat, A, is A-diminished-6. Not the most pleasant of sounds, perhaps (It’s a minor third (6:5) stacked on top of a minor third), but certainly more pleasant than a tri-tone (a diminished fifth or augmented fourth, which has the disgusting and non-integral ratio of sqrt(2).

As to why it’s mathematical… several explanations have been given. Under the current system, each half-tone is separated by a frequency ratio of the twelfth root of two. This is, as mentioned, extrapolated from the circle of fifths.

A (major) fifth is seven half-tones, the interval being 2^(7/12) or just about 1.498

A (major) fourth is five half-tones, the interval being 2^(5/12) or about 1.33 (as I recall)

A major third is four half-tones, 2^(1/3) or about 1.27

(Anyone feel free to correct me on the decimals; I’m trying to recall from the top of my head ans I haven’t a calculator handy).

Thus, each tone can have a frequency assigned to it. Middle C is 262 Hz. A above mid-C is 440 Hz, the tone against which an orchestra tunes itself. High C is 524 Hz, twice the frequency of middle C.

Each tone represents a frequency. The length of the note represents a time. It’s intricately and inextricably linked with mathematics.

LL

Lazurus, please note that E flat to A is a tri-tone.

I tried to explain earlier that music is mathematical as it puts notes into a chart that is to be read over time. That sounds pretty mathematical to me. I even gave examples where it relates similar circumstances are mathematical.

Here is another example that is purely mathematical that is a good analogy for music. When you are in a space shuttle travelling to the moon you have to plot a course. You do that with mathematical equations. Granted, I don’t know those equations. Anyway, you have to leave your starting point and figure out how and when to get to the moon. As the moon is always moving you have to calculate where it will be when travelling at a certain speed in the future and aim for there rather than going directly to it. Ok, comparing it to music now. In music you have to get from point A to point B going at a certain speed. You have some leeway as to when you can arrive at point B, but it should be fairly close. You follow the charts that are made until you get there while counting to make sure you don’t go too fast or too slow. That sounds like math to me. That is music as math in the most basic form I can think of.

Music theory is all math. Instead of numbers you use letter names instead of numbers, fraction symbols (rhythmic notation), pattern analysis, simple/complex counting which can include fractional counting, chart reading, and many other mathematical skills. That is just in the performance of music. In writing you do all that in addition to relational analysis; however, most people do it without realizing how mathematical it really is.

This relationship by naming the notes and saying what their relationship is harmonically is valid but really is second base to the rest of musics mathematics. It is fundamental but you don’t really have to calculate it when you play. I know deaf people who can play music but I would not consider them able to discern the notational relationships. It is more of a read the chart to produce the following movements on whatever instrument.

Does that make more sense?

HUGS!
Sqrl

I stand corrected. Now I’m trying to remember what I ever saw in diminished chords.

LL

A slight divergence from the topic …

My Mom is a musician, and she enjoys studying mathematical patterns in nature and music. I’m a math major, and I love classical music. Many of the professors in our math department (and also the physics department) are classical musicians in their spare time; however, the music professors are not hobby mathematicians. Math and math-oriented profs from other universities seem to follow the same pattern. It seems that there’s a neat link here between math and music, apart from the “music is applied math” side.

Oh, yes. Hofstadter’s book is great. If you can read all of it, and understand all of it, you’re a genius. Even if you can’t, though (like me), it’s very informative and a LOT of fun.

You probably liked the fact that you can use the alternate name for any of the notes and make it that diminished chord. This works best with the fully diminished seventh. (IE, A, C, Eb, Gb can be spelled with any of the notes in the bass. Eb, Gb, Bbb, Dbb; Gb, Bbb, Dbb, etc) (With other note names you can get simpler chords without using the double flats.)

HUGS!
Sqrl

With the C in the bass, it’s also Cm6 without a fifth. I like minor sixths.

You meant the twelfth root of two, of course, which is 1.059463…which is the ratio of the frequencies of two side-by-side keys on a piano, whether white-white, black-white, or white-black.

Oy! ;j My brain’s hurting. As soon as I get a computer at HOME, I’ll pore over this again…and check out the book by Hoffstadter. Or maybe I’ll just throw up my hands, trust the teeming millions (well, teeming dozen or so in this case) and sit back and enjoy the music for music’s sake (though TBH, I prefer CPE to JS Bach)