What is being transformed?
The input is a finite sequence x[0], …, x[N−1] with integer N≥1. The DFT also accepts complex values. We use a negative forward exponent and put the factor 1/N only in the inverse. Indices run from 0 to N−1; periodic extension is a mathematical representation rather than extra measurement.[2][3]
Euler’s formula resolves each complex weight into cosine and sine. The continuous Fourier transform instead treats a function through an integral. Our calculator is deliberately limited to four real dimensionless input values; it is not an audio importer or a general FFT library.
Derive four points without a black box
- Set N=4. The complex weights come from W=exp(−iπ/2)=−i; its powers repeat after four steps.
- At k=0 all weights equal 1. Therefore X[0] is the sample sum rather than their mean.
- At k=1 and k=3 the weights are conjugates. Real input gives the same real part and opposite imaginary parts.
- The orthogonal basis vectors have squared norm N. Divide the inverse sum by N to recover the original samples.
Magnitudes alone do not reconstruct the signal
Four samples, four frequency bins
Free with a Quanta account. Your download stays ready after registration.
The stem spectrum shows which bins contribute. It hides that X[1]=−2i and X[3]=2i have different phases. Only complex values including phase determine the sequence uniquely. Phase is undefined when X[k]=0.[1]
From bin index to hertz
Only known, uniform sampling converts k into hertz. For even N, k=N/2 is the Nyquist bin; its endpoint sign convention must be specified. The Nyquist sampling condition explains when different analogue frequencies become indistinguishable during acquisition. A DFT cannot restore information lost to aliasing.
Without an additional time factor, X[k] and x[n] have the same physical unit, such as volts. Numerical values and amplitudes still depend on normalization. A bin-centred real sinusoid away from DC and Nyquist has A=2|X[k]|/N. At DC, mean is X[0]/N; the simple amplitude rule is not universal for arbitrary windows or off-bin signals.[1][3]
A sample count does not create an additional physical unit. Four constant inputs of 3 V each give X[0]=12 V and three zero coefficients under this unscaled forward convention. Dividing the DC coefficient by N=4 recovers the mean of 3 V. The larger number 12 comes from summation rather than a new unit of volts times samples. The existing calculator accepts dimensionless model inputs; this units argument is a theoretical transfer.[1][3]
Two fully checked examples
Compute a complete DFT by hand
- Given
- N=4, real dimensionless sequence x=(1, 2, 1, 0); negative exponent in the forward transform.
- Find
- All four complex coefficients and an energy check.
The fourth root used here is −i. For k=0, add all samples.
At k=1 the weights are 1, −i, −1, i; at k=2 they alternate between 1 and −1.
At k=3, real input reverses the sign of the imaginary part.
Result: X=(4, −2i, 0, 2i), magnitude spectrum (4, 2, 0, 2), mean X[0]/4=1.
Check: Time domain: 12+22+12+02=6. Frequency domain: (42+22+02+22)/4=24/4=6. Also X[1] and X[3] are conjugates.
A sine and its negative-frequency partner
- Given
- N=4, x=(0, 1, 0, −1), sampled uniformly at fs=8,000 Hz.
- Find
- Spectrum, physical bin frequencies and reconstruction at n=1.
The four-point formulas give purely imaginary components at k=1 and k=3.
Bin spacing is fs/N. Upper bin k=3 represents k−N=−1 in signed ordering.
The inverse DFT uses a positive exponent and the factor 1/4.
Result: The sine has amplitude 1 at 2,000 Hz; its two two-sided coefficients each have magnitude 2.
Check: Σ|x[n]|2=2 and Σ|X[k]|2/4=(4+4)/4=2. Bin magnitude 2 is not signal amplitude 1 without the appropriate normalization.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five ways to secure your DFT understanding
Calculate · Foundation
Compute the N=4 DFT of x=(2, 0, 0, 0).
Show hint
Only the n=0 term remains.
Learning goal: Recognize an impulse as a flat spectrum.
Show solution and calculation
For every k, X[k]=2·exp(0)=2.
Hence X=(2, 2, 2, 2).
Check: 4=(4+4+4+4)/4.
Rearrange · Application
Reconstruct x[2] from X=(4, −2i, 0, 2i).
Show hint
At n=2 the inverse weights are 1, −1, 1, −1.
Learning goal: Apply the inverse DFT with its normalization.
Show solution and calculation
x[2]=(4+2i+0−2i)/4=1.
The factor 1/4 is required because the forward transform is unnormalized.
Interpret · Foundation
For N=4 and fs=8,000 Hz, which signed frequency does k=3 represent?
Show hint
Represent the upper index as k−N.
Learning goal: Distinguish a frequency index from physical frequency.
Show solution and calculation
f=(3−4)·8,000/4=−2,000 Hz. 6,000 Hz is the unshifted periodic index representation of the same bin, not a separately identifiable analogue frequency.
Error analysis · Application
For x=(3, 3, 3, 3), someone reports X[0]=3. What is wrong?
Show hint
Check whether the forward direction includes a factor 1/N.
Learning goal: Separate a sum, a mean and a software convention.
Show solution and calculation
Our convention gives X[0]=Σx[n]=12.
The mean is X[0]/N=3.
All other bins are zero; forward-normalized software could instead return 3.
Transfer · Challenge
Four samples at fs=8,000 Hz are padded with four zeros. Does this double physical resolving power?
Show hint
Separate extra frequency samples from extra measured samples.
Learning goal: Interpret zero padding without inventing extra information.
Show solution and calculation
The DFT grid becomes denser: Δf=8,000/8=1,000 Hz instead of 2,000 Hz.
There is no new measurement information or longer observation.
Zero padding samples the existing window spectrum more densely; it does not inherently improve separation of nearby tones.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
What FFT and zero padding actually change
A direct DFT evaluates N sums of N contributions, requiring O(N2) work. A suitable FFT reuses intermediate results and achieves O(N log N) for common lengths. With the same convention the mathematical result is identical; a power of two is convenient for some algorithms, not a condition for the DFT to exist.[2]
A short observation limits separation of nearby frequencies. Non-integer cycle counts within the window spread energy across bins: spectral leakage. Added zeros only refine the evaluation grid of the same finite sequence. Longer, complex or noisy records require an appropriate data workflow and explicit window, normalization and observation duration.[1][3]
Sources for this explanation
Quanta · Updated November 21, 2026
- SciPy User Guide: Fourier Transforms — The Discrete Fourier Transform
- J. Daugman, University of Cambridge: Mathematical Methods for Computer Science, slides 69–76
- MathWorks: Discrete Fourier Transform — forward and inverse definitions
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Clarified units of the unnormalized sum and illustrated DC scaling with a physical unit.
- Expanded DFT and inverse DFT with a four-point calculator, original stem spectrum, two checked examples and five solved exercises.
Cite this reference page
Quanta. Discrete Fourier transform (DFT). Updated November 21, 2026. https://quanta-study.de/en/formula-sheet/diskrete-fouriertransformation
When citing a specific scientific statement, also cite the specialist source linked to that statement.