Encyclopedia  |   World Factbook  |   World Flags  |   Reference Tables  |   List of Lists     
   Academic Disciplines  |   Historical Timeline  |   Themed Timelines  |   Biographies  |   How-Tos     
Sponsor by The Tattoo Collection
Key signature
Main Page | See live article | Alphabetical index

Key signature

In musical notation, a key signature is a series of sharp symbols or flat symbols placed on the staff, designating notes that are to be played sharp or flat unless otherwise noted with an accidental. Key signatures are generally written immediately after the clef at the beginning of a line of musical notation, although they can appear in other parts of a score.

A key signature is not the same as a key; key signatures are merely notational devices. They are convenient only for diatonic or tonal music. Some pieces which change key (modulate) insert a new key signature on the staff partway, while others use accidentals: natural signs to "neutralize" the key signature and other sharps or flats for the new key.

Fig 1. The B-Major scale

For a given mode the key signature defines the diatonic scale which a piece of music uses. Most scales require that some notes be consistently sharpened or flattened.

For example, in the key of G major, the leading-note is F sharp. The key signature indicates that each time an F is written in the staff it is in fact to be played as F sharp.

Individual sharp, flat, or natural signs that modify an individual note in the piece are called accidentals (for example, an F natural in a piece in the key of G). These override the key signature for the duration of the bar they occur in.

Figure 1 shows the key signature of the scale of B-major. Any note which is on the same line or space as one of its five sharps is increased from its natural pitch by a semitone. Although key signatures can technically consist of any collection of sharps or flats, musical tradition dictates that they be arranged in a fixed order according to the key and mode of the piece. Each major key has a corresponding relative minor key that may be represented with the same key signature. The same also applies to other modes such as Lydian and Phrygian.

For key signatures with sharps, the first sharp is placed on F line (for the key of G major/E minor). Subsequent additional sharps are added on C, G, D, A, E and B. For key signatures with flats, the first flat is placed on the B line, with subsequent flats on E, A, D, G, C and F. There are 15 different key signatures, including the "empty" signature of C major/A minor.

The key signatures with seven flats and seven sharps are very rarely used, because they have simpler enharmonic equivalents. For example, the key of C# major (seven sharps) is more simply represented as Db major (five flats). For modern practical purposes these keys are the same, because C# and Db are the same note. Pieces are written in these seven sharp or flat keys, however. The third Prelude and Fugue from Book One of Johann Sebastian Bach's Well-Tempered Clavier is in C# major, for example.

The table below illustrates the number of sharps or flats for each key signature and the relative major key signatures for minor scales (see circle of fifths). Nonstandard key signatures not included in the chart below are sometimes used by composers. One example is the key signature to Frederic Rzewski's song God to a Hungry Child (lyrics by Langston Hughes), which features Bb, Eb, and an F# in one key signature but which starts in the key of D on a D major chord.

Note that an absence of a key signature does not always mean that the music is in the key of C major or A minor: each accidental may be notated explicitly, or the piece may be atonal.

Key Sig.Major KeyMinor Key

No sharps or flats
C major A minor

Key Sig.Major KeyMinor Key

1 flat
F major D minor

2 flats
Bb major G minor

3 flats
Eb major C minor

4 flats
Ab major F minor

5 flats
Db major Bb minor

6 flats
Gb major Eb minor

7 flats
Cb major Ab minor

Key Sig.Major KeyMinor Key

1 sharp
G major E minor

2 sharps
D major B minor

3 sharps
A major F# minor

4 sharps
E major C# minor

5 sharps
B major G# minor

6 sharps
F# major D# minor

7 sharps
C# major A# minor

In cryptography, a key signature is the result of applying a hash function on a key, for the purpose of simplifying operations on keys. For example, cryptographic keys are often quite large and cumbersome to compare, so a user who wants to verify the presence of a public key in a database might use a smaller key signature rather than comparing the whole key.