The Fugue is a musical form in which the stated subject is followed by an answer, an imitation of the subject, a perfect fifth above or a perfect fourth below it. Interestingly, the subject also continues simultaneously with the answer, providing a contrary melodic line, in harmony, which is now called the counter-subject. A Fugue can have four voices.
The Fugue also uses the mathematical concepts of the Fibonacci numbers & the Golden Ratio. The Fibonacci numbers 1, 3 & 5 are also the semitones used in the C major chord, C, E & G. A piano octave consists of a total of 13 keys, 8 white & 5 black. The ratio of 13/8 is approximately equal to the Golden Ratio of mathematics.
Though it was presumably written for a keyboard instrument, versions featuring a string quartet, orchestra & vocal versions are available.
Though Bach composed his monumental set of "The 48" comprising preludes & Fugues in all the semitones of an octave (12) in both major & minor keys (24) twice over (48), "The Art of Fugue" occupies a special space in his ouvre.