The relationship of one musical pitch to another is a mathematical relationship. Different pitches interact in different ways, depending on the frequency of the sound waves that create them. Those mathematical relationships are the basis of the musical scales that have dominated Western music since the Renaissance.
When a string is plucked, the ensuing vibrations create sound waves. A faster rate of vibration produces a higher pitch, while slower vibrations produce a lower pitch. If the string is made half as long, the rate of vibration doubles, producing a pitch that sounds nearly identical to the original pitch, only higher. The interval between these two pitches is called an octave. Middle C, for example, vibrates at approximately 262 hertz. The C one octave above middle C vibrates at about 523 hertz, a 2:1 ratio reflective of the proportional division of the string. Other ratios produce other intervals; for instance, a 3:2 ratio produces a perfect fifth, and a 4:3 ratio produces a perfect fourth. Simpler ratios produce more-harmonious intervals, while more complicated ratios produce more dissonant intervals. A 45:32 ratio, for example, produces a diminished fifth or a tritone, commonly considered the most dissonant interval in diatonic music. Mathematical ratios are found in other aspects of music as well. The tempo of a piece of music is determined by the ratio of beats per minute, while the meter is described in terms of beats per measure. Every rhythmic element of a piece of music can be described in terms of subdivisions of time, all of which produce some sort of mathematical ratio.