The Musical Offering, BWV 1079, is a collection of keyboard canons and fugues and other pieces of music by Johann Sebastian Bach, all based on a single musical theme given to him by Frederick the Great, to whom they are dedicated. They were published in September 1747. The Ricercar a 6, a six-voice fugue which is regarded as the high point of the entire work, was put forward by the musicologist Charles Rosen as the most significant piano composition in history. This ricercar is also occasionally called the Prussian Fugue, a name used by Bach himself.
The Flute Concert of Sanssouci by Adolph Menzel, 1852, depicts Frederick playing the flute in his music room, with C. P. E. Bach accompanying him on a harpsichord-shaped piano by Gottfried Silbermann.
In classical music, a fugue is a contrapuntal, polyphonic compositional technique in two or more voices, built on a subject that is introduced at the beginning in imitation, which recurs frequently throughout the course of the composition. It is not to be confused with a fuguing tune, which is a style of song popularized by and mostly limited to early American music and West Gallery music. A fugue usually has three main sections: an exposition, a development, and a final entry that contains the return of the subject in the fugue's tonic key. Fugues can also have episodes—parts of the fugue where new material is heard, based on the subject—a stretto, when the fugue's subject "overlaps" itself in different voices, or a recapitulation. A popular compositional technique in the Baroque era, the fugue was fundamental in showing mastery of harmony and tonality as it presented counterpoint.
The six-part fugue in the "Ricercar a 6" from The Musical Offering, in the hand of Johann Sebastian Bach
Example of a tonal answer in J.S. Bach's Fugue No. 16 in G minor, BWV 861, from the Well-Tempered Clavier, Book 1. The first note of the subject, D (in red), is a prominent dominant note, demanding that the first note of the answer (in blue) sound as the tonic, G.
The interval of a fifth inverts to a fourth (dissonant) and therefore cannot be employed in invertible counterpoint, without preparation and resolution.
Visual analysis of J.S. Bach's Fugue No. 2 in C minor, BWV 847, from the Well-Tempered Clavier, Book 1 (bars 7–12)