When the DFT is defined and described I typically see the basis functions described as an integral number of sine and cosine waves.

But the basis functions are $\sin(2\pi k (n/N))$ or $\cos(2\pi k(n/N))$ where $k$ is the harmonic, $N$ is the number of samples, $n$ is the time domain sample number.

So the right hand boundary of this argument is $2\pi k(N-1)/N$, which seems to be always a bit short of a full cycle.

Could someone please confirm or explain my error?

The picture below shows a sine basis function, apparently ending short of a full cycle.

enter image description here

  • $\begingroup$ I have a rigid, Nazi-like position that the Discrete Fourier Transform and the Discrete Fourier Series are one and the same thing. The DFT maps a periodic function with period of $N$ samples in one domain (say, the "time domain") to another periodic function having the same period $N$ in the reciprocal domain (e.g. "frequency domain"). And the iDFT maps it back. The fundamental basis functions all have an integer number of cycles in the period length of $N$. That's the only way you can use the theorems (like offset or convolution using multiplication) is to assume periodic extension. $\endgroup$ Dec 21, 2016 at 4:33

1 Answer 1


First, a small correction:
The basis functions of all Fourier transforms are of the the type $e^{2j\pi k\frac nN}$, which can also be interpreted as $\cos(2\pi k \frac nN) + i\cdot\sin(2\pi k \frac nN)$, but never only real-values sines or cosines; that'd lead to large problems on the algebraic structures around. But that really doesn't matter here:

You're absolutely right, the "completing" sample of the oscillation is always missing – but that's absolutely logical, if you think about it – when you periodically continue the signal you're transforming, you'd get twice the same value (the "start" value) after each other, and that mustn't happen.

Your picture is an excellent illustration of this:


The oscillation is observed for exactly two periods, and each period is 16 samples long; that means that for the $n$th sample, the $(n+16)$th sample must have the same value. For example, the $n=16$th has the same value as the $(16+16)=32$nd sample – which, by principle of 32-periodicity is the same as the $0$th sample.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.