The key signature of a piece of piano music tells you which notes to play and not to play. Placed just after the clef on every music staff, the key signature lets you know which notes are sharp and flat throughout the song. Basically, it identifies the key the song is in.
Understanding key signatures helps you play piano better:
It makes reading music easier because you know what notes to expect to play in each key. For example, if you play a melody in the key of G, you mostly play notes from the G major scale. Your knowledge of scales reminds you that G contains the note F-sharp, so you can expect to play all the Fs in the song as F-sharps.
It makes playing music more fun because you can start to identify what makes one song different from another if you understand the idea of songs being in a key.
It’s a tool to help you remember the music, because you can identify a certain characteristic in the context of the key. For example, if the melody begins on the third note of the major scale and you know what key you’re in, you can right away play the first note of the song.
A key signature tells you instantly which key the song is in. With a little experience, you’ll start to recognize the most common key signatures. You’ll simply glance at the key signature and know immediately which key the song is in.
A sharp or flat identified in the key signature indicates that every instance of that note is sharp or flat. Don’t think that just because the top F is the one with the sharp symbol that you play only that F sharp. On the contrary when a piece is in the key of G, you play every F sharp — whether you play it with your right hand or left hand and wherever it is on the keyboard.
The same note is marked with a sharp or flat twice in a key signature when you have two staves. In this case, you get one key signature on the treble staff and one on the bass staff: