|Relative key||B minor|
|Parallel key||D minor|
|Dominant key||A major|
|D, E, F♯, G, A, B, C♯|
D major (or the key of D) is a major scale based on D, consisting of the pitches D, E, F♯, G, A, B, and C♯. Its key signature has two sharps. Its relative minor is B minor and its parallel minor is D minor.
The D major scale is:
D major is well-suited to violin music because of the structure of the instrument, which is tuned G D A E. The open strings resonate sympathetically with the D string, producing a sound that is especially brilliant. This is also the case with all other orchestral strings.
Thus, it is no coincidence that many classical composers throughout the centuries have chosen to write violin concertos in D major, including those by Mozart (No. 2, 1775, No. 4, 1775); Ludwig van Beethoven (1806); Paganini (No. 1, 1817); Brahms (1878); Tchaikovsky (1878); Prokofiev (No. 1, 1917); Stravinsky (1931); and Korngold (1945).
The key is also appropriate for guitar music, with drop D tuning making two D's available as open strings. For some beginning wind instrument students, however, D major is not a very suitable key, since it transposes to E major on B♭ wind instruments, and beginning methods generally tend to avoid keys with more than three sharps.
Even so, the clarinet in B♭ is still often used for music in D major, and it is perhaps the sharpest key that is practical for the instrument. There are composers however who, in writing a piece in D minor with B♭ clarinets, will have them change to clarinets in A if the music switches to D major, two examples being Rachmaninoff's Third Piano Concerto and Beethoven's Ninth Symphony in the fourth movement.
In the Baroque period, D major was regarded as "the key of glory"; hence many trumpet concertos were in D major, such as those by Johann Friedrich Fasch, Gross, Molter (No. 2), Leopold Mozart, Telemann (No. 2), and Giuseppe Torelli. Many trumpet sonatas were in D major, too, such as those by Corelli, Petronio Franceschini, Purcell, and Torelli. "The Trumpet Shall Sound" and the "Hallelujah" chorus from Handel's Messiah, and his coronation anthem Zadok the Priest are in D major. In addition, Bach's Mass in B minor has D major as the relative major, and most of the major choruses in this key (Gloria, Cum Sancto Spiritu, Sanctus, Hosanna) make extensive use of trumpets.
23 of Haydn's 104 symphonies are in D major, making it the most-often used main key of his symphonies. The vast majority of Mozart's unnumbered symphonies are in D major, namely K. 66c, 81/73, 97/73m, 95/73n, 120/111a and 161/163/141a. The symphony evolved from the overture, and "D major was by far the most common key for overtures in the second half of the eighteenth century." This continued even into the Romantic Period, and was used for the "triumphant" final movements of several D minor symphonies, including Beethoven's Ninth Symphony, Robert Schumann's Fourth Symphony, the only symphony by César Franck, Sergei Rachmaninoff's First Symphony, and Felix Mendelssohn's Fifth Symphony.
Famous symphonies written in D major include Mozart's symphonies No. 31 (Paris) and No. 38 (Prague), Beethoven's No. 2 Op. 36, Brahms's No. 2 Op. 73, Sibelius's No. 2 Op. 43, Mahler's No. 9 (though it ends in the remote key of D-flat major) and Prokofiev's No. 1 (Classical) Op. 25.
The key of triumph, of Hallelujahs, of war-cries, of victory-rejoicing.