Mondrian was exposed to jazz music while living in Paris and was inspired by the improvisational nature of the music and its emphasis on rhythm and harmony. He sought to incorporate these elements into his art and can be seen in the way that he used color, shape, and line in his paintings to create a sense of movement and energy.