If you throw a frisbee, and I ask you how many calculations you did while doing that, the answer would likely be 0. Similarly, if you pick up a carton of orange juice, you are able to tell how much is left in it without actually seeing the inside of the carton. How? Behind the scenes, our brains are constantly performing very complex mathematical calculations for even seemingly basic everyday actions.

The same mathematical-based understanding happens in music. Just like how you don’t need a deep understanding of calculus to aim a frisbee, you don’t need to have studied music theory for your brain to calculate intervals, identify something as off-tune or off-beat, anticipate a musical cadence and feel disappointment if it isn’t resolved.

Let’s take this a step further.

If I ask you and your friend to each draw a rectangle, separately, chances are you will draw similar rectangles. If I show you various different rectangles, some will feel too elongated, or too shrunk. Although there are infinitely many rectangles, for our brains, there is an ideal—golden—rectangle and it’s almost 3 by 5 (1).

Why? We have an affinity to the golden ratio, a ratio of 1.618, and we find it aesthetically pleasing (2). This is also the ratio of the fibonacci sequence and appears in many places in nature like spiral patterns in sunflowers, seashells, and even swirls of hurricanes and galaxies (3). This ratio is known as the geometrical blueprint for life, and the Greek philosopher Plato even called it the “key to the physics of the cosmos” (4).

Fascinatingly, this tendency for the golden ratio also exists in music. We might not see it, but we hear this “divine proportion”, and many composers built their music on it—whether instinctively or intentionally (1). Mozart wrote his piano sonatas so that the number of bars in the development and recapitulation sections divided by the number of bars in the exposition would equal approximately 1.618 (5). Similarly, a study on the mathematical architecture of Bach’s late work, the Art of Fugue, based on bar counts, found that the whole work was conceived on the basis of the Fibonacci series and the golden ratio (6). This is also why violins of the famous violin maker Antonio Stradivari are known to be especially sonorous; dividing lengths of specific parts of the Stradivarius violins produces the golden ratio.

Music is mathematics. The great composers knew this and used this in their works. Great mathematicians and philosophers saw the connection between music and science. The great physicist Einstein even said that he often thought in music, lived his daydreams in music, and saw his life in terms of music. And he was a big fan of Mozart and Bach (6).

Indeed, math is woven into the essence of music from the organization of musical scales to the physics dictating an instrument’s sound (7). Western music specifically is based around sets of 12 notes that rise in pitch, called octaves, and the tuning of every note is mathematical; each note in an octave has a frequency 5.95% higher than the previous one, so any note has twice the frequency of the same note an octave lower (7). If you pluck a string of fixed length, you produce a certain musical note. If you pluck a string half as long, you get a note that differs from the first note by an octave. If you pluck the two strings simultaneously, the 2:1 ratio of string lengths produces notes that are harmonious. Similarly, plucking strings with length ratios of 4:3 and 3:2 also result in harmonious musical intervals—the fourth and the fifth (8). This observation led Pythagoras to conclude that harmony-producing ratios all involved the numbers 1, 2, 3 and 4, and thus, their sum, 10, must be the key number for developing a theory of the universe (8).