A prelude and fugue is a musical form generally consisting of two movements in the same key for solo keyboard.
In classical music, the combination of prelude and fugue is one with a long history.
The use of this format is generally inspired by Johann Sebastian Bach's two books of preludes and fugues — The Well-Tempered Clavier — completed in 1722 and 1742 respectively.
Bach, however, was not the first to compose such a set: Johann Caspar Ferdinand Fischer wrote a 20-key cycle in his 1702 work Ariadne musica.
A number of composers wrote sets of pieces covering all 24 major and/or minor keys.