# Why does a square wave in frequency domain have less amplitude?

For a square wave in time domain to frequency domain, the amplitude decreases, as shown in the spectrum image below.

I dont understand why the amplitude decreases. In the time domain, it looks constant to me. Hard for to reason out. I just know that the amplitude decreases but not in the time domain.

Great explanations will help me a lot. • I'm not sure what you're asking? What do you not understand here? – Hearth Mar 29 at 0:50
• I just edited the question. I dont understand why the amplitude decreases in the spectrum? In time domain, the square wave is constant. – user3026526 Mar 29 at 0:56
• Why would you expect the overall shape of a Fourier transform or Fourier series to be the same as that of the original time domain signal? The Fourier series of a sinusoid is a single spectral line at the frequency of the sinusoid. – Chu Mar 29 at 1:41
• Time domain and frequency domain graph are totally different. Suppose you have 2Hz 10 volt signal (pure sine), and 3 hz 50 volt signal. In the frequency domain graph frequency will be plotted in x axis and amplitude in y axix. So, at point 2 on x axis the value of Y axis will be 10, and at point 3 on x-axis the value of y will be 50. The fourier transform indicates the magnitude of the sine waves those have created this square wave. – Sadat Rafi Mar 29 at 17:35

Any repeating waveform can be constructed from a series of sines of integer multiples of the fundemental frequency of the waveform. These are the harmonics. Using Fourier expansion with cycle frequency f over time t, an ideal square wave with an amplitude of 1 can be represented as an infinite sum of sinusoidal waves of odd harmonics of the fundemental. This is represented graphically in the animation below. Figure 1. This fabulous illustration of the Fourier Transform by Lucas V. Barbosa on Wikipedia's Fourier transform page shows the transformation of a periodic waveform from the time domain to the frequency domain. The frequency plot shows the relative strength of the harmonics with clarity that could not be obtained from staring at the time plot.

• It should be apparent that the more square the time domain waveform is then the more harmonics you will have and these should be visible in the frequency domain.
• It should also be clear that the amplitude decreases with the increasing frequency.
• Hi All,it answers my curiosity. I love the animation that explains very well about the harmonics. – user3026526 Mar 29 at 10:36
• How did you draw that 🤔 your graph has described the fourier transform in the most simplest way. – Sadat Rafi Mar 29 at 17:38
• I didn't draw it and have given credit to the author. It was an eye-opener for me. – Transistor Mar 29 at 17:42

Look at this animation. You will see why the reduction in the amplitude of each harmonic is required. Also look at the impact of even harmonics on the shape of the signal.

There are numerous websites and video animations that demonstrate this concept, for example:

What is a Fourier Series? (Explained by drawing circles) - Smarter Every Day 205

You wrote "In frequency domain the amplitude decreases"

That "decreases" obviously means that in the left in your spectrum diagram the peaks are higher and in the right they are lower.

But the spectrum diagram doesn't present any evolution during the time, it simply states that there's a set of continuous sine voltages which have always existed and will stay unchanged from now to eternity.

Just the square wave happens to be a sum of continuous infinitely long lasting sinewaves with coarsely the following amplitude rule: The higher the frequency, the lower the amplitude". But that's the comparison of the simultaneous amplitudes, not something which decreases along the time.

The spectrum is a receipe which shows how arbitary signals can be theoretically constructed by summing continuous sinewaves. The summing means the same as connecting in series sinusoidal voltage sources like in the next image: Here are only 4 sinewaves (=frequency components) and the set of possible waveforms is limited. To generate an arbitary waveform infinite number of sinewaves is a must, but with reduced accuracy a finite, even a practical number is enough as MP3 music files and JPG photos literally prove.

BTW. If infinite number of quantities are summed and the result is something solid and finite, the only possibility for this is that the summed quantities, when ordered to any order and indexed, the quantities finally get smaller as the index grows. Think for ex number 1/9. As decimal it's 0,1111... The spectrum of the ideal squarewave contains infinite number of components. When ordered by growing frequency the general level must be smaller as the frequency grows.

The FFT is a correlation, from N=1 to some larger number.

The math that computes the amplitude uses a 1/N coefficient.