Sonata form got its name decades after Haydn and Mozart had perfected it
Haydn and Mozart wrote the model examples of sonata form in the late 18th century, yet no theorist of their day used that name. The textbook template came later, built by 19th-century writers who studied Beethoven's piano sonatas, and scholars have quarrelled over the label ever since.
At its simplest the form has three parts. The exposition lays out the main material, usually a first group of themes in the home key and a second group in a contrasting key, often the dominant, joined by a transition that shifts between them. The development then pulls those ideas apart, sends them through distant keys and recombines them. The recapitulation brings everything back in the tonic, so that music first heard in the foreign key is resolved at home. A slow introduction may come before, and a coda after.
Because the opening movement of a three- or four-movement symphony, quartet or concerto typically uses it at an allegro pace, it also goes by first-movement form or sonata-allegro form. It is not the same thing as a sonata. That word, from the Italian for to play, just as cantata comes from to sing, names a whole piece, while sonata form describes the plan of a single movement. The Grove Dictionary ranks it as the central organising principle of musical form from the Classical era deep into the 20th century.
Heinrich Christoph Koch described the type in 1793, but like earlier German theorists he dwelt on its route through keys and its main cadences rather than on its themes, which makes it look like a descendant of binary form. The theme-centred model taught today was set out by Anton Reicha in 1826, Adolf Bernhard Marx in 1845, who may have coined the term, and Carl Czerny in 1848.
Actual pieces rarely obey the template, which is why Charles Rosen preferred to speak of sonata forms in the plural. Haydn often wrote monothematic expositions, reusing one theme in both keys. Mozart's Piano Sonata K. 545 brings its first theme back in the wrong key, and Beethoven's Third Symphony stretches the coda into something like a second development. By the Romantic era, composers such as Mahler, Elgar and Sibelius bent the outline so far that it no longer fits their music well. Today it serves as a tool for analysis rather than a recipe composers set out to follow.
Source: Sonata form