For instance, the interval from A to G is a minor seventh (10 semitones wide), and both the intervals from A♯ to G, and from A to G♭ are diminished sevenths (9 semitones wide).
The diminished seventh occurs naturally in every diatonic harmonic minor scale, between the leading note (7th degree or VII) and the submediant (6th degree or VI).
The diminished seventh forms part of the chord of the diminished seventh (in the key of C consisting of the notes B-D-F-A flat). The theoretical explanation of the chord is that it is the chord of the minor ninth (G-B-D-F-A flat) with the root omotted. This chord is particularly serviceable as a pivot for neat and easy modulation on account of its protean versatility (e.g. the B-D-F-A flat mentioned above may be enharmonically changed into B-D-F-G sharp, or B-D-E sharp-G sharp, etc., thus turning it into an inversion of the chord of the diminished seventh in some other key, in which it may be quitted).