In music, an invention is a short composition (usually for a keyboard instrument) with two-part counterpoint. (Compositions in the same style as an invention but using three-part counterpoint are known as sinfonias. Some modern publishers erroneously call them "three-part inventions" to avoid confusion with symphonies.) Well-known are the fifteen inventions that make up the first half of Johann Sebastian Bach's Inventions and Sinfonias. Inventions are usually not performed in public, but serve as exercises for keyboard students, and as pedagogical exercises for composition students.
Inventions are similar in style to a fugue, though they are much simpler. They consist of a short exposition, a longer development, and, sometimes, a short recapitulation. The key difference is that inventions do not contain an answer to the subject in the dominant key, whereas the fugue does.
In the exposition, a short motif is introduced by one voice in the tonic key. This is also known as the theme. The subject is then repeated in the second voice in the tonic key while the initial voice either plays a countersubject or plays in free counterpoint.
Some melodic variations consist of:
The development of an invention differs from that of a fugue in that a fugal development contains episodes (variations based more strictly on the theme) whereas the invention is more free-form.
If an invention does have any recapitulation at all, it tends to be extremely short - sometimes only two or four measures. The composer repeats the theme in the upper voice and the piece ends. The repetition of the theme contains very little variation (or no variation at all) on the original theme. The lower line usually plays the countersubject, and if there is no countersubject, plays in free counterpoint.
The invention is primarily a work of Johann Sebastian Bach. Inventions originated from contrapuntal improvisations in Italy, especially from the form of the composer Francesco Antonio Bonporti. Bach adapted and modified the form to what is considered to be a formal invention. Bach wrote 15 inventions (BWV 772-786) as exercises for his son, Wilhelm Friedemann Bach. Bach later wrote a set of 15 three-part inventions and 13 sinfonias (BWV 787-801).