In music theory, **theoretical keys** or **impossible keys** are keys with key signatures that contain one or more double-flats or double-sharps.

Double-flats and double-sharps are used in music as accidentals, but they are rarely placed in the key signature (in music that uses equal temperament), because it would make reading the key signature very difficult.

For example, the key of G♯ major is rarely used to write music down, because its key signature has an Fdouble sharp. An equal-tempered scale of G♯ major has exactly the same notes as the A♭ major scale. Key pairs like this are called enharmonically equivalent. So the theoretical key of G♯ major is usually written with the key signature of A♭ major.

|  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| G♯ major: | G♯ | A♯ | B♯ | C♯ | D♯ | E♯ | Fdouble sharp |
| A♭ major: | A♭ | B♭ | C | D♭ | E♭ | F | G |
|

Enharmonic equivalence
----------------------

Circle of fifths showing major and minor keys
A piece of Western music usually has a home key, and a passage within it may modulate to another key, which is usually closely related to the home key. (Usually, close to the original around the circle of fifths.) When the key is near the top of the circle (a key signature of zero or few accidentals), the writing of both keys is easy- a small number of extra sharps or flats is added. But if the home key is near the bottom of the circle (a key signature with many accidentals), enharmonic equivalence may need to be used because simply adding accidentals will result in a key with too many accidentals to be easy to play or write in.

The need to consider theoretical keys
-------------------------------------

In each of the bottom three places on the circle of fifths the two enharmonic equivalents *can* both be written without double-sharps or double-flats and so do not classify as 'theoretical keys':

| Major (minor) | Key signature |   | Major (minor) | Key signature |
| --- | --- | --- | --- | --- |
| B (G♯) | 5 sharps |   | C♭ (A♭) | 7 flats |
| F♯ (D♯) | 6 sharps |   | G♭ (E♭) | 6 flats |
| C♯ (A♯) | 7 sharps |   | D♭ (B♭) | 5 flats |

But when a relative key is on the opposite side of the circle from its home key, then in theory modulating to that key would involve adding so many sharps or flats that double-sharps and double-flats would have to be written in the key signature. The following keys (six of them are the parallel major/minor keys of those above) would require up to seven double-sharps or double-flats:

| Key | Key Signature | Relative key |
| --- | --- | --- |
| D♭ minor (= C♯ minor) | 8 flats | F♭ major (= E major) |
| G♭ minor (= F♯ minor) | 9 flats | Bdouble flat major (= A major) |
| C♭ minor (= B minor) | 10 flats | Edouble flat major (= D major) |
| F♭ minor (= E minor) | 11 flats | Adouble flat major (= G major) |
| Bdouble flat minor (= A minor) | 12 flats | Ddouble flat major (= C major) |
| Edouble flat minor (= D minor) | 13 flats | Gdouble flat major (= F major) |
| Adouble flat minor (= G minor) | 14 flats | Cdouble flat major (= B♭ major) |
| G♯ major (= A♭ major) | 8 sharps | E♯ minor (= F minor) |
| D♯ major (= E♭ major) | 9 sharps | B♯ minor (= C minor) |
| A♯ major (= B♭ major) | 10 sharps | Fdouble sharp minor (= G minor) |
| E♯ major (= F major) | 11 sharps | Cdouble sharp minor (= D minor) |
| B♯ major (= C major) | 12 sharps | Gdouble sharp minor (= A minor) |
| Fdouble sharp major (= G major) | 13 sharps | Ddouble sharp minor (= E minor) |
| Cdouble sharp major (= D major) | 14 sharps | Adouble sharp minor (= B minor) |

For example, if a piece in E major were to modulate up a fifth to B major, which is next to it on the circle and on the same side of the circle, the notation is clear and simple; an extra sharp is added to make five sharps. If it was modulated again, it would become F♯ major, written with six sharps. The next modulation, to C♯ has seven sharps. But the next modulation would be to a theoretical key of G♯ which would need an eighth sharp- for the previous F♯ note to become Fdouble sharp in the key signature. To avoid theoretical keys, the new section would usually be written in the enharmonically equivalent key signature of A♭ major.

| * v
* t
* e
Diatonic Scales and Keys |
| --- |
| Circle of fifthsCircle of fifths | 

|  | Flats | Sharps |
| --- | --- | --- |
| Major | minor | Major | minor |
| 0 | **C**, **a** |
| 1 | **F** | **d** | **G** | **e** |
| 2 | **B♭** | **g** | **D** | **b** |
| 3 | **E♭** | **c** | **A** | **f♯** |
| 4 | **A♭** | **f** | **E** | **c♯** |
| 5 | **D♭** | **b♭** | **B** | **g♯** |
| 6 | **G♭** | **e♭** | **F♯** | **d♯** |
| 7 | **C♭** | **a♭** | **C♯** | **a♯** |
| 8 | **F♭** | **d♭** | **G♯** | **e♯** |

 |
| The table shows the number of sharps or flats in each scale. Minor scales are written in lower case. |