Fourier Transform

The Math Behind Extracting Signals


#The Core Problem

A real-world signal is almost never a single clean wave. It is a mixture of many frequencies layered on top of each other.

f(t)=sin(2π2t)+sin(2π5t)+sin(2π8t)f(t) = \sin(2\pi \cdot 2t) + \sin(2\pi \cdot 5t) + \sin(2\pi \cdot 8t)

Looking at f(t)f(t) in time, you see one messy wiggle. The question is — how do you pull the individual frequencies back out?


#The Key Idea: Binding Rate

The Fourier Transform works by asking a very specific question for each candidate frequency ω\omega:

"How much does my signal vibrate at exactly this rate?"

It does this by multiplying the signal by a test wave eiωte^{-i\omega t} and integrating:

F(ω)=f(t)eiωtdt\boxed{F(\omega) = \int_{-\infty}^{\infty} f(t) \cdot e^{-i\omega t} \, dt}

The test wave eiωte^{-i\omega t} rotates at frequency ω\omega. When ω\omega matches a frequency inside f(t)f(t), something special happens — the product stops cancelling and the integral accumulates into a spike.


#Why a Spike? The Orthogonality Argument

Two sinusoids at different frequencies are orthogonal — they cancel perfectly over time:

eiω1teiω2tdt=δ(ω1ω2)={ω1=ω20ω1ω2\int_{-\infty}^{\infty} e^{i \omega_1 t} \cdot e^{-i \omega_2 t} \, dt = \delta(\omega_1 - \omega_2) = \begin{cases} \infty & \omega_1 = \omega_2 \\ 0 & \omega_1 \neq \omega_2 \end{cases}

This is the entire mechanism. When the test frequency ω\omega sweeps across all values:

  • No match → product oscillates, positive and negative parts cancel → integral =0= 0
  • Match found → product becomes a constant positive value → integral accumulates → spike at F(ω)F(\omega)

#Worked Through: A Two-Frequency Signal

Take a signal made of two pure tones:

f(t)=A1sin(2πf1t)freq f1+A2sin(2πf2t)freq f2f(t) = \underbrace{A_1 \sin(2\pi f_1 t)}_{\text{freq } f_1} + \underbrace{A_2 \sin(2\pi f_2 t)}_{\text{freq } f_2}

Apply the transform with test frequency ω=2πf1\omega = 2\pi f_1:

F(f1)=A1sin(2πf1t)ei2πf1tdt+A2sin(2πf2t)ei2πf1tdtF(f_1) = \int A_1 \sin(2\pi f_1 t) \cdot e^{-i 2\pi f_1 t}\, dt + \int A_2 \sin(2\pi f_2 t) \cdot e^{-i 2\pi f_1 t}\, dt

=A12i[δ(0)δ(2f1)]survives — frequencies matched+0cancels — f2f1= \underbrace{\frac{A_1}{2i}\Big[\delta(0) - \delta(-2f_1)\Big]}_{\text{survives — frequencies matched}} + \underbrace{0}_{\text{cancels — } f_2 \neq f_1}

The second term integrates to zero. Only the first survives. The output is a spike of height proportional to A1A_1 — the amplitude of that frequency.

Sweep ω\omega across all frequencies and you get the full spectrum:

F(ω)={A1ω=2πf1A2ω=2πf20otherwise|F(\omega)| = \begin{cases} A_1 & \omega = 2\pi f_1 \\ A_2 & \omega = 2\pi f_2 \\ 0 & \text{otherwise} \end{cases}


#The Resonance Analogy

Think of the integral as a resonance detector:

Signal f(t)  ──────┐
                   ├──→  multiply  ──→  integrate  ──→  F(ω)
Test wave e^{-iωt} ┘
  • If test frequency ω\omega does not resonate with anything in f(t)f(t) → output stays near zero
  • If test frequency resonates (matches a component) → energy builds up → spike

This is exactly like pushing a swing. If you push at the wrong rate, nothing happens. Push at the natural frequency and amplitude grows. The Fourier Transform is pushing at every possible frequency and recording where the swing responds.


#The Spike in the Spectrum

For a pure sine f(t)=Asin(2πf0t)f(t) = A\sin(2\pi f_0 t), the spectrum F(ω)|F(\omega)| looks like:

|F(ω)|
  │
A ┤          ▲              ▲
  │          │              │
  └──────────┴──────────────┴──────────→ ω
           -f₀             +f₀

Two symmetric spikes at ±f0\pm f_0. Each spike location = what frequency, spike height = how much of it.

For a composite signal with three components:

f(t)=sin(2π2t)+0.5sin(2π5t)+0.3sin(2π8t)f(t) = \sin(2\pi \cdot 2t) + 0.5\sin(2\pi \cdot 5t) + 0.3\sin(2\pi \cdot 8t)

F(ω)=[ωF2 Hz1.05 Hz0.58 Hz0.3]|F(\omega)| = \begin{bmatrix} \omega & |F| \\ 2 \text{ Hz} & 1.0 \\ 5 \text{ Hz} & 0.5 \\ 8 \text{ Hz} & 0.3 \end{bmatrix}

Three spikes. Three frequencies extracted. Clean.


#Euler's Formula — The Bridge

The test wave eiωte^{-i\omega t} is not mysterious — it is just sine and cosine together:

eiωt=cos(ωt)isin(ωt)e^{-i\omega t} = \cos(\omega t) - i\sin(\omega t)

Multiplying f(t)f(t) by this simultaneously tests for both cosine and sine components at frequency ω\omega. The result F(ω)F(\omega) is complex:

F(ω)=Re{F(ω)}cosine content at ωiIm{F(ω)}sine content at ωF(\omega) = \underbrace{\text{Re}\{F(\omega)\}}_{\text{cosine content at } \omega} - i\underbrace{\text{Im}\{F(\omega)\}}_{\text{sine content at } \omega}

The amplitude of frequency ω\omega in the signal is:

F(ω)=Re2+Im2|F(\omega)| = \sqrt{\text{Re}^2 + \text{Im}^2}

The phase (timing offset) of that frequency is:

F(ω)=arctan ⁣(ImRe)\angle F(\omega) = \arctan\!\left(\frac{\text{Im}}{\text{Re}}\right)


#In One Line

The Fourier Transform extracts frequency ω\omega from a composite signal by:

F(ω)=f(t)eiωtdt    spike when ω=frequency inside f(t)\boxed{F(\omega) = \int f(t) \cdot e^{-i\omega t}\, dt \;\longrightarrow\; \text{spike when } \omega = \text{frequency inside } f(t)}

Multiply by a rotating test wave → integrate → if frequencies match, they bind and accumulate → spike. If they don't match, they cancel → silence.


That's the entire mechanism. Everything else — DFT, FFT, spectrograms — is just this idea applied efficiently to discrete data.

Share:
Last updated on 3/20/2026