Key — where melody and harmony meet
Hum along to a song loop and your voice lands by itself on a note that feels like a resting point. Play the same song two frets higher with a capo and that note simply moves along with it.
A key is exactly that: a root as resting point plus the six other notes that belong with it. The capo shifted the whole set by the same distance — C major two frets higher is D major, identical relationships in a different position. The relationships are the song; the key only says where it sits.
This is where the two previous layers connect. Why does a key tie melody and harmony together? Because both draw on the same supply. Melody takes the seven notes one after another — that's the scale. Harmony stacks the same seven into chords. That's why a key has fixed, corresponding chords: they're the triads that can be built from exactly those seven notes. Solo and accompaniment are made of the same material, once rolled out, once stacked.
That's the core of this whole guide. The map of all twelve keys — which are closely related, which are distant — is called the circle of fifths; here it's enough to know that map exists.