Is Music Math? Mashups, Keys, and Consonance

You hear it constantly: music is math. People say it like it closes the conversation. It doesn't. It opens the more interesting half of it.
The claim usually shows up as a rule. Mashups have to be in the same key. Harmonic mixing is mandatory, not optional, because being in the "right" key is math, not opinion. And I get where that comes from — most mashups I hear are a trainwreck, and almost always for the same reason: somebody who never learned the fundamentals of theory and harmony bolting two songs together and hoping. So I'm sympathetic to the instinct. Harmonic relationships really are mathematical. Frequencies relate to each other in clean ratios, and you can measure them. That part is true.
But "music is math" smuggles in a second claim that isn't true: that because the math is fixed, your ear is too. It isn't. The way a human being hears those mathematical relationships is not absolute. Psychology does as much work as the math (arguably more) in deciding what actually sounds good. And once you see that, the rule about keys stops being a law and turns back into what it always was: a useful shortcut you're free to break on purpose if you understand it.
Math is absolute. Music isn't math alone.
Start with consonance — the sense that some combinations of notes sound resolved and pleasant, and others sound tense or wrong. That feeling is where the whole "right key" idea lives. And consonance is not a fact about the universe. It's a psychological phenomenon, which means it's subjective, and it has changed.
Here's the proof that it's changed. Before the 1600s, an unresolved seventh chord was heard as violently dissonant — so much so that you essentially don't find it in the music of that era. People didn't write it because people couldn't stand it. Now go listen to any jazz record. The unresolved seventh is the chord the whole language is built on. The notes didn't move. The math of that chord is identical to what it was four hundred years ago. What changed is the ear receiving it. So if you want to argue that consonance is fixed and mathematical, you have to explain how the same frequencies went from unbearable to foundational without a single number changing.
A lot of that is just exposure. The chords and progressions we've heard ten thousand times sound consonant to us largely because we've heard them ten thousand times. Unfamiliar voicings can land as dissonant even when, measured strictly, they're no more dissonant than the ones we love. Expectation does an enormous amount of the work we credit to acoustics. You can be primed to hear tension where there isn't much, and primed to hear resolution where the math is actually pretty rough, and most of the time you won't be able to tell which is happening — the feeling arrives before conscious judgment does.
There are exceptions where the math really does dominate — a plain major or minor triad, which most of twentieth- and twenty-first-century pop is built on, reads as deeply consonant almost universally, because it's got perfect fourths or fifths, no grinding seconds, and a simple overtone structure that doesn't leave much room for interpretation. That's the floor everybody's ear seems to share. But that simplicity is the exception, not the rule. The moment you reach for richer, more complex chords, you open up space for two trained listeners to hear the same notes and disagree about what they are.
That last bit isn't a metaphor. It's literally true on the page. Take one chord — fixed pitches, no ambiguity about which notes are sounding. You can call it B7#9b13 and be right. You can also call it B7#5#9 and be just as right. Mathematically, they're the same object. Semantically, they're miles apart. Calling that tone a b13 rather than a #5 implies a different harmonic world around it — that there's a natural fifth somewhere, or a #11 with no fifth, that the chord is an inversion, that the line is going to play off that b13 up in a higher register. Read it as a #5, and you're implying a #4 belongs in the sequence instead. Same with Eb+maj7(#11) and Gadd9(b13): identical notes, completely different contexts and intentions. This isn't pedantic chord-spelling for its own sake. How you name the chord changes what's allowed to come before and after it. The notes are math. The meaning is interpretation, and the interpretation steers the music.
And all of that is still inside the Western system, which is itself a choice, not an absolute truth. We divide an octave into twelve evenly spaced tones — and "octave" just means the point where the frequency doubles. That's one convention among many. Plenty of traditions don't do it that way. Chinese, Indian, and many sub-Saharan African musical traditions carve up the octave along entirely different lines, and listeners raised in those systems hear differently from Western ears. They're not wrong, and we're not right. It just means there's a cultural bias baked into what any of us call consonant before we've consciously decided anything.
It's worth sitting with how deep that goes, because it's easy to wave it off as a footnote. It isn't. If someone raised inside a different tuning system hears intervals that sound out of tune to you as perfectly resolved — and they do — then "in tune" was never a property of the sound. It was a property of the agreement you grew up inside. Twelve equal tones feels like nature to a Western ear because it's the water that ears have always swum in, but it's an engineering compromise, hammered out over centuries, that happens to make it convenient to change keys on a fixed-pitch instrument like a piano. Other traditions made other compromises, optimized for other things, and built ears to match. None of those ears are misreading the math. They're reading a different agreement. Which means when you call a mashup "out of key," part of what you're really saying is that it violates a convention you were trained into — useful to know, but not the same as a law.
So no, harmonics isn't a perfect science. If it were, "harmonic estimation" wouldn't have the word "estimation" in it. The people who do this rigorously, with the math in front of them, still call it estimation — because they know the number they get out isn't the end of the story. You can run a Fourier analysis on a stack of chords and get a clean, repeatable result every time, the same answer no matter who's holding the calculator — and the meaning a listener takes from that result will still vary from person to person and culture to culture. The analysis is reproducible. The experience isn't. There are stacks of scholarship on exactly this gap if you go looking; the short version is that measurement and perception are two different things, and conflating them is the whole error. The frequency relationships are absolute math. The experience of them is psychology, shaped by expectation and culture. Both halves are real. The mistake is pretending the first half is the whole thing.
How the wrong key can be right
Which brings us back to mashups, and to why "it has to be in the right key" is a floor, not a ceiling.
Take R.E.M.'s "Losing My Religion." The whole vocal — the entire sung melody, start to finish — uses only four notes: G, A, B, and C. The record is in A minor. But strip the instrumental away, and you've got four notes floating free, and four notes can live in a lot of houses.
The obvious move is the relative major. A minor's relative major is C major, so you could drop that vocal over something bright and major like Ritchie Valens' "La Bamba." It's an absurd pairing on its face, but harmonically it's airtight — and that trick generalizes: nearly any song in a major key will mash with something in its relative minor, and the other way around. That's the first free key most people already use without thinking about it.
You can push further, because a four-note expression is so little surface area to satisfy. The nearest neighbor to A minor is E minor. Lay the four-note vocal against E minor, and not one note falls outside the scale — it fits perfectly — so you could put it over something like Nirvana's "Come As You Are." And since the relative major of E minor is G major, that opens too; "We Didn't Start the Fire" becomes fair game without much fight. Count it up, and you've already got four keys where every vocal note is fully inside the scale: A minor, C major, E minor, G major. One of those is the "right" key. The other three are all "wrong," and all of them work, cleanly.
Now get greedy and accept one note out of place. D major and its relative B minor, F major and D minor, Bb major and G minor each miss the vocal by exactly one note — and whether that miss kills the mashup depends entirely on where the offending note lands in the scale. B minor probably collapses: the sung C would function as a flat second over a B-minor center, and a flat second is about as ugly to Western ears as it gets. But B minor's relative major, D major, has the exact same notes, and that very same sung C reads as a flat seventh instead — which isn't dissonant at all. It's Mixolydian. It's the sound running through half of Irish folk and bluegrass. Same note, same math, one functions as a wreck and the other as flavor, and the only thing that moved was the harmonic context around it. This is the entire argument of this piece, demonstrated on a single note.
So when someone tells you a mashup has to be in the original key, what they've really found is the safe starting line — the place where you're guaranteed not to clash while you're learning. That's worth something. But it's a beginner's fence, not a law of physics. Once you actually understand how harmony works, you can see the four keys that fit for free and the handful more that fit with care, and the "right key" turns out to be just one option among several.
That's the real answer to "music is math, right?" Yes, underneath, the frequencies are math, fixed, and indifferent to your opinion. But what you do with them — what sounds right, what reads as wrong, which "wrong" key is secretly perfect — that's run by a human ear shaped by everything it's ever heard. The math sets the table. The psychology decides what tastes good.
And that's not a loophole or a footnote on the math. It's the actual job. The math will tell you which keys are safe; it will never tell you which juxtaposition is worth making. Putting "Losing My Religion" over "La Bamba" is mathematically defensible and also slightly insane, and whether it's brilliant or a mess is a question no Fourier analysis can answer — it's a question about ears, and context, and what you're trying to do to a room. Anyone who stops at the math is going to keep making mashups in exactly one key, and wondering why the people who broke the rule keep landing somewhere more interesting.