A key signature is a standardized collection of all the sharps or flats used in a scale, written immediately after the clef at the beginning of a line of musical notation, although they can appear in other parts of a score, usually after a double bar.
An accidental is a musical notation symbol used to raise or lower the pitch of a note. A sharp raises the pitch of a note one semitone while a flat lowers it a semitone. A natural is used to cancel the effect of a flat or sharp.
Key signatures are very useful and practical for music notation. Instead of putting a sharp for each F in G Major or E Minor scale, putting just one sharp after the chef is enough at the beginning.
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. Please look at the simple key signature worksheet. This small key signatures chart tells so much!
|G Major / E Minor||F major / D minor|
|D Major / B Minor||Bb major / G minor|
|A Major / F# Minor||Eb major / C minor|
|E Major / C# Minor||Ab major / F minor|
|B Major / G# Minor||Db major / Bb minor|
|F# Major / D# Minor||Gb major / Eb minor|
|C# Major / A# Minor||Cb major / Ab minor|
C Major and its relative minor A minor are the only keys do not have accidentals.
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.
It is very important to memorize the order and arrangement of sharps and flats for all keys. This is part of the basic musical language.
But instead of memorizing without thinking is not a good way to learn. I strongly recommend you to take a look at the Circle of Fifths and Fourths article. It will help your understanding and memorizing of Key Signatures.
As mentioned above, key signatures can appear in other parts of a score, usually after a double bar. There is a small sample below for Bb To Eb.
Musical key signatures are very important, if you like to learn musical theory, play piano, guitar or any instrument. You can not separate music theory and key signatures. Please work on it.