The Inventions and Sinfonias (1720; revised 1723) are 30 pieces of keyboard music (15 each in sinfonia and invention) composed by Johann Sebastian Bach. They are sometimes known as the Two and Three Part Inventions. Bach arranged the two groups of pieces in order of ascending key. Each group covers the eight major and seven minor keys. Bach wrote them as exercises and study pieces for his 12 year old son, Wilhelm Friedemann Bach. The 1720 versions are found in the boy's "Little Keyboard Book" of 1722. The invention and sinfonias are often used as preparation for two volumes of Bach's "The Well-Tempered Clavier".