key signature explained
The group of sharps or flats placed at the beginning of a staff to indicate the prevailing key of the music
In Depth
Key signatures eliminate the need to write accidentals before every affected note. Sharps and flats appear in a fixed order: sharps follow the pattern F-C-G-D-A-E-B; flats reverse it as B-E-A-D-G-C-F. The number of sharps or flats identifies both a major key and its relative minor: one sharp indicates G major or E minor, two flats indicate B♭ major or G minor, and so on through all twelve major and twelve minor keys. Key signatures change whenever the music modulates to a new key.
The mnemonic Father Charles Goes Down And Ends Battle gives the order of sharps, and reversing it gives the order of flats.