Before turning to the composition of string quartets, Beethoven devoted his first years in Vienna to mastering the genres popular in that city: piano sonatas, string trios, duo sonatas for piano and violin or cello, and short songs and opera arias. No doubt Beethoven's apparent trepidation when approaching the string quartet medium was a result of the immense shadow cast by Haydn, whose Opp. 71 and 73 were composed in 1793, the year Beethoven began to study with the older master. Haydn published his six "Erdödy" Quartets, Op. 76, in 1797, and his two quartets of Opus 77 in 1799. To prepare himself for his eventual foray into the genre, Beethoven studied the works of others. In particular, he copied Haydn's Opus 20/1 in 1793-1794, and Mozart's K. 387 and 464 while he was beginning work on Op. 18 The quartets were published 1801 in Vienna, in two sets of three by Mollo & Co. They were not written in their published order, but rather Nos. 3, 1, 2, 5, 4, and 6.
The number of quartets comprising his Opus 18 is but one of Beethoven's nods to tradition, for sets usually included six works. Also, in Nos. 2 and 5, Beethoven seems to confront his predecessors directly, and as a result, moves to another level of composition. In his Opus 18 quartets we find Beethoven both mastering the styles of his predecessors and forging into new territory. For instance, the independence of the four parts is much greater than in the works of his predecessors, which may be attributable to the fact that Beethoven developed his skills during a time freed from the hitherto ubiquitous basso continuo. Despite the numerous recent models, and despite the fact that the String Quartets, Op. 18, are clearly a product of their time, they could not have been written by any composer other than Beethoven. Dedicated to Prince Franz Joseph von Lobkowitz, the six quartets of Op. 18 constitute Beethoven's most ambitious project of his early Vienna years.
The quartet in D major (No. 3) was the first composed. Its opening, with nearly all of the motion in the first violin supported by sustained harmonies, resembles the beginning of Haydn's Quartet, Op. 50/6, also in D major. The first movement begins with an emphasis on the dominant-seventh chord, while the second theme group flirts with the minor dominant, allowing an unusual excursion into C major. The rest of the quartet comprises a conventional movement pattern, but the Presto finale is a sonata, not a rondo. Although it is not labeled as such, the third movement is a minuet, albeit with some unusual, forward-looking touches. For example, the return of the minuet after the trio is not the standard da capo repeat, but is completely written out, with additional repetitions of and variations on the original material.