# DFT: Basis functions and Significance of dividing frequency by Sample length

A time domain signal can be decomposed into sinusoids which are based on basis functions.

For a N sampled input, a cosine basis function is defined as:

$$C_k[i] = \cos\left[\dfrac{2\pi k i}{N}\right]$$

Range of Frequency $k = 0 \ldots \frac{N}{2}$, Range of $i = 0 \ldots N-1$

Why is the sinusoid angle divided by $N$?

## 1 Answer

This normalises the frequency such that the period of the first cosine is N samples. Then all subsequent cosines are N/2 samples, N/3 samples.... all the way to N/(N/2) = 2 samples, at the Nyqust limit where k = N/2. If you want the full DFT, including negative frequencies, k should range from 0 to N-1.

• I am pretty sure your answer is technically correct and have accepted it, but for a layman like me, the explanation needs to be dumbed down. At the moment, my textbook indicates that the k in the equation is K cycles over N samples. Assuming this signal was sampled at a frequency fs, this leads to K cycles over time N.ts. So my fundamental question now is why are these equations missing the sampling frequency aspect? I expect the denominator to contain ts. Its absence simply does not seem intuitive. Please clarify. – Raj Jul 29 '15 at 2:35
• Hi Raj. So the sampling period is implicit in a sampled signal. Simply, if one of the cosines has a period of 1 sample, its frequency is equal to fs; this would occur when $k = N$. In your example, bin $k = N/2$ will always equal nyquist: $fs/2$, because the period of the sinusoid is 2 samples. This is the definition of the Nyquist frequency is a baseband signal. The normalisation of the frequency removes dependence on the sampling frequency. Hope that helps. As someone who needs to understand things intuitively as well as mathematically, it took me a while to get my head around this – kippertoffee Jul 29 '15 at 8:12
• Thanks KipperToffee. Its clear now. What I figured out is the following. In order to know what frequencies exist in a signal whose bandwidth is known, it is usually enough to crosscorrelate sinusoid of frequencies from DC to the highest frequency existing in the baseband. If the sampling frequency is known, the highest baseband frequency is half of the sampling frequency [Nyquist]. When a mere sequence of numbers is provided, there is no information on sampling frequency. So no guesses on the real frequencies of sinusoids for crosscorrelation can be made. Normalization helps here. – Raj Jul 31 '15 at 3:41
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}