TExcelTAD
Home › Fourier Analysis & Signals › The Dirac Delta

The Dirac Delta

The Dirac delta δ(t)\delta(t) is an idealized impulse: infinitely short, infinitely tall, with area 1. It is not a function in the ordinary sense, but it is indispensable: it is the input that reveals a system's impulse response, its transform is the constant 1 (all frequencies equally), and pure tones have deltas as spectra. Osgood treats it carefully as a distribution; this lesson builds the working intuition.

A limit of pulses

Take narrower and narrower pulses of area 1, such as 1εΠ(t/ε)\frac{1}{\varepsilon}\Pi(t/\varepsilon) or Gaussians 1εe−πt2/ε2\frac{1}{\varepsilon}e^{-\pi t^2/\varepsilon^2}. None converges to a function, but their effect on a smooth gg does converge:

∫−∞∞δ(t) g(t) dt=g(0),∫−∞∞δ(t−a) g(t) dt=g(a)\int_{-\infty}^{\infty} \delta(t)\, g(t)\, dt = g(0), \qquad \int_{-\infty}^{\infty} \delta(t - a)\, g(t)\, dt = g(a)

This sifting property is the definition: the delta is the operation "evaluate at a point".

python · try it yourself
import numpy as np

dt = 1e-5
t = np.arange(-1, 1, dt)
g = np.cos(3 * t) + t ** 2                     # g(0) = 1, g(0.2) = cos(0.6) + 0.04
for eps in (0.5, 0.1, 0.01, 0.001):
    pulse = np.exp(-np.pi * (t / eps) ** 2) / eps            # area 1
    shifted = np.exp(-np.pi * ((t - 0.2) / eps) ** 2) / eps
    print(f"eps={eps:6}: area {np.sum(pulse) * dt:.4f}  integral with g {np.sum(pulse * g) * dt:.6f}"
          f"  shifted {np.sum(shifted * g) * dt:.6f}")
print("g(0) =", 1.0, "  g(0.2) =", round(np.cos(0.6) + 0.04, 6))
eps=   0.5: area 1.0000  integral with g 0.875853  shifted 0.769820
eps=   0.1: area 1.0000  integral with g 0.994455  shifted 0.861037
eps=  0.01: area 1.0000  integral with g 0.999944  shifted 0.865292
eps= 0.001: area 1.0000  integral with g 0.999999  shifted 0.865335
g(0) = 1.0   g(0.2) = 0.865336

Transforms involving the delta

Plugging into the transform integral with the sifting property:

Fδ=1,Fδ(t−a)=e−2πisa,F1=δ,Fcos⁡(2πs0t)=12(δ(s−s0)+δ(s+s0))\mathcal{F}\delta = 1, \qquad \mathcal{F}\delta(t - a) = e^{-2\pi i s a}, \qquad \mathcal{F}1 = \delta, \qquad \mathcal{F}\cos(2\pi s_0 t) = \tfrac{1}{2}\big(\delta(s - s_0) + \delta(s + s_0)\big)

An impulse contains every frequency with equal strength, and a pure tone lives at exactly two frequencies. The second pair follows from the first by duality, which is how Osgood justifies giving the constant function and sinusoids a Fourier transform at all.

The discrete delta is easy

In discrete time there is no difficulty: δ[n]\delta[n] is 1 at n=0n = 0 and 0 elsewhere, and its DFT is all ones. A tone that fits the frame exactly gives a DFT with exactly two nonzero bins, the discrete counterpart of the two deltas:

python · try it yourself
import numpy as np

N = 16
d = np.zeros(N); d[0] = 1
print("DFT of delta[n]:", (np.round(np.fft.fft(d).real, 6) + 0.0).tolist())

d3 = np.zeros(N); d3[3] = 1
print("|DFT| of delta[n-3]:", np.round(np.abs(np.fft.fft(d3)), 6).tolist())

n = np.arange(N)
X = np.fft.fft(np.cos(2 * np.pi * 2 * n / N))
print("DFT of cos(2 pi 2n/N):", (np.round(X.real, 6) + 0.0).tolist())
DFT of delta[n]: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
|DFT| of delta[n-3]: [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
DFT of cos(2 pi 2n/N): [0.0, 0.0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 8.0, 0.0]

The shifted delta has the same magnitude spectrum, all ones; the delay only changes the phase.

Properties worth remembering

  • Scaling: δ(at)=1∣a∣δ(t)\delta(at) = \frac{1}{\lvert a \rvert}\delta(t).
  • Derivative of the step: u′(t)=δ(t)u'(t) = \delta(t), the "slope" of a jump.
  • Convolution identity: f∗δ=ff * \delta = f and f∗δ(t−a)=f(t−a)f * \delta(t - a) = f(t - a) (Convolution).

In software

  • Impulse responses of rooms are measured by playing a click (or a sweep that is processed into the equivalent of a click) and recording the result; convolution reverb then applies that room to any sound.
  • scipy.signal.unit_impulse(N, idx) builds a discrete delta.

Exercises

Exercise 1: Sifting

Compute ∫−∞∞δ(t−2) e−t2 dt\int_{-\infty}^{\infty} \delta(t - 2)\, e^{-t^2}\,dt.

Answer

e−4≈0.0183e^{-4} \approx 0.0183.

Solution

The delta picks out the value of e−t2e^{-t^2} at t=2t = 2.

Exercise 2: Transform of a pair of impulses

Find the Fourier transform of δ(t−1)+δ(t+1)\delta(t - 1) + \delta(t + 1).

Answer

2cos⁡(2πs)2\cos(2\pi s).

Solution

e−2πis+e2πis=2cos⁡(2πs)e^{-2\pi i s} + e^{2\pi i s} = 2\cos(2\pi s). By duality this is the mirror of the fact that a cosine's spectrum is two deltas.

Exercise 3: Scaling the delta (code)

Check δ(2t)=12δ(t)\delta(2t) = \frac{1}{2}\delta(t) numerically by integrating a narrow Gaussian pulse evaluated at 2t2t against g(t)=1g(t) = 1.

Answer

The integral is 0.5.

Solution
python · try it yourself
import numpy as np
dt = 1e-5
t = np.arange(-1, 1, dt)
eps = 0.01
pulse_at_2t = np.exp(-np.pi * (2 * t / eps) ** 2) / eps
print(round(np.sum(pulse_at_2t) * dt, 6))
0.5

Compressing the pulse by 2 halves its area, and the delta inherits that factor.

Test yourself

The sifting property says ∫δ(t−a)g(t) dt=\int \delta(t - a) g(t)\,dt =

  1. g(0)g(0)
  2. g(a)g(a)
  3. aa
  4. 1

The Fourier transform of δ(t)\delta(t) is…

  1. δ(s)\delta(s)
  2. the constant 1
  3. sinc⁡(s)\operatorname{sinc}(s)
  4. 0

The spectrum of cos⁡(2πs0t)\cos(2\pi s_0 t) consists of…

  1. one delta at s0s_0
  2. two deltas at ±s0\pm s_0, each with weight 1/2
  3. a sinc
  4. a constant