key signature
The set of sharps or flats at the beginning of a staff that indicates the key of the piece.
In Depth
A key signature appears immediately after the clef on every staff line, telling the performer which notes are consistently altered throughout the piece. A key signature with two sharps (F♯ and C♯) indicates D major or B minor. A key signature with three flats (B♭, E♭, A♭) indicates E♭ major or C minor.
There are 15 possible key signatures: seven sharp keys, seven flat keys, and C major/A minor with no sharps or flats. The order of sharps (F, C, G, D, A, E, B) and flats (B, E, A, D, G, C, F) follows a fixed pattern. This system emerged in the 17th century and has remained unchanged — it is one of the most stable conventions in all of Western music notation.
The key of C♯ major and C♭ major both exist in theory but are almost never used because they require seven sharps or seven flats respectively — making the music extremely difficult to read.