This is the basis of Fourier analysis. A square wave consists of a fundamental sine wave (of the same frequency as the square wave) and odd harmonics of the fundamental. The amplitude of the harmonics is equal to 1/N where N is the harmonic (1, 3, 5, 7…).