Three (Allegro con spirito, Andante con espressione, Rondeau – Allegro)
Wolfgang Amadeus Mozart's Piano Sonata No. 9 in D major, K. 311 / 284c, was written on the composer's stay in Augsburg and Mannheim in November-December 1777, and is contemporaneous with his Sonata No. 7 in C Major K. 309 (Mozart wrote his Sonata K. 310 in the summer of the following year, in Paris). The three sonatas K. 309–311 were published as a set 'Opus IV' in about 1782, by Franz Joseph Heina in Paris.
The second movement has an episodic structure A–B–A–B–A–coda. The second theme's melody is gently decorated with syncopation, accompanied by broken chords in the left hand. This key is G major, the subdominant of D major.
Lastly, the most technically demanding movement of the three is a sonata rondo, with a short central episode in B minor (the main key's relative minor). A slow cadenza-like passage containing a rapid ascending chromatic scale leads back to the first theme. In this passage the beginnings of the main theme of the famous second movement of the Piano Concerto No. 21 in C Major, K. 467, can be heard emerging - 8 years before he wrote it in 1785.
References
Irving, John (1997). Mozart's Piano Sonatas: Contexts, Sources, Style. Cambridge: Cambridge University Press. ISBN0-521-49631-4.