The Art of Fugue, or The Art of the Fugue (), BWV 1080, is an incomplete musical work of unspecified instrumentation by Johann Sebastian Bach. Written in the last decade of his life, The Art of Fugue is the culmination of Bach's experimentation with monothematic instrumental works.

This work consists of fourteen fugues and four canons in D minor, each using some variation of a single principal subject, and generally ordered to increase in complexity. "The governing idea of the work", as put by Bach specialist Christoph Wolff, "was an exploration in depth of the contrapuntal possibilities inherent in a single musical subject." The word "contrapunctus" is often used for each fugue.

The Art of Fugue

Sources

Mus. ms. autogr. P 200

The earliest extant source of the work is an autograph manuscript possibly written from 1740 to 1746, usually referred by its call number as Mus. ms. autogr. P 200 in the Berlin State Library. Bearing the title Die / Kunst der Fuga / di Sig[nore] Joh. Seb. Bach, which was written by Bach's son-in-law Johann Christoph Altnickol, followed by (in eigenhändiger Partitur) written by , the autograph contains twelve untitled fugues and two canons arranged in a different order than in the first printed edition, with the absence of Contrapunctus 4, Fuga a 2 clav (two-keyboard version of Contrapunctus 13), Canon alla decima, and Canon alla duodecima.

The Art of Fugue

The autograph manuscript presents the then-untitled Contrapuncti and canons in the following order: [Contrapunctus 1], [Contrapunctus 3], [Contrapunctus 2], [Contrapunctus 5], [Contrapunctus 9], an early version of [Contrapunctus 10], [Contrapunctus 6], [Contrapunctus 7], Canon in Hypodiapason with its two-stave solution Resolutio Canonis (entitled Canon alla Ottava in the first printed edition), [Contrapunctus 8], [Contrapunctus 11], Canon in Hypodiatesseron, al roversio e per augmentationem, perpetuus presented in two staves and then on one, [Contrapunctus 12] with the inversus form of the fugue written directly below the rectus form, [Contrapunctus 13] with the same rectus–inversus format, and a two-stave Canon al roverscio et per augmentationem—a second version of Canon in Hypodiatesseron.

The Art of Fugue

Mus. ms. autogr. P 200, Beilage

Bundled with the primary autograph are three supplementary manuscripts, each affixed to a composition that would appear in the first printed edition. Referred to as Mus. ms. autogr. P 200/Beilage 1, Mus. ms. autogr. P 200/Beilage 2, and Mus. ms. autogr. P 200/Beilage 3, they are written under the title Die Kunst / der Fuga / von J.S.B.

Mus. ms. autogr. P 200, Beilage 1 contains a final preparatory revision of the Canon in Hypodiatesseron, under the title Canon p[er] Augmentationem contrario Motu crossed out. The manuscript contains line break and page break information for the engraving process, most of which was transcribed in the first printed edition. Written on the top region of the manuscript is a note written by Johann Christoph Friedrich Bach:

Mus. ms. autogr. P 200, Beilage 2 contains two-keyboard arrangements of Contrapunctus 13 inversus and rectus, entitled Fuga a 2. Clav: and Alio modo Fuga a 2 Clav. in the first printed edition respectively. Like Beilage 1, the manuscript served as a preparatory edition for the first printed edition.

Mus. ms. autogr. P 200, Beilage 3 contains a fragment of a three-subject fugue, which would be later called Fuga a 3 Soggetti in the first printed edition. Unlike the fugues written in the primary autograph, the Fuga is presented in a two-stave keyboard system, instead of five individual staves for each voice. The fugue abruptly breaks off on the fifth page, specifically on the 239th measure and ends with the note written by Carl Philipp Emanuel Bach: "." ("At the point where the composer introduces the name BACH [for which the English notation would be B–A–C–B] in the countersubject to this fugue, the composer died.") The following page contains a list of errata by Carl Philipp Emanuel Bach for the first printed edition (pages 21–35).

First and second printed editions

The first printed version was published under the title Die / Kunst der Fuge / durch / Herrn Johann Sebastian Bach / ehemahligen Capellmeister und Musikdirector zu Leipzig. in May 1751, slightly less than a year after Bach's death. In addition to changes in the order, notation, and material of pieces which appeared in the autograph, it contained two new fugues, two new canons, and three pieces of ostensibly spurious inclusion. A second edition was published in 1752, but differed only in its addition of a preface by Friedrich Wilhelm Marpurg.