A key signature is a set of sharp or flat symbols placed together on staves in sheet music to indicate the key in which a work, or a section of it, is to be played. It also serves to minimize the number of sharps, flats and accidentals used in a score, thereby making it easier to read and play.
There is a specific key signature for each major key and each minor key, with zero to seven sharps or zero to seven flats, according to the key. Thus, in standard notation there are fifteen possible key signatures, including that with no sharps or flats for the (C major and A minor scales).
The key signature is always located immediately after the clef at the beginning of each set of staff lines and immediately before the time signature. If there is a change in key, a new key signature is also placed at the point of change.