Sonata form is a way of organizing a piece of music. It has been used in several pieces since the Classical period (from the middle of the 18th century onwards). Listening to pieces of music in sonata form will help to understand it fully and it is helpful to know something about the different keys.
Sonata form is not just used in sonatas. It can be the form for movements from symphonies, concertos, overtures etc.
In the Baroque period composers like Bach and Handel wrote pieces with dance movements such as minuets. These were in “binary form”. This meant that there were two sections. The two sections were often the same length, and were separated by a double bar line which meant that each section was repeated. The music would not be in the same key all the time. The first section could modulate (change key) and then the second section would gradually modulate back again so that it sounded finished at the end.
Domenico Scarlatti wrote sonatas for harpsichord also in binary form, but long and with additional complexity. The first section would start with a theme in the main key, and then modulate to another key for contrast. The second section might be longer than the first second, starting off by modulating to remote keys before arriving back to repeat the main theme. This kind of piece is the beginning of sonata form.
Haydn, Mozart and Beethoven developed the idea of sonata form. A movement in sonata form has three sections called: “exposition”, “development” and “recapitulation”.
This way of building a piece of music was used by almost every composer from the mid 18th century onwards – well into the 20th century. It gives scope for a very dramatic piece. Of course, composers sometime use it differently. There is often a sense of development during the whole piece, not just during the so-called “development section”. The first movement of Beethoven’s Fifth Symphony spends all the time developing the famous idea heard at the beginning: the first four notes (short-short-short-long). Even the other three movements carry on developing this idea.
There are many ways of changing the sonata form. One is to have three or more keys in the first section. The first movement of Schubert's "Death and the Maiden" String Quartet had keys in the tonic, relative major, and dominant minor. Another is to remove the development section to create "sonatina form." Sonatina form is often used in slow movements or simpler pieces. It can also be combined with the rondo to create "sonata rondo form," where B theme appears in the same key as the A theme near the end.