Written here are the key signatures for all the major scales that contain a sharp.
The sharp key signatures can be summarized in the table that follows.
There is one sharp in the key of G major (F#)
There are two sharps in the key of D major (F#, C#)
There are three sharps in the key of A major (F#, C#, G#) etc.
Notice as the number of sharps increase, each new key is a fifth higher than the last.
e.g.,
C to G is a fifth
G to D is a fifth
D to A is a fifth etc.
Also note that as the number of sharps increases each new key contains all the sharps of the previous keys and the additional sharp is always a semitone lower than the root note of the new key. e.g., the key of B contains all the sharps of the previous keys (F#, C#, G#, D#), plus a new sharp A# (a semitone lower than B). The new sharp note is a fifth higher than the previous sharp note.
Here are the key signatures for all the major scales that contain a flat.
These flat key signatures are summarized in the following table.
There is one flat in the key of F (Bb).
There are two flats in the key of Bb (Bb, Eb).
There are three flats in the key of Eb (Bb, Eb, Ab) etc.
As the number of flats increase, each new key is a 4th higher than the last.
e.g.,
C to F is a fourth
F to Bb is a fourth
Bb to Eb is a fourth etc.
As the number of flats increases, each new key contains all the flats of the previous keys and the additional flat is always a fourth higher than the last additional flat. E.g., the key of Db contains all the flats in the key of Ab (Bb Eb Ab Db) plus an additional flat which is a 4th higher than Db - Gb.