Minor keys aren't quite so straightforward as major keys. Two reasons for this, firstly, there are three minor scale types, natural minor, melodic minor and harmonic minor. Secondly, in modern music they are often mixed together. Because of this, minor keys can be ambiguous in terms of strict theory. To get our head around all of this we need to first understand the natural minor.
The scale formula for the natural minor scale is 1 2 b3 4 5 b6 b7.
The natural minor scale just so happens to share the same notes as the major scale three semitones (half steps) above. We call this the relative major, or from the major scale's perspective, the relative minor. Let's take a look at the scale notes to get a clearer picture.
A major scale: A B C# D E F# G#
To make this a natural minor we need to flatten the third, sixth and seventh scale degree which gives us the following.
A natural minor scale. A B C D E F G
You can see that these are the same notes as we find in C major (C D E F G A B), the only difference is the starting note. From this it's easy to see why they relate to each other. The relative minor of C major is A and the relative major of A minor is therefore C.
This similarity between the relative scales also means they happen to share the same chords. Chords belonging to the key of C major will be the same set of chords that belong to the key of A minor. The only difference is the order they are presented. As we've discussed already, In major keys the chord order is maj min min maj maj min dim. In the minor key the order becomes min dim maj min min maj maj. So even though both keys share the same set of chords, the chord progressions will be different. For instance, a I IV V progression in C major is C F G. In A minor it becomes Am Dm Em. You can see this by comparing the charts below.
|C Maj||D Min||E Min||F Maj||G Maj||A Min||B Dim|
|A Min||B Dim||C Maj||D Min||E Min||F Maj||G maj|
We need to divert our attention a little for a moment before we can understand the why the harmonic minor and melodic minor scales came about in the first place. I'm not going to give a detailed explanation about cadences, we'll just brush over the main points. More information can be found at wikipedia about the cadence.
Generally speaking, the cadence is what reinforces the home key and mostly refers to the V-I transition in a chord progression. In the major scale, the last note is one semitone below the root and it's called the leading tone, as the name suggests, it leads nicely into the tonic (root note). In the key of C major it is the B note. The "five chord" in a major key contains this leading tone and has a strong pull back to the tonic. This strengthens and highlights the key. In the key of C, the G sounds like it wants to resolve back to C. If we make the five chord dominant (G7) then this "pull" becomes even stronger.
The leading tone in the natural minor scale however is a whole tone below the root and it doesn't have such a strong pull. For composers this makes it a bit harder to really establish the key. The five chord in a minor key doesn't have the same effect as it does in a major key because the leading tone is not as close to the tonic. You can easily try this yourself. Play a i iv v progression in the key of A minor. The chords are Amin Dmin and Emin. The five chord (Emin) sounds Ok and resolves reasonably well back to the A minor but it's still fairly weak sounding.
The solution to improving this weaker sounding cadence in minor keys is to raise the leading tone of the natural minor by a half step which results in a stronger pull back to the tonic. Using A natural minor as an example, this would mean making the G become G# which in turn will make the E minor chord, or the V chord, become E major. This raised seventh gives us a new scale formula 1 2 b3 4 5 b6 7 and we call it the harmonic minor scale.
It's now that things start to get a little bit complicated. This raised seventh creates a three semitone interval from the sixth scale degree. Although this might not be a problem in modern music, years ago it was considered unnatural and non melodic.
The answer to the above problem was to also raise the sixth scale degree to eliminate the large interval created by raising the seventh. This led to a smoother sounding scale, making it easier to create natural flowing melodies. The scale formula for the melodic minor is therefore 1 2 b3 4 5 6 7.
This whole idea came about so as to make the leading tone have a stronger pull back to the tonic. This means that it's only important when the melody was ascending in pitch, when descending it doesn't have the same effect. The end result was to use the melodic minor while ascending and then revert back to the natural minor when descending.
As usual things adapt over time and these days our ears are more used to hearing music in many different flavours. Minor keys now tend to be a bit of a mix, anything goes really and all three of the minor scales can get used in the same piece of music. The melodic minor doesn't see a lot of use in average popular music, mostly jazz. The natural minor is still the most commonly used for minor keys and you will often hear the harmonic minor used for the V - I cadence.
For an example, a very common minor chord progression is the i - bVII - bVI - V. In the key of A minor you might recognise these chords used in many songs, A min, G maj, F maj, E maj. This chord progression is all in natural minor except for the V chord (E maj) which temporarily switched to harmonic minor for the V-i cadence. If you were to solo or create melodies for this progression then you would use the harmonic minor scale over the E chord and natural minor for the rest.