Johann Sebastian Bach

The Contrapuntal Labyrinth and the Well-Tempered Key
Johann Sebastian Bach

On the evening of May 7, 1747, in the candlelit music room of the royal palace at Potsdam, the flute-playing monarch Frederick the Great of Prussia stopped his court orchestra in mid-phrase. The King had been handed a guest list and turned excitedly to his musicians with the words: 'Gentlemen, old Bach is arrived.' Johann Sebastian Bach, the sixty-two-year-old Cantor of St. Thomas Church in Leipzig, was ushered into the royal presence. Frederick had assembled a collection of novel fortepianos constructed by Gottfried Silbermann and invited the old master to try them. Then, the King sat at the keyboard and played a complex, jagged, chromatic theme—the Thema Regium—demanding that Bach improvise a three-part fugue upon it on the spot.

Bach bowed, sat at the unfamiliar instrument, and wove the thorny royal theme into an immaculate three-part fugal tapestry with effortless fluency. But Frederick pressed further: could Bach improvise a six-part fugue on the same subject? A six-part fugue is one of the most terrifying challenges in musical mathematics: six independent melodic voices moving simultaneously through horizontal time, each obeying the strict harmonic laws of vertical consonance, each subject to inversion, retrograde, augmentation, and diminution without parallel fifths or octaves destroying the acoustic purity. Bach demurred, promising to work out the composition on paper. Returning to Leipzig, he produced the Musical Offering: a monumental suite of canons, sonatas, and a titanic six-part Ricercar that exhausted the structural permutations of the King's theme.


In that six-part Ricercar, Bach demonstrated what his contemporaries had begun to forget: counterpoint is not an acoustic ornament; it is a rigorous, multidimensional architecture. The musical fashion of the mid-eighteenth century was shifting rapidly toward the galant style: light, simple, homophonic melodies accompanied by repetitive chords, designed for pleasant courtly diversion. Bach's sons, Carl Philipp Emanuel and Johann Christian, regarded their father as an honorable relic of an obsolete Gothic era—an old wig (der alte Perücke) obsessed with dry mathematical puzzles. But Bach knew that music was an acoustic reflection of the cosmic order. Drawing upon the quadrivium of the ancient liberal arts—where music was paired with arithmetic, geometry, and astronomy—Bach saw notes as numbers in motion.

To prove that all musical keys were viable in a single tuning system, Bach had composed The Well-Tempered Clavier in 1722. In the older mean-tone temperaments, certain pure intervals were prioritized at the cost of making distant keys horribly out of tune—the howling 'wolf fifths' that restricted keyboardists to a handful of keys. Bach championed a well-tempered tuning system that distributed the comma subtly across all twelve fifths. To demonstrate its absolute harmonic freedom, he composed twenty-four preludes and fugues, ascending methodically through every major and minor key from C major to B minor. In doing so, he opened the entire harmonic galaxy to keyboard literature, establishing the tuning system that would underpin Western music for the next three centuries.


Yet the peak of his architectural genius was the Goldberg Variations, published in 1741. Commissioned, legend holds, by Count Kaiserling to soothe his sleepless nights, the work consists of an Aria followed by thirty variations. But Bach did not write ornamental variations upon the melody; he built thirty towering cathedrals upon the ground bass—a repeating 32-bar harmonic progression. Every third variation is a strict canon, beginning at the unison (Variation 3), ascending systematically through the second (Variation 6), the third (Variation 9), the fourth (Variation 12), all the way to the canon at the ninth (Variation 27). In each canon, one voice imitates the other at an exact pitch interval and precise time delay, while an independent running bass line supports the counterpoint. It was an intellectual tour de force: an overarching mathematical pyramid built of pure, transcendent beauty.

In his final years, battling cataracts that left him nearly blind, Bach withdrew from the public world of church cantatas to compose his ultimate testament: Die Kunst der Fuge (The Art of Fugue). It is music stripped of instrument, dynamic markings, and performance tempo: fourteen fugues and four canons, all constructed upon a single, deceptively simple D minor subject. In this abstract polyphonic cathedral, Bach systematically demonstrated every combinatorial operation known to musical science: stretto (voices entering on top of each other before the theme finishes), inversion (the theme turned upside down), augmentation (the theme played at half speed), and diminution (the theme played at double speed).


In the final, unfinished Contrapunctus XIV, Bach constructed a colossal quadruple fugue. The third subject entered with four notes whose pitch names in German notation spell his own family name: B-flat, A, C, B-natural—B-A-C-H. It was the master signing his name into the stone fabric of the cathedral. But at measure 239, as the three complex subjects were about to combine simultaneously with the original royal subject, the manuscript suddenly breaks off into blank staves. Beneath the final bar, his son Carl Philipp Emanuel wrote the heartbreaking note: 'At the point where the composer introduces the name B-A-C-H in the countersubject, the author died.'

Johann Sebastian Bach died in Leipzig in July 1750 at the age of sixty-five, following an agonizing, botched eye surgery by the itinerant English charlatan John Taylor. He was buried in an unmarked grave in the churchyard of St. John's, his music swiftly neglected as the Classical era of Haydn and Mozart dawned.


It was not until 1829, when a twenty-year-old Felix Mendelssohn conducted the St. Matthew Passion in Berlin, that the world began to realize what had been lost. Today, Bach is universally acknowledged as the supreme architect of Western music. In the fields of cognitive science, computer science, and mathematics—immortalized in Douglas Hofstadter's Gödel, Escher, Bach—his fugues and canons are studied as pure recursive algorithms, isomorphic to self-referential mathematical logic and DNA replication.

Johann Sebastian Bach proved that absolute formal discipline is not the enemy of profound emotion, but its ultimate vehicle. Within the strictest constraints of counterpoint, he found infinite freedom, turning the twelve tones of the chromatic scale into an acoustic universe that glorifies the eternal architecture of the mind.


“There's nothing remarkable about it. All one has to do is hit the right keys at the right time and the instrument plays itself.”

“The final aim and reason of all music is nothing other than the glorification of God and the refreshment of the spirit.”

“I was obliged to be industrious. Whoever is equally industrious will succeed equally well.”

“Where there is devotional music, God is always at hand with His gracious presence.”

“Harmony is poetry; but counterpoint is architecture.”


  • Brandenburg Concertos (BWV 1046-1051) 1721
  • The Well-Tempered Clavier, Book I & II (BWV 846-893) 1722, 1742
  • St. Matthew Passion (BWV 244) 1727
  • Goldberg Variations (BWV 988) 1741
  • Musical Offering (BWV 1079) 1747
  • Mass in B Minor (BWV 232) 1749
  • The Art of Fugue (BWV 1080) 1750 (unfinished)