Many songs in major keys use notes and chords that are outside of the key.
In blues music, the tonic (I) and subdominant (IV) chords are straight forward seventh chords rather than the major 7th chords you would expect (see the 7ths table above).
Note that what I referred to as the straightforward 7th chords, (As opposed to major 7ths or minor 7ths) are commonly known as dominant 7ths, even if they’re not actually on the dominant scale degree. Don’t confuse “a” dominant 7th chord with “the” dominant 7th chord.
In a blues song in the key of C major- Chord I (the tonic) will be C7 (consisting of notes C, E, G & B flat) and chord IV (the subdominant) will be F7 consisting of notes (F, A C & E flat). Those notes B flat and E flat don’t belong to the key of C major, but are necessary for the bluesy sound.
This refers to borrowing chords from another (parallel) mode (i.e., one that shares the same tonic). Usually this is the parallel minor key. So a song in C major may borrow chords from the key of C minor, such as B flat major and F minor. (Chords in minor keys are formed in exactly the same way as in major keys, i.e combining scale notes separated by 3rds).
Although the tonic chord is normally heard as the main chord that the others relate to, it’s possible to tonicise any other major or minor chord (i.e., make it sound like the tonic chord of a new key).This is done by preceding it with the chord that would be the dominant 7th of that new key.
Look at this common progression in the key of C major
C – Am – Dm7 – G – G7 – C
In Roman numerals, this would be shown as: I – vi – ii7 – V – V7 – I
If we replace D minor 7th with D7, we’re using a chord that is outside of the key of C major (because D7 contains the note F sharp, which isn’t in the C major scale).
C – Am – D7 – G – G7 – C
That D7 chord however, happens to be the dominant 7th chord of the key of G major and placing it just before the chord G major, means it will have a strong pull to it and will force us to hear the G major chord in a different way. We’ll hear it as the tonic chord in the key of G major, sounding stable and balanced, rather than it’s real job as the dominant chord of C major. This is a common device for actually changing key (modulating). In our example above, the D7 briefly tonicises the G major chord, but the next chord G7, (which is the dominant 7th of C major but foreign to the key of G major) cancels that effect and reasserts C major as the true key. The Roman numerals for that progression are:
I – vi – V7/V – V – V7 – I
V7/V has replaced chord ii. It means: the dominant seventh chord of the key that corresponds with scale degree V.