Skip to content
GATEiit

GATE EC · Networks, Signals and Systems

DFT

The N-point discrete Fourier transform: definition and inverse, link to the DTFT, its properties, circular versus linear convolution, frequency resolution and zero padding, and the operation count of the radix-2 FFT.

Before you start

  • DTFT →

    The DFT is the DTFT of a finite sequence sampled at N equally spaced frequencies.

  • Linear convolution →

    Circular convolution questions ask when it equals linear convolution and how the two differ.

  • Complex numbers and roots of unity

    Every DFT sum is a sum of powers of WN=e−j2π/N.

Concept notes

1. Definition and link to the DTFT

For a sequence x[n] of length N (n=0,1,…,N−1), the N-point DFT is X[k]=∑n=0N−1x[n] WNkn,k=0,1,…,N−1,WN=e−j2π/N. The inverse DFT is x[n]=1N∑k=0N−1X[k] WN−kn.

Link to the DTFT: X[k]=X(ejω)∣ω=2πk/N. The DFT is N equally spaced samples of the DTFT over one period [0,2π).

Useful values of WN: WNN=1, WNN/2=−1, WNk+N/2=−WNk. For N=4, W4=−j, so W4kn takes only the values 1,−j,−1,j.

Quick checks:

  • X[0]=∑nx[n] (the sum of the samples).
  • For even N, X[N/2]=∑n(−1)nx[n].
  • x[0]=1N∑kX[k].

Implicit periodicity: both x[n] and X[k] are treated as one period of sequences with period N. This is why shifts and convolutions in the DFT world are circular (indices taken modulo N).

Matrix form: X=WN x with [WN]kn=WNkn. For N=4 the rows are (1,1,1,1), (1,−j,−1,j), (1,−1,1,−1), (1,j,−1,−j).

ω|X(e^jω)| (dashed)k=0k=1k=2k=3k=4k=5k=6k=70π2π4x[n] = {1, 1, 1, 1}: 8-point DFT (dots) = DTFT sampled at ω = 2πk/8
The 8-point DFT of a 4-sample rectangle: the dots are the DTFT magnitude sampled at ω = 2πk/8.

2. Properties of the DFT

All indices are modulo N; ((n))N means n mod N.

Property x[n] X[k]
Linearity ax1[n]+bx2[n] aX1[k]+bX2[k]
Circular time shift x[((n−m))N] WNkmX[k]
Modulation WN−lnx[n] X[((k−l))N]
Circular time reversal x[((−n))N] X[((−k))N]
Conjugation x∗[n] X∗[((−k))N]
Circular convolution x1[n]⊛x2[n] X1[k]X2[k]
Multiplication x1[n]x2[n] 1NX1[k]⊛X2[k]
Duality X[n] Nx[((−k))N]

Real sequences: X[k]=X∗[N−k]. So ∣X[k]∣ is even and ∠X[k] is odd about k=N/2; X[0] and (for even N) X[N/2] are real. Only about half the DFT values are independent.

Real and even x[n] (that is, x[n]=x[N−n]) gives a real, even X[k]; real and odd gives purely imaginary X[k].

Parseval: ∑n=0N−1∣x[n]∣2=1N∑k=0N−1∣X[k]∣2.

Basic pairs: δ[n]↔1 for all k; 1 for all n ↔Nδ[k]; δ[n−n0]↔WNkn0.

IDFT using a DFT routine: x[n]=1N(DFT{X∗[k]})∗.

3. Circular convolution and linear convolution

The N-point circular convolution is y[n]=x1[n]⊛x2[n]=∑m=0N−1x1[m] x2[((n−m))N]. Multiplying two N-point DFTs gives this, not the linear convolution.

How to compute by hand: write x2 circularly reversed, and rotate it one step for each n; or form the N×N circulant matrix of x2 and multiply by x1.

Relation to linear convolution: if yl[n] is the linear convolution, the N-point circular convolution is the linear one folded (aliased) in time: yc[n]=∑ryl[n+rN],0≤n≤N−1.

When are they equal? If x1 has length L and x2 has length M, the linear convolution has length L+M−1. Zero-pad both to N≥L+M−1; then circular convolution equals linear convolution. With a smaller N, the last L+M−1−N samples wrap around and add onto the first ones.

Long filtering (block convolution): overlap-add and overlap-save use this idea to filter a long input with an FFT block by block. For a filter of length M and FFT size N, overlap-save discards the first M−1 outputs of each block (they are aliased).

4. Frequency resolution and zero padding

If x[n] comes from sampling at fs, DFT bin k sits at analog frequency fk=kfsN,Δf=fsN (bin spacing). For a real signal, bins k>N/2 stand for negative frequencies: bin k is at (k−N)fs/N.

Zero padding (appending zeros to make N larger) samples the same DTFT more finely. It makes the plot smoother and can locate a peak better, but it does not improve the true resolution. The ability to separate two close tones depends on the length of the actual data record, T0=L/fs, roughly 1/T0.

Spectral leakage: a tone that does not fall exactly on a bin (a non-integer number of cycles in the record) spreads energy into all bins. A tone of frequency f0=mfs/N with integer m gives exactly two non-zero bins (k=m and k=N−m) for a real cosine. Windowing (Hann, Hamming) reduces leakage at the cost of a wider main lobe.

Picket fence effect: you see the spectrum only at the N bins; peaks between bins are missed or reduced. Zero padding helps here.

5. The FFT and its operation count

The fast Fourier transform computes the same DFT with far fewer operations. Radix-2 decimation in time (DIT) splits x[n] into even and odd samples (needs N=2ν): X[k]=G[k]+WNkH[k],X[k+N/2]=G[k]−WNkH[k], where G and H are the N/2-point DFTs of the even and odd samples. Repeating gives ν=log⁡2N stages of N/2 butterflies each.

Method Complex multiplications Complex additions
Direct DFT N2 N(N−1)
Radix-2 FFT N2log⁡2N Nlog⁡2N

(Multiplications by WN0=1 are usually counted anyway in GATE answers unless the question says otherwise.)

Facts often asked:

  • DIT needs the input in bit-reversed order and gives output in natural order; decimation in frequency (DIF) is the reverse.
  • The computation can be done in place: each butterfly overwrites its two inputs.
  • For N=8, input order for DIT is x[0],x[4],x[2],x[6],x[1],x[5],x[3],x[7].
ab× WNk× (−1)A = a + WNk bB = a − WNk bb is multiplied by the twiddle factor once; the lower output takes it with sign −1
A radix-2 decimation-in-time butterfly: two outputs from one complex multiplication.

Formulas to remember

N-point DFT
X[k]=∑n=0N−1x[n] e−j2πkn/N
Inverse DFT
x[n]=1N∑k=0N−1X[k] ej2πkn/N
DFT as DTFT samples
X[k]=X(ejω)∣ω=2πk/N
Circular shift
x[((n−m))N]↔WNkmX[k]
Conjugate symmetry (real x)
X[k]=X∗[N−k]
Parseval
∑n=0N−1∣x[n]∣2=1N∑k=0N−1∣X[k]∣2
Circular equals linear convolutionLengths L and M of the two sequences
N≥L+M−1
Bin frequency
fk=kfsN,Δf=fsN
Radix-2 FFT countDirect DFT: N2 multiplications, N(N−1) additions
N2log⁡2N mult.,Nlog⁡2N add.

Common mistakes

  • Using linear shifts or linear convolution inside DFT problems; every shift and convolution here is circular, with indices modulo N.
  • Forgetting the factor 1/N in the inverse DFT or in Parseval's relation.
  • Thinking zero padding improves frequency resolution; it only samples the same DTFT more finely.
  • Reading a bin above N/2 as a high positive frequency for a real signal; it is a negative frequency (k − N) fs/N.
  • Taking N = L + M for circular convolution to match linear convolution; the minimum is L + M − 1.
  • Mixing up FFT counts; radix-2 needs (N/2) log2 N multiplications but N log2 N additions.

Worked examples

Try each step yourself, then reveal the working.

Example 1: A 4-point DFT by hand

numerical

Find the 4-point DFT of x[n]={1,2,0,1} and check Parseval's relation.

  1. Step 1: Write the powers of $W_4$.

    Try it on paper first.

Example 2: Circular convolution through time aliasing

numerical

Find the 4-point circular convolution of x1[n]={1,2,0,1} and x2[n]={1,1} (zero-padded to length 4). How many points are needed for it to equal the linear convolution?

  1. Step 1: Find the linear convolution first.

    Try it on paper first.

Example 3: Reading frequencies from DFT bins

numerical

A real signal is sampled at fs=8 kHz and a 256-point DFT is taken. Find the bin spacing, the bin of a 1 kHz tone, and the frequency represented by bin k=200.

  1. Step 1: Find the bin spacing.

    Try it on paper first.

Example 4: Saving work with the FFT

numerical

For N=1024, compare the complex multiplications of a direct DFT and a radix-2 FFT.

  1. Step 1: Count for the direct DFT.

    Try it on paper first.

Previous year questions

1 official GATE EC question on this topic, newest first.

Topic test

9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.