seegongsik
Saved words
SC · Fourier

The Fourier Series

A periodic signal splits into a sum of sinusoids at integer multiples of the fundamental — its harmonics. Watch how adding the harmonics one by one rebuilds the shape of the original square wave.

Add harmonics to build the square wave

The gold dashed curve is the target square wave. The blue curve is the partial sum of a few odd harmonics, and below is the strength of each. Increase the number of harmonics and see how close the partial sum gets to the square wave.

partial sumtarget square wave
harmonic strength bₖ = 4/kπ
number of harmonics
Partial sum and closeness
(4/π) Σ sin(kω₀t)/k, k 1
With only one term it is a single smooth sine. The fundamental alone cannot follow the steep edges of the square wave at all.
One term

A periodic signal is a sum of harmonics

A signal of period T is built only from sinusoids at the fundamental ω₀ = 2π/T and its integer multiples 2ω₀, 3ω₀, …. These integer-multiple components are the harmonics. So any periodic signal is written as a constant term plus a sum of harmonics. Like a musical chord, a fundamental and its overtones combine into one waveform.

Observef(t) = a₀ + Σ [aₖ cos(kω₀t) + bₖ sin(kω₀t)]
A periodic signal is a constant plus a sum of harmonics.
Chooseω₀ = ?
The fundamental frequency is 2π over the period.
Fill inbₖ = ? (k odd)
The square wave sine coefficient is 4/kπ.
On your ownharmonics at ?
Harmonics are integer multiples of the fundamental.

More terms, closer fit

A partial sum is an approximation using only the first few harmonics. Adding terms lets higher-frequency harmonics fill in the steep changes, so the edges sharpen. A square wave has only odd harmonics, and the k-th harmonic’s strength is 4/kπ, shrinking as frequency rises. But for a signal with a discontinuity, the overshoot near the jump does not vanish with more terms — it stays at about 9%. This is the Gibbs phenomenon.

The coefficients are the harmonic strengths

The number in front of each harmonic — its Fourier coefficient — sets how much of that harmonic to mix in. By even/odd symmetry (A4) the square wave is odd, so only sines appear, no cosines, and the even harmonics are 0. Lay these coefficients out by frequency and you get the signal’s spectrum. One waveform in time becomes a few bars in frequency — the subject of the next unit.

Back to the first screen

With one term the partial sum was a lone sine, far from square. Adding odd harmonics steepened the edges and flattened the top toward the square, leaving small Gibbs ears at the jumps that never vanish. The bars below were each harmonic’s strength 4/kπ, shorter at higher frequency. This decomposition of a periodic signal into harmonics is the Fourier series, and standing those bars up on a frequency axis is the spectrum.

The Fourier series writes a signal of period T as a sum of harmonics at integer multiples of the fundamental ω₀ = 2π/T. f(t) = a₀ + Σ [aₖ cos(kω₀t) + bₖ sin(kω₀t)]. Each Fourier coefficient aₖ, bₖ is that harmonic’s strength. The square wave is odd, so only sines remain with bₖ = 4/kπ (odd k) and even harmonics are 0. More terms bring the partial sum closer, but a discontinuity keeps an about 9% overshoot — the Gibbs phenomenon.
On to the next unit

Now that you have seen each harmonic has a strength, it is time to plot those strengths themselves. The next unit, the spectrum, replaces the waveform on the time axis with bars standing on a frequency axis, one per harmonic. Then the square wave appears as a few bars at odd frequencies only. Viewing the same signal in time or in frequency — the two pictures forming one pair — is the heart of Fourier, and it opens there.