# Is the fundamental basis function of the DFT not an intregral number of cycles?

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. • 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. Dec 21, 2016 at 4:33

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: 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.