A motif is a short, easily recognizable melodic, rhythmic or harmonic idea that is repeated at least once during a work. These repetitions can be the same, or they can be changed in various ways, such as with regard to their instrumentation, tempo, harmony, or key.
Although the two terms are sometimes used interchangeably, a theme differs from a motif in that it is generally longer and is a melodic, rhythmic or harmonic idea that pertains to the work as a whole.
A major type of motif is the leitmotif, which is associated with a particular character, place, or idea in an opera or ballet. Leitmotifs can change in various ways during the course of the work, for example, depending on whether the character is being heroic, in love, in great despair, or elated.