Blog

Understanding Music from a Mathematical Perspective

Understanding Music from a Mathematical Perspective

Describing the way music works with a mathematical approach.

Published: 2025-03-20

The Twelfth Root of 2

Math

Music is something which surrounds us every day, and the complexity it holds is often overlooked. Over hundreds of thousands of years the human ear has evolved to give certain responses to different combinations of frequencies.

Mapping Scales to Frequencies

What is the relation between notes in a scale? If you have ever experimented with keys on a piano before, you might notice that each step up (semitone) results in a frequency higher than the one before. It seems as though the frequency is directly proportional to the distance traversed from the leftmost side of the piano. A semitone is \(\frac{1}{12}\) of the diatonic scale. From this information, if we know that A4 is 440 Hz and A5 is 880 Hz, it wouldn't be unreasonable to assume that each half-step (semitone) is \(\frac{1}{12}\cdot(880-440)=36\frac{2}{3} Hz\).

The issue with this approach is that it overlooks the way our ears and mind shape our perspective of music. The human brain has evolved in such a way that it perceives musical intervals logarithmically, not linearly. This means that the difference in pitch between two notes is not perceived in terms of the absolute frequency difference, but rather as a ratio of the frequencies. For instance, an octave in the higher notes is a much larger frequency difference than in the lower notes (i.e. A1 to A2 is 55 Hz, while A6 to A7 is 1760 Hz). This leads to the concept of equal temperament, a tuning system where the distance between each semitone is the same in terms of frequency ratio.

View Interactively

In equal temperament, each semitone is separated by a constant ratio, not by a fixed number of Hz. Specifically, the ratio between the frequencies of two consecutive semitones is the twelfth root of two, or approximately 1.05946. This means that if you know the frequency of one note, you can find the frequency of any other note in the scale by multiplying by this ratio. For example, if A4 is 440 Hz, the frequency of the next note (A♯4/B♭4) would be \(440\cdot\sqrt[12]{2}\approx466.16 Hz\). If you continue applying the ratio, you will get the frequencies for the other notes in the chromatic scale, which consists of all twelve semitones within one octave.

Harmony

Applying what we have previously learned, it can now be understood why the dominant and root sound so good together.