Fourier Series & the Fourier Transform

Mathematics Lesson 13 Waves & Analysis ~30 min

Every sound you hear, every image on your screen, and every MRI scan in a hospital is secretly made of sine waves. Joseph Fourier discovered that any repeating wave — no matter how complex — can be built by adding up simple sine and cosine waves. This idea transformed mathematics, physics, and engineering.

👨‍🔬 Who Was Joseph Fourier?

🌡️
Jean-Baptiste Joseph Fourier
1768 – 1830 · French Mathematician & Physicist
Fourier was born to a tailor in Auxerre, France, and orphaned at age nine. He rose to become a professor, accompanied Napoleon to Egypt, and eventually became one of the most influential mathematicians who ever lived.
1807
On the Propagation of Heat in Solid Bodies Fourier submits a groundbreaking paper to the French Academy of Sciences showing that heat flow can be described by trigonometric series. Reviewers Lagrange and Laplace are skeptical.
1822
Théorie analytique de la chaleur After fifteen years of refinement, he publishes his masterwork — The Analytical Theory of Heat. It introduces the Fourier Series and reshapes mathematical physics forever.
1965
The Fast Fourier Transform (FFT) Cooley & Tukey publish an algorithm that computes Fourier transforms millions of times faster. It becomes arguably the most important numerical algorithm of the 20th century.
Today
Everywhere Fourier's ideas are in your phone's audio codec, your WiFi signal, every JPEG photograph, and every CT scanner and MRI machine on Earth.

Fourier's key insight started with a humble problem: how does heat spread through a metal bar? To solve it, he needed to describe an arbitrary temperature distribution, which led him to ask: can any function be written as a sum of sines and cosines? The answer — yes — launched a revolution in mathematics that we still live inside today.

🔊 What Is a Fourier Series?

A Fourier Series expresses a periodic function as an infinite sum of sine and cosine waves — each at a different frequency and amplitude. Think of it as musical harmony: a complex chord is really just multiple pure tones sounding at once.

f(x) = a₀/2 + Σ [ aₙ cos(nx) + bₙ sin(nx) ] where aₙ and bₙ are computed from the shape of f(x) using integration

The coefficients aₙ and bₙ tell you how much of each frequency is present. They're computed by multiplying the function by a sine or cosine and integrating — a process that acts like a "frequency detector."

Building a Square Wave

The classic demonstration is the square wave. A perfect square wave jumps instantly between +1 and −1 — the complete opposite of a smooth sine wave. Yet Fourier proved it can be built from sines alone:

square(x) = (4/π) · [ sin(x) + sin(3x)/3 + sin(5x)/5 + sin(7x)/7 + … ] only odd harmonics, amplitudes shrink as 1/n — more terms → sharper corners

Each term adds one more "harmonic." The fundamental (n=1) sets the pitch. The 3rd harmonic (n=3) sharpens the corners. The 5th, 7th, 9th… each add more detail. With infinitely many terms, you get a perfect square wave.

n = 1
Fundamental
The base sine wave — sets the frequency of the wave.
n = 3
3rd Harmonic
3× the frequency, ⅓ the amplitude. Starts flattening the top.
n = 5
5th Harmonic
5× the frequency, ⅕ the amplitude. Corners sharpen further.
n → ∞
Infinite sum
Converges to a perfect square wave (except at the jump — see Gibbs below).
The Gibbs Phenomenon: Near a sharp jump, the Fourier Series always overshoots by about 9%, no matter how many terms you add. This isn't a flaw — it's a fundamental mathematical property showing that sharp discontinuities require infinite bandwidth.
🎛️ Interactive Lab

Waveform Builder

Choose a target waveform, then watch as harmonics stack up to recreate it. Drag the slider to add more terms and see the Fourier Series converge in real time.

1
1.5×
Component Waves (each harmonic separately)
Fourier Sum vs Target
1 HARMONICS ACTIVE
APPROX. ERROR %
Square TARGET WAVE
sin(x) CURRENT SERIES

∫ From Series to Transform

The Fourier Series works for periodic functions (ones that repeat forever). But what about a single drum hit, a spoken word, or the EKG of one heartbeat? For these, we need the Fourier Transform.

Fourier Series
Periodic Functions

Decomposes a repeating wave into a discrete set of frequencies — only specific harmonics (n=1, 2, 3…) are present. Input: a periodic function. Output: a list of amplitudes and phases.

Fourier Transform
Any Function

Decomposes any signal — even a one-time event — into a continuous frequency spectrum. Input: any function of time. Output: a continuous function of frequency.

F̂(ξ) = ∫₋∞^∞ f(x) · e^(−2πiξx) dx The transform: multiply f(x) by a spinning complex exponential and integrate over all time

The key identity e = cos(θ) + i·sin(θ) (Euler's formula) shows that the complex exponential is really just a sine and cosine together. The Fourier Transform is essentially asking: "for each possible frequency ξ, how much of that frequency is in my signal?"

Time Domain vs Frequency Domain

The Fourier Transform lets us switch between two equivalent views of the same signal:

  • Time domain — the signal as it changes over time (what you see on an oscilloscope).
  • Frequency domain — the signal broken into its component frequencies (what you see on an equalizer).

Neither view is more "real" than the other — they contain identical information, just arranged differently. Many problems that are complicated in the time domain become simple in the frequency domain (and vice versa).

The Fast Fourier Transform (FFT): Computing a Fourier Transform directly requires O(n²) operations. In 1965, Cooley and Tukey published an algorithm that does it in O(n log n) — making it feasible for real-time audio, video, and telecommunications. The FFT is why your phone can process voice, compress photos, and stream music simultaneously.

🌍 Real-World Applications

Fourier's mathematics is everywhere in modern technology. Here are some of the most important applications:

🎵
Audio & Music
MP3 compression uses the Discrete Cosine Transform (a relative of Fourier's) to store only the perceptually important frequencies, cutting file size by 90%.
🏥
MRI Scanning
MRI machines record signals in "k-space" (frequency domain). An inverse Fourier Transform reconstructs the actual anatomical image that doctors read.
🖼️
JPEG Images
Every JPEG photograph is split into 8×8 pixel blocks and Fourier-transformed. Only the dominant frequencies are saved, discarding imperceptible detail.
📡
WiFi & 5G
OFDM (Orthogonal Frequency Division Multiplexing) uses the FFT to pack data into hundreds of overlapping frequency carriers, maximizing bandwidth efficiency.
🌍
Seismology
Geologists decompose earthquake seismograms into frequencies to identify fault types, locate epicenters, and probe Earth's internal structure.
🔭
Astronomy
Radio telescopes use Fourier transforms to reconstruct images of distant galaxies from interference patterns recorded across arrays of antennas.

✅ Quick Quiz

1. What was the original problem that led Fourier to develop his series?

2. A square wave's Fourier Series uses only which harmonics?

3. What is the key difference between a Fourier Series and a Fourier Transform?

4. Which example is least likely to require a Fourier Transform?

5. The Gibbs phenomenon refers to what behavior near a sharp discontinuity?