The Inventions and Sinfonias, BWV 772–801, also known as the Two- and Three-Part Inventions, are a collection of thirty short keyboard compositions by Johann Sebastian Bach (1685–1750): 15 inventions, which are two-part contrapuntal pieces, and 15 sinfonias, which are three-part contrapuntal pieces. They were originally written as musical exercises for his students.