There have been many questions on this site relating to keys.

This one asks what 'rule' is there that says a piece actually has to be in a particular key.

Obviously most are, and will have the corresponding signature for that key, albeit with modulations that quite often happen, bringing the inevitable accidentals.

But - is there a necessity, which a lot of questioners seem to feel there is, for any piece to be 'in this key'?

It's to an extent a rhetorical question, as I think the key signature is just there to be of help, and remind players of which set of notes will be most prevalent in this piece. But minor stuff, and modal stuff, will use a key signature which won't give too much of a clue, but also, why is there all the compunction to find/know what key a piece is in?

Original tag was a little misleading - sorry!

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Dom
    Aug 14, 2022 at 16:32
  • 2
    I'm not sure what you're really asking. Why people want to know the "key" of non-major/minor system music (rather than just saying the tonic.) Why do most major/minor key works start/end in the same key, or something else? Aug 15, 2022 at 19:04

9 Answers 9


Two broad-level points:

1: Music theory doesn't proscribe, it describes. As you know, whenever we talk about "rules," there are no "music theory police" to arrest you if you break them. In the big picture, music theory "rules" are like scientific principles. An apple doesn't fall to earth because Isaac Newton made up a rule that it should; rather, science observes and describes what it sees happening. Similarly, music theory is our way of observing and explaining what we see happening in actual practice. A good mantra is "theory follows practice." When practices mutate, theoretical frameworks mutate to explain and codify them.

And yes, when teaching these principles, pedagogical traditions often frame them as "rules" (don't write parallel fifths), but it's important to remember that these rules are bounded within unspoken contexts. It's like saying, in a discussion of soccer, "Don't hit the ball with your hands," and the unspoken context is "because if you do you'll be playing volleyball."

  1. As others have pointed out, the notion of being "in a key" is part of an unspoken context limiting the discussion to the Western tonal tradition, and it ignores vast swaths of human music-making. Medieval music, Western post-tonal music, contemporary non-classical genres, and the musics of many traditional cultures don't fit easily within discussions of being "in a key."

And finally, to address part of the question: "why is there all the compunction to find/know what key a piece is in?": Well, one could think of a few answers: It might be just because the questioner is used to these assumed contexts, and hasn't been introduced to ideas like modal mixture or polytonality. But to take a more generous view, we can benefit in a Schenkerian kind of way by asking ourselves the kind of questions that always power music theory: "Looking at this great big complicated tangle of music, how can I explain it? How can I boil it down to big, overarching principles, instead of just shrugging and saying 'Well, it's a bit of this and a bit of that'? How can I identify a solid core to it, and then explain the outlying or contradictory bits in light of that central narrative?"

  • 1
    Music theory both proscribes (parallel fifths, for example) and prescribes (cadential formulas, for example). Of course, it also describes, as you say. The relationship between theory and composition isn't unidirectional.
    – phoog
    Aug 14, 2022 at 6:54
  • At any rate natural sciences like physics aren't a good metaphor for music theory, because physics can't possibly be influenced by anything we humans do – the world just is what it is, and all we can do is discover phenomenona that are already there. On the other hand, music theory clearly does have at least some influence on what phenomenona composers put into their works. A better analogy would be engineering principles. Aug 14, 2022 at 8:52
  • 1
    @phoog I have to disagree. Parallel fifths aren't forbidden by 'music theory', they're not often used in Baroque and Classical music simply because they don't sound good most of the time. But composers who knew how to use them have done so. Students learning harmonisation are discouraged from using them, and hidebound examiners will mark them down without listening to whether they actually sound good.
    – Peter
    Aug 14, 2022 at 14:05
  • @phoog And I'd still quibble about "big picture" vs "small picture": In the small picture, Fux et alia talk in terms of "rules," but the unspoken context is "do it this way [if you want to be doing it within this context that has been established]." Play soccer this way, if you want to be playing soccer. Problems arise when people observe what is in fact volleyball—or maybe Calvinball—and wonder why it's breaking the rules of soccer. To pursue the sports metaphor, as new practices and technologies arise, the "rules" adapt to address them (steroids, "tech" swimsuits, triple-twisting backflips). Aug 14, 2022 at 14:36
  • 2
    Peter's right: regardless of how good or bad the parallel 5ths and octaves sound, the examiners will mark them down. I also get nasty comments on my Musescore scores if I use parallel 5ths or octaves in Baroque(-style) music. In practice, there is a "music theory police".
    – Dekkadeci
    Aug 14, 2022 at 15:15

Sometimes it's useful to think of a piece of music being in a particular key, sometimes it isn't.

Around the turn of the 20th century, the 'classical' musical world (well some of it) decided they'd had enough of 'keys' and tried other forms of structure ('12-tone' music etc.)

In the second half of the 20th century, the jazz guys - previously pretty well committed to 'ii-V-I' harmony - discovered 'modes', which in that context largely meant keys that lacked the sharpened leading note that enabled tritones, dominant 7ths and all that 'functional' stuff. (Blues were a step down that path, but you generally still pretty firmly knew what key you were in with a blues.)

That's a lot of stuff to throw into the mixing pot of today's music, whether a full-blown movie score or a guitarist-songwriter deciding what chord shapes to play! Plenty of music is still tonally unambiguous. A whole lot more floats between major and relative minor (C major/A minor) and uses the 'natural minor' scale (no G# in A minor), making it hard to pin down just which note (C or A) is the tonic at any given point. Not a lot of 'ii-V-I' going on! Musicians who have studied 'modes' may stick in one - Dorian, Mixolydian, Phrygian... - for a whole piece. Others may roam more freely.

Students crave order. They want to know 'why does this work?' Well, very often now, even in a simple pop song, the 'why' may have little to do with functional harmony - chords with a tendency to resolve towards a tonic. The connection between two chords may be nothing more than having a note in common.

It's also worth pointing out that a whole lot of music doesn't fit into a 'chord sequence' at all. And that includes modern 'popular' music.

  • If you mean that the concept of key requires leading tones or something, then that's not the de-facto actual modern meaning of the word. Nowadays key really only means a center pitch and usually the third above it. The style of organization of pitches around that center pitch can be modal, but the mode's root would be marked as the key. Why has this change of meaning happened? Maybe it's because non-common-practice harmonic styles have become such... common practice nowadays, and there has been no central authority to introduce a better term that would have left the old meaning of "key" alone. Aug 13, 2022 at 15:39
  • Congratulations, by the way, in getting to 2nd place in upvotes!
    – Tim
    Aug 13, 2022 at 16:00
  • 1
    @Tim Coo! So I have! Do I get a hat?
    – Laurence
    Aug 15, 2022 at 16:29
  • 1
    No, that's only a winter fetish.
    – Tim
    Aug 15, 2022 at 16:45

Trivially, no

Unless you have a very narrow definition of “piece” (of music), there are many, many existing pieces that cannot reasonably be described as being in any key.

  • 2
    One gets the impression that many questions here are posed by people with an almost complete lack of exposure to music of the 20th century, pop & film excepted. Aug 17, 2022 at 13:48

I deleted my first answer, because it concentrated on the wrong question.

is there a necessity, which a lot of questioners seem to feel there is, for any piece to be 'in this key'?

Key means a harmonic center pitch and a certain interval structure around that center where the harmony would feel to be in a resting position and not leaning off balance. A sense of harmonic center and balance is created by organizing notes in a certain way. If we create a piece by randomly placing notes in pitch and time dimensions, it is highly unlikely that the result can be perceived as being in a key. Even if we make the time dimension non-random, the pitches still need to be organized in a very particular way to create the feeling of a center.

The concept of key is a tool for operating in musical situations, for reasoning about and dealing with notes and chords. It is an organizational scheme, for keeping things under control. If you have many voices and notes without a coherent idea about their relationships, it will quickly become an unmanageable chaos. Use a key as your guide!

The tonal center that music creates - if it creates a tonal center - is partly in the ear of the listener, it is subjective. How a certain person feels about tonality and a possible harmonic center, depends on the person, and it cannot be objectively calculated with certainty. A possible center and the organization of notes around it can also change and move many times during a piece, or it can be ambiguous or disappear completely. "Now you see it ... now you don't."

So when "is" a piece in a key? It "is" in a key when people find it useful for some purpose to say that it is in a key, or to see it as being in a key. Key is an organizational concept. Just like in football it is possible to organize the players' roles in different ways, it is possible to organize musical notes in many different ways, and only some them are based on the concept of a key.

What do you want to do? Play the piece mechanically? It may be enough to be able to read, you don't need to "understand" what you're playing, or to know what the composer or arranger thought when writing the notes.

Do you want to create variations of the tune, or play something over it? Then it is good if you can identify a possible key, or keys, for the passages you intend to manipulate. Did the composer think about a key when composing? Maybe, maybe not. If you cannot identify a key, it is possible that the composer had some other kind of scheme in mind. If you want to stay in the same or compatible style and feeling, you have to figure out what the scheme is.

A friend of mine once asked for help with an electronic tune he had made. It sounded weird to me - kind of tonal, but then again not. After playing over it I figured out the problem or unusual feature about the piece - the bass line created a feeling of F minor being a center, but other instruments seemed to center on G minor. Interesting! For playing that piece on the piano, it would be useful to think about not just a key, but two keys. F minor for the left hand and G minor for the right hand. I adviced my friend to practice playing tunes by ear, and to find chords and keys by ear, because it was obviously his intention to have the instruments have the same center, but he lacked the organizational tools and skills to keep his notes under control and in the desired formation. The concept of key would have helped him a lot!

  • 2
    Thank you so much for going to the trouble of generating another answer - it's good that some contributors do more than merely provide comments - and this one is another slant on what the question is supposed to be about. I appreciate your time and effort. +1
    – Tim
    Aug 14, 2022 at 16:03
  • @Tim No problem! I'm learning to talk about music-making. Writing makes me organize my thoughts, and I learn a little bit about how other people think as well. Aug 14, 2022 at 16:44
  • It "is" in a key when people find it useful for some purpose to say that it is —Mm, I like that. That's a nice, pragmatic, sociological way of explaining the behaviors of those explaining the music. Similar to my favorite answer to "what is music and what isn't" (music is that which anyone perceives as or construes as music). Aug 19, 2022 at 18:46

Usually music is written in a key, but there are of course songs that break these "rules", and lack a tone, or a key. The definition of Atonality (according to Dictionary.com) "is the absence of key or tonal center.", or according to Encyclopedia Britannica "the absence of functional harmony as a primary structural element."

Britannica also notes that "Schoenberg's song cycle Pierrot Lunaire (1912) and Alban Berg's opera Wozzeck (1925) are typical examples of atonal works." So a piece of music doesn't necessary have to be in a key to be music.

But why do people use keys? According to StudyBass,

In music a key is the major or minor scale around which a piece of music revolves. A song in a major key is based on a major scale. A song in a minor key is based on a minor scale.

This website further explains what keys are and how they are used in music

Many songs are written with not just one key (or limited to just sharps, or just flats). For example, some songs that I see switch from C major to E♭ major to F# major. That is totally possible in music too. Most of the time, switching between keys makes the music seem smoother, or more refined, in a sense.

Also, about finding/knowing what key a piece is in, Guitar Gear Finder states:

Finding the key of a song is an important way to better understand the music you play. A song's key can tell you a lot about how the song was written as well as what chords and notes you're likely to play in it.

Personally, I couldn't care less. I don't usually need to find the key of a song, because it doesn't really help me (though it might help others) at all.

  • On the occasions I'm in the house band, a key is very helpful, as it means I can play along from the start rather than wait to find out. As long as they tell me the true key!
    – Tim
    Aug 14, 2022 at 11:59
  • This answer seems to confuse key and key signature, which are not the same thing. Aug 14, 2022 at 17:26
  • @Tim That's true. I don't usually perform, and I've never been to a band before, so I haven't had much real experience with using a key!
    – user87626
    Aug 14, 2022 at 22:15
  • @piiperiReinstateMonica Thanks so much for your feedback, I did my best to clear the confusion.
    – user87626
    Aug 14, 2022 at 22:15
  • It would further improve the answer, if you could really separate the concept of key signature from it. The question is valid regardless of staff notation. If we assume that nobody in the world reads or writes staff notation, and so nobody has a need for accidentals or key signatures. Let's say everyone uses a numerical chromatic equal-temperament note-naming scheme with numbers 0-11, and accidentals do not exist at all. Or everybody plays six-string guitars and they just think in terms of fret numbers. People still want to use keys i.e. tonal centers and "tonic chords". Why? Aug 15, 2022 at 9:25

All tonal music has a key. Not all music is tonal.

All musical works that are tonal are in either a major or minor key. This includes all works in the baroque style, the classical style and romantic style, i.e. everything from Bach to Wagner (this is referred to as the common practice period).

Furthermore, if you believe Heinrich Schenker, in order to be a "master work," the piece must begin and end in the same key.

That being said, there are many types of music that are not tonal.

  • Music prior to the baroque period was generally modal, i.e. using the diatonic scale but not restricted to major and minor, which are just two of several possible modes.
  • Music in the late romantic period and beyond tended toward a form of "dissonant tonalism" which so embellished the tonal structure that the key might not be discernable.
  • Some twentieth-century music is purposefully atonal, i.e. going out of the way to avoid having a key. The epitome of this is serial music, which employs all 12 tones equally, and purposefully avoids cadence or other structures that might imply a key or tonal center (example).
  • Non-western music often uses a completely different system, such as Arabic maqam, which doesn't even use the same scales as the west. Obviously this type of music cannot have a key in the traditional sense.
  • Some types of music don't even seem to have a scale. For example Ligeti Lux Aetera.
  • Bitonal and polytonal music have 2 or more simultaneous keys (example).

Popular music today is a mix. Some would call it post-tonal. Some of it is tonal, some of it is not, and much of it borrows heavily from tonality but breaks many of the rules or integrates different styles (example). It would be a mistake to say that every piece must have a key, but keys are often used by composers because tonal music has a such a rich language and is familiar to so many listeners. Also, musicians are generally pretty good at playing it, because they practice scales and arpeggios which are meant essentially to prepare you to play tonal music. But there is no inherent reason why music has to be tonal or have a key. Much of it isn't, and doesn't.

  • I've heard a fair few pieces/musical themes (pretty much all of them from video games) where each section (or, at least, nearly every section) of it is tonal but I either cannot satisfactorily assign the entire piece to a single key or the single key label I give it looks really shaky - e.g. "VS. Star Dream" from Kirby: Planet Robobot (ambiguous -> C minor -> F# minor -> B minor -> D minor -> G# minor -> C# minor -> E minor), "The Azure Arbitrator" from The Legend of Heroes: Trails to Azure (D minor -> E minor -> C# minor -> D minor -> E minor -> C# minor).
    – Dekkadeci
    Aug 15, 2022 at 22:41

The history of music provides you the answer: no, they don't have to be in a key as we observe in Schoenberg's beautiful atonal songs. But in tonal music -most songs are tonal- yes there is a tendency to be in a key. Some say the need to hear the music around a central tonic is an innate function, some say this is because of our past musical experiences/exposures. The important thing to notice is a piece can move to several keys, this is the nature of music, but there is a 'sense of key'. Please note that most people memorise and repeat the melodies which are in a key and are consisting of mostly stepwise motion more easily than the ones which are not in a key and contains many skips and leaps.


Back in the day, with Baroque and Classical(-era) music, pieces were in certain keys, and their individual keys were part of their names. Before the advent of well temperaments, some keys were much rarer than others due to producing awful wolf intervals with the then-established tunings (e.g. just intonation, quarter-comma meantone) and the old standards for A notes (e.g. the oft-rumoured A415, the A465 apparently used in Baroque-era North German organs according to sources like https://en.wikipedia.org/wiki/North_German_baroque_organ_in_%C3%96rgryte_Nya_Kyrka). Taking advantage of well temperaments, The Well-Tempered Clavier contains pieces in all 24 major and minor keys. At the very least, there was an interest (however rare) back then in purposefully composing music in every key you can get your hands on, and this requires caring about which key your piece is in.

Despite Baroque and Classical-era music commonly switching keys in their middles, and even not ending in the keys they began in (this is most common with minor-key sonata-allegros that end in the tonic major), they were still titled with their keys or at least the overall keys of the multi-movement works they belong in. Plenty of examples are still reasonably popular today: the infamous Toccata and Fugue in D Minor, BWV 565; Beethoven's Symphony No. 5 in C Minor; Mozart's Piano Sonata No. 16 in C Major, K. 545 "Sonata facile"; Elgar's Pomp and Circumstance March No. 1 in D Major; the list goes on...

This older interest in labelling music with their singular keys persists to the present day, even if it may have lost some of its value, and even in cases where half of a piece is not in any one key (so any key label is at least half incorrect). For example, IMSLP labels Sousa's "The Stars and Stripes Forever" as being in E flat major in https://imslp.org/wiki/The_Stars_and_Stripes_Forever_(Sousa%2C_John_Philip) even though, not only does this Sousa march end in A flat major instead, more than half of it is in A flat major. In fact, both Sousa marches and ragtime pieces commonly end in the subdominant keys of the keys they begin in (one such ragtime piece is Joplin's "Elite Syncopations").

Perhaps one of the most compelling reasons today to know what (overall) key a piece is in is that some keys are easier to play on certain instruments or with entire ensemble types than others. For example, despite Shostakovich's Festive Overture, Op. 96 being in A major overall, two prominent concert band arrangements of it change its key to keys concert band instrument players (e.g. B flat clarinet, E flat alto saxophone) find easier to read due to having fewer accidentals and simpler key signatures: the Donald Hunsberger arrangement in A flat major (according to https://en-academic.com/dic.nsf/enwiki/4504206, heard in https://www.halleonard.com/product/127014/festive-overture-op-96) and the Donald Patterson arrangement in B flat major (according to https://www.marineband.marines.mil/Portals/175/Docs/Audio/Educational_Series/feste/feste.pdf, heard in

). In fact, the US Marine Band Feste PDF for the Patterson arrangement outright says that A major is "not nearly as friendly to most band instruments" and B flat major ensures that "technical passages are more easily negotiated by all the instruments".

  • 1
    I already wrote an answer to the question you're addressing here, but I deleted the answer, because that's not what Tim intended his original question to be about. ;) The real question is, do pieces have to have keys. Or since that's such a trivial question - of course not, there is atonal or keyless music, as we all know - maybe the more important question is, why do so many people act as if writing and playing in keys was the only possibility, or why do they insist on trying to find a key for anything and everything. Aug 15, 2022 at 9:20
  • @piiperiReinstateMonica - that's about the top and tail of the question! Glad someone understood me...
    – Tim
    Aug 15, 2022 at 11:10
  • @piiperiReinstateMonica - Yeah, this answer actually leans towards answering "why do they insist on trying to find a key for anything and everything". I actually found a fairly nasty anecdotal example earlier this week for why a certain musician might want to know the key of everything they play (spoiler: they played the music in more difficult keys out of tune).
    – Dekkadeci
    Aug 15, 2022 at 14:04

It is not strictly necessary. You do have music with a loose adherence to keys. The adherence to keys gives a structure to music. A Tonal foundation, but that does not mean you cannot have music without a tonal foundation.

It all just gets a bit loose if you are not in a specific key, although loose does not mean bad. It is just one of many effects you can employ. It is not about what is wrong and what is correct it is about what approach best fits the song and the emotions you are trying to convey.

There are also just pure practical considerations. A harp abhors sharps. You pluck the strings on a harp towards your body, hence flats are easy but having to go away from your body and think about sharps is hard.

Choosing keys in Piano music is important as to how the fingering of the key you play affects the composition. Your fingers are unfortunately capable of certain things.

If you are in a band you have to ask yourself what exactly is the singer capable of. Singers have specific ranges and keys that fall comfortable in their voices. Playing loosely according to a key can have an influence on them, you have to consider that.

In closing, I'm a firm believer that standard music theory is standard for a reason. Yes, it may be interesting as an academic pursuit to discuss the ideas about certain re-imaginings of what is standard, for the most part, for people who make music for public consumption. People who create with the idea of selling for a profit. Standard harmony is simply just a better bet for getting your stuff out there.

  • 5
    "You pluck the strings on a harp towards your body, hence flats are easy but having to go away from your body and think about sharps is hard." Eh what? That's like saying 'you play all notes on a piano by pressing the keys DOWN therefore...' well, therefore what? Harps are fine with sharps. They have to think a bit what to do if you write them a double sharp or double flat though! Here's a harpist doing the 'pedal dance'. Impressive, but not outlandishly so. Think what a church organist does with their feet in a Bach fugue. youtube.com/watch?v=bMYjCRbxyX8
    – Laurence
    Aug 13, 2022 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.