A scherzo (plural scherzi) is a name given to a piece of music or a movement from a larger piece such as a symphony. The word means "joke" in Italian. Sometimes the word scherzando is used in musical notation to indicate that a passage should be played in a playful manner.
The scherzo developed from the minuet, and gradually came to replace it as the third (or sometimes second) movement in symphonies, string quartets, sonatas, and similar works. It traditionally retains the 3/4 time signature and ternary form of the minuet, but is considerably quicker. It is often, but not always, of a light-hearted nature. A few examples of scherzi exist which are not in the normal 3/4 time, such as in Beethoven's Piano Sonata No. 18. The scherzo itself is a rounded binary form (a first theme is established, sometimes modulates to a related key such as the dominant or the relative major/minor, a second theme follows in the new key, and the piece is closed by a thematic return to the first theme); but, like the minuet, is usually played with the accompanying Trio followed by a repeat of the Scherzo, creating the ABA or ternary form. This is sometimes done twice or more (ABABA). The "B" theme is a trio, a lighter passage for fewer instruments. It is not necessarily for only three instruments, as the name implies, except in early Baroque music.
Joseph Haydn wrote minuets which are very close to scherzi in tone, but it was Ludwig van Beethoven and Franz Schubert who first used the form widely, with Beethoven in particular turning the polite rhythm of the minuet into a much more intense — and sometimes even savage — dance.
Most of Beethoven's scherzi such as that of the Beethoven Symphony No. 6 Pastoral symphony contain two appearances of the trio, in which the second is sometimes varied and after the second of which the scherzo material often returns much foreshortened by way of a coda. Schumann, as noted by Cedric Thorpe-Davie would very often use two trios also, but different trios.
The scherzo remained a standard movement in the symphony and related forms through the 19th century. Composers also began to write scherzi as pieces in themselves, stretching the boundaries of the form. Frédéric Chopin's four well-known scherzi for the piano are dark and dramatic, and hardly come off as jokes. Robert Schumann remarked of them, "How is gravity to clothe itself if jest goes about in dark veils?"
An unrelated use of the word in music is in light-hearted madrigals of the Renaissance period, which were often called scherzi musicali. Claudio Monteverdi, for example, wrote two sets of works with this title, the first in 1607, the second in 1632.