A key signature is the cluster of sharps or flats placed on the staff immediately after the clef, indicating which notes are altered for the duration of the piece. Rather than writing accidentals beside every affected note, the composer fixes them once at the start of every line and lets the reader assume them throughout. It is the most common shorthand in Western notation and the first thing a sight-reader looks at after the clef.
Key signatures are not arbitrary. They follow the cycle of fifths exactly, and they exist precisely because the major and minor scales require the same pattern of half-steps and whole-steps regardless of starting pitch. The signature is the shorthand that preserves that pattern. Without it, every transposition would require accidentals on roughly half the notes — a visual mess that would make sight-reading effectively impossible.
The order of sharps and flats
Sharps are added in the order F-sharp, C-sharp, G-sharp, D-sharp, A-sharp, E-sharp, B-sharp. Each new sharp sits a fifth above the last. Flats are added in the reverse order: B-flat, E-flat, A-flat, D-flat, G-flat, C-flat, F-flat — each a fifth below the last. These orders are not coincidence. They are the cycle of fifths walked in opposite directions, which is why the cycle of fifths is sometimes called the master diagram of Western harmony.
Sharps: F♯ C♯ G♯ D♯ A♯ E♯ B♯ Flats: B♭ E♭ A♭ D♭ G♭ C♭ F♭
On the staff, sharps and flats are placed in fixed positions so they read at a glance. F-sharp always sits on the top line of the treble clef; B-flat always sits on the middle line. Pianists internalise these shapes early; a glance at the signature is enough to know the key without counting individual accidentals. Engravers from Petrucci onwards have respected these fixed positions, and modern engraving software continues the convention.
Finding the key from the signature
For sharp keys, the major key is one semitone above the last sharp in the signature. Three sharps (F-sharp, C-sharp, G-sharp): the last sharp is G-sharp, so the key is A major. For flat keys, the major key is the second-to-last flat. Four flats (B-flat, E-flat, A-flat, D-flat): the second-to-last flat is A-flat, so the key is A-flat major. The exceptions are one flat (F major) and no accidentals at all (C major), which must simply be memorised.
- Count the accidentals in the signature.
- If sharps: name the last sharp, then go up a semitone — that is the major key.
- If flats: name the second-to-last flat — that is the major key directly.
- For the relative minor, drop a minor third from the major tonic.
The relative minor for any signature shares the same accidentals but starts a minor third below its major partner. A major's relative minor is F-sharp minor; A-flat major's relative minor is F minor. To tell whether a piece is in the major or its relative minor, look at the opening and closing chords and any prominent leading-tone accidentals — the raised seventh of the minor scale shows up as a sharp or natural inside the bars themselves.
Reading and transposing
Fluent reading depends on internalising key signatures rather than re-deriving them. A pianist reading a piece in E major (four sharps) should not be sounding out F-sharp, C-sharp, G-sharp, D-sharp at every encounter.
The whole point of the signature is to lift those alterations out of conscious processing so that attention can be devoted to phrasing, articulation, dynamics, and voicing. Drilling each key until it is second nature is a much better use of time than learning new repertoire in keys you do not yet hear.
Transposition is the act of rewriting a passage in a different key — usually to suit a singer's vocal range, or a transposing instrument like the clarinet or French horn. The trick is to work in scale degrees rather than in note names. If a melody moves from the tonic up to the fifth, it does so in every key; the pianist who has internalised the major and minor scales transposes by ear rather than by recalculation. This is one of the most useful skills in accompanying.
Enharmonic equivalents
Six sharps (F-sharp major) and six flats (G-flat major) sound identical on a piano — they are enharmonic. Composers choose between them based on context, ease of reading, and harmonic direction. A piece modulating from C major up by fifths will reach F-sharp; one modulating down by fifths will reach G-flat. Both spellings are correct; only one is appropriate. Choosing well is part of fluent notation.
C-sharp major (seven sharps) and D-flat major (five flats) are enharmonic; B major (five sharps) and C-flat major (seven flats) likewise. In practice composers almost always choose the simpler spelling unless harmonic logic dictates otherwise, which is why D-flat is much more common than C-sharp and B much more common than C-flat.
Chopin's nocturnes drift between enharmonic spellings inside a single piece, which is a clue that he is thinking modulationally rather than locally.
Mid-piece changes
When a piece modulates to a new key for an extended passage, the composer may insert a new key signature at the bar line, cancelling the old one with naturals if needed. Short modulations are written with accidentals only; long ones earn a fresh signature. The cut-off is editorial taste — about eight bars is the rough threshold. Editors of Bach, Mozart, and Schubert often disagree about exactly when to insert a new signature.