TExcelTAD
Home › Fourier Analysis & Signals › Duality and Symmetry

Duality and Symmetry

The forward and inverse Fourier transforms differ only by the sign in the exponent. That near-symmetry, duality, means every transform pair gives a second one for free. Symmetry of the signal (real, even, odd) also forces symmetry of the spectrum, which halves the work and explains why real signals have mirror-image spectra.

Duality

If f(t)↔f^(s)f(t) \leftrightarrow \hat{f}(s), then

f^(t)↔f(−s)\hat{f}(t) \leftrightarrow f(-s)

Transforming twice reverses time: FFf(t)=f(−t)\mathcal{F}\mathcal{F}f(t) = f(-t), so four transforms give back ff. Example: since Π↔sinc⁡\Pi \leftrightarrow \operatorname{sinc}, also sinc⁡↔Π(−s)=Π(s)\operatorname{sinc} \leftrightarrow \Pi(-s) = \Pi(s). The sinc function is perfectly band-limited: its spectrum is exactly zero above ∣s∣=1/2\lvert s \rvert = 1/2. That is the heart of the sampling theorem.

python · try it yourself
import numpy as np

dt = 0.002
t = np.arange(-2000, 2000, dt)               # sinc decays slowly, so integrate far out
f = np.sinc(t)
for s in (0.0, 0.25, 0.45, 0.55, 0.8):
    F = np.sum(f * np.exp(-2j * np.pi * s * t)) * dt
    print(f"s={s:4}: transform of sinc = {F.real:+.4f}   rect(s) = {float(abs(s) < 0.5):.0f}")
s= 0.0: transform of sinc = +0.9999   rect(s) = 1
s=0.25: transform of sinc = +0.9999   rect(s) = 1
s=0.45: transform of sinc = +0.9995   rect(s) = 1
s=0.55: transform of sinc = +0.0005   rect(s) = 0
s= 0.8: transform of sinc = +0.0001   rect(s) = 0

The transform is 1 inside ∣s∣<1/2\lvert s \rvert < 1/2 and 0 outside, up to small ripples from truncating the slowly decaying sinc.

Symmetry rules

Signal f(t)f(t) Spectrum f^(s)\hat{f}(s)
real Hermitian: f^(−s)=f^(s)‾\hat{f}(-s) = \overline{\hat{f}(s)} (even magnitude, odd phase)
real and even real and even
real and odd purely imaginary and odd
even even

The first row is why one-sided spectra are enough for real signals and why NumPy has rfft.

python · try it yourself
import numpy as np

dt = 0.001
t = np.arange(-15, 15, dt)
ft = lambda f, s: np.sum(f * np.exp(-2j * np.pi * s * t)) * dt
signals = {
    "real (one-sided exp)": np.where(t >= 0, np.exp(-np.clip(t, 0, None)), 0.0),
    "real, even (Gaussian)": np.exp(-np.pi * t ** 2),
    "real, odd (t*Gaussian)": t * np.exp(-np.pi * t ** 2),
}
for name, f in signals.items():
    Fp, Fm = ft(f, 0.4), ft(f, -0.4)
    print(f"{name:23s} F(0.4) = {Fp.real:+.4f}{Fp.imag:+.4f}i   F(-0.4) = {Fm.real:+.4f}{Fm.imag:+.4f}i")
real (one-sided exp)    F(0.4) = +0.1362-0.3435i   F(-0.4) = +0.1362+0.3435i
real, even (Gaussian)   F(0.4) = +0.6049-0.0000i   F(-0.4) = +0.6049+0.0000i
real, odd (t*Gaussian)  F(0.4) = -0.0000-0.2420i   F(-0.4) = -0.0000+0.2420i

For the real signal F(−0.4)F(-0.4) is the conjugate of F(0.4)F(0.4); the even one has a real spectrum; the odd one a purely imaginary, odd spectrum.

In software

  • np.fft.rfft returns only the nonnegative frequencies of a real signal because the rest is redundant; it is about twice as fast as fft and uses half the memory.
  • Duality is used in radar and communications: a pulse shaped like a sinc occupies a sharply limited band, while a rectangular pulse spreads its energy widely.

Exercises

Exercise 1: Transform twice

What do you get if you apply the Fourier transform four times to ff?

Answer

ff itself.

Solution

Two transforms give f(−t)f(-t); two more reverse time again, giving f(t)f(t). The Fourier transform is a "rotation by 90 degrees" in the time-frequency plane, the idea behind the fractional Fourier transform.

Exercise 2: Use duality

Given e−∣t∣↔21+4π2s2e^{-\lvert t \rvert} \leftrightarrow \frac{2}{1 + 4\pi^2 s^2}, find the transform of 11+t2\frac{1}{1 + t^2}.

Answer

πe−2π∣s∣\pi e^{-2\pi \lvert s \rvert}.

Solution

By duality, 21+4π2t2↔e−∣s∣\frac{2}{1 + 4\pi^2 t^2} \leftrightarrow e^{-\lvert s \rvert}. Write 11+t2=12⋅21+4π2(t/2π)2\frac{1}{1 + t^2} = \frac{1}{2} \cdot \frac{2}{1 + 4\pi^2 (t/2\pi)^2}, a scaling by a=1/(2π)a = 1/(2\pi), which gives 12⋅2π e−∣2πs∣=πe−2π∣s∣\frac{1}{2} \cdot 2\pi\, e^{-\lvert 2\pi s \rvert} = \pi e^{-2\pi \lvert s \rvert}.

Exercise 3: Check Exercise 2 (code)

Verify the transform of 1/(1+t2)1/(1 + t^2) numerically at s=0,0.1,0.3s = 0, 0.1, 0.3.

Answer

About 3.1416, 1.6760 and 0.4770 (πe−2πs\pi e^{-2\pi s}).

Solution
python · try it yourself
import numpy as np
dt = 0.002
t = np.arange(-3000, 3000, dt)
f = 1 / (1 + t ** 2)
for s in (0, 0.1, 0.3):
    F = np.sum(f * np.cos(2 * np.pi * s * t)) * dt          # f is even, so the sine part vanishes
    print(s, round(F, 4), round(np.pi * np.exp(-2 * np.pi * s), 4))
0 3.1409 3.1416
0.1 1.676 1.676
0.3 0.477 0.477

At s=0s = 0 the numeric value is 3.1409 instead of π\pi because the integral was cut off at ∣t∣=3000\lvert t \rvert = 3000, and the tails of 1/(1+t2)1/(1 + t^2) beyond that hold about 2/30002/3000.

Test yourself

A real signal has a spectrum with…

  1. f^(−s)=f^(s)\hat{f}(-s) = \hat{f}(s) always
  2. f^(−s)=f^(s)‾\hat{f}(-s) = \overline{\hat{f}(s)}
  3. zero imaginary part always
  4. no negative frequencies

By duality, the transform of sinc⁡(t)\operatorname{sinc}(t) is…

  1. sinc⁡(s)\operatorname{sinc}(s)
  2. Π(s)\Pi(s)
  3. a Gaussian
  4. a delta

Why does NumPy's rfft return only about half the frequencies?

  1. the other half is zero
  2. the negative frequencies are the conjugates of the positive ones for real input
  3. it uses a lower resolution
  4. it drops high frequencies