What is a Key Signature in music?

A symbol found at the top of a written piece of music that defines the key. It shows which seven pitches (out of the twelve chromatic pitches) will be used. Notes from outside the key signature may be used in the piece, but they will not be diatonic to the key.