Discrete-time Fourier series and the discrete-time Fourier transform form the theoretical basis for the DFT, and thus for the digital processing of signals on computers. The notes below work through both, starting from discrete complex exponentials.
Notation and periodic signals
Samples of a discrete-time signal are written with square brackets: x[n] is the n-th sample of x. "Discrete" will mean discrete-time for the rest of this article. A signal is periodic with period N when x[n] = x[n + N].
In the continuous case one can begin with real trigonometric functions and move to complex exponentials later. Here we start directly with discrete complex exponentials, since converting between the two representations is straightforward. The family of signals of interest is e^(jk(2π/N)n), where k is an integer and 2π/N is the angular frequency; these are periodic with period N. As shown in Appendix A, only N of them are distinct, because e^(jk(2π/N)n) = e^(j(k+N)(2π/N)n).
DTFS representation and coefficient formula
An arbitrary N-periodic x[n] can be written as a linear combination of these exponentials:
x[n] = Σ_{k=<N>} a_k e^(jk(2π/N)n)
The notation k = <N> means k runs over any sequence of N consecutive integers. Because only N distinct exponentials exist, the order of summation is irrelevant as long as all of them appear — 0 to N-1, 1 to N, 2 to N+1, and so on all enumerate the same set. This expansion is the discrete-time Fourier series (DTFS) of x[n], and the a_k are its Fourier series coefficients. Unlike the continuous case there are no convergence concerns, only a finite sum.
To solve for the coefficients, multiply both sides by e^(-jr(2π/N)n) and sum over N terms, then interchange the order of summation. By Appendix B the inner sum equals N when k - r is an integer multiple of N and 0 otherwise. Without loss of generality — since we iterate over N consecutive values — assume this occurs at k = r. The equation collapses to N a_r, giving:
a_k = (1/N) Σ_{n=<N>} x[n] e^(-jk(2π/N)n)
So the decomposition of a periodic discrete signal into periodic complex exponentials is:
x[n] = Σ_{k=<N>} a_k e^(jk(2π/N)n), a_k = (1/N) Σ_{n=<N>} x[n] e^(-jk(2π/N)n)
Worked example: the sampled triangle
Take the triangular function x(t) sampled at 12 samples per period with period 4, so the sample spacing is T = 4/12 = 1/3. Equivalently, x[n] = x(nT). Substituting into the definition of x(t) gives the sampled sequence. An odd extension is then applied to the range [-6, 6] and repeated with period N = 12.
As in the continuous-time case, the odd symmetry means only a sine series is required:
x[n] = Σ b_k sin(k(2π/12)n)
The five terms in the sum correspond to the five pairs of nonzero-frequency indices (see Appendix C). The coefficients are
b_k = (2/N) Σ_{n=1}^{N/2-1} x[n] sin(k(2π/N)n)
The sum can be run over half the period because the terms at n and N-n are equal (x and the sine both change sign), and the terms at n = 0 and n = N/2 vanish because sin(0) = sin(πk) = 0. Evaluating gives b_1, and the remaining coefficients up to b_5 follow the same pattern; the resulting Fourier series uses those five sine terms.
An interactive plot accompanies these notes: a dropdown selects how many of the series terms are plotted. Orange crosses mark the series values at integer indices, and an orange line interpolates between them to make the added sine waves visible. When all coefficients are used, the DTFS reconstructs the input signal exactly.
From the DTFS to the DTFT
Non-periodic signals can be handled in the frequency domain by a limiting argument, as in the continuous Fourier transform. Take a non-periodic discrete signal x[n] of finite duration, zero outside a finite range of indices. Construct a periodic signal x~[n] whose period N block equals x[n], choosing N large enough that x[n] = 0 outside [0, N-1] and setting x~[n] = x[n].
Since x~ is periodic it has a DTFS. Using angular frequency notation, and noting that x[n] vanishes outside [0, N-1] so the summation can be extended to all integers without changing its value, define the continuous function
X(Ω) = Σ_{n=-∞}^{∞} x[n] e^(-jΩn)
At the DTFS points, a_k = (1/N) X(k 2π/N). The function X(Ω) is the discrete-time Fourier transform (DTFT) of x[n]. For the inverse, substitute a_k back into the DTFS and use the definition of X; the resulting expression contains the sum Σ_k e^(jk(2π/N)n), which is not interpretable until we take the limit. Following the continuous case, recognize that expression as a Riemann sum: with Ω_k = k 2π/N and spacing 2π/N → 0, the sum becomes an integral. The DTFT pair is therefore
X(Ω) = Σ_{n=-∞}^{∞} x[n] e^(-jΩn)
x[n] = (1/2π) ∫_{2π} X(Ω) e^(jΩn) dΩ
X(Ω) is continuous and periodic with period 2π, since X(Ω + 2π) = X(Ω). It is therefore enough to integrate over any interval of length 2π.
The DTFS and DTFT are tightly connected: if a finite-duration signal is used to form a periodic signal by repeating a block of N samples, the DTFS coefficients are equally spaced, scaled samples of the DTFT, a_k = (1/N) X(k 2π/N). This mirrors the relationship between Fourier series and the Fourier transform in continuous time. The DTFT also shares properties such as linearity, time shifting, and the convolution theorem, though we will not pursue them here.
Appendix A: behavior of discrete complex exponentials
Discrete-time complex exponentials take the form e^(jΩn), with Ω the angular frequency. Discreteness produces effects absent from the continuous case. Consider Ω + 2π:
e^(j(Ω+2π)n) = e^(jΩn) e^(j2πn) = e^(jΩn)
The exponential at Ω + 2π is exactly the same signal as at Ω, so Ω need only be chosen from a range of length 2π.
Periodicity is likewise constrained. For e^(jΩn) to be periodic with positive integer period N, we need e^(jΩN) = 1, so ΩN = 2πm for some integer m, i.e. Ω = 2πm/N. Fixing N and collecting all complex exponentials for which N is a period, the set contains only N distinct signals, since frequencies 2π/N apart are identical. Any starting point can be chosen and N distinct signals obtained before the sequence repeats.
This differs sharply from the continuous case, where Ω is real. The signals e^(jΩ_1 t) and e^(jΩ_2 t) agree only at integers when Ω_1 - Ω_2 = 2π, so as functions of t they are distinct — for a fixed positive period T the continuous exponentials e^(jk(2π/T)t) are distinct for every integer k, yielding infinitely many signals.
Appendix B: summing consecutive exponentials
Define a discrete function as the sum over N consecutive terms of e^(jk(2π/N)n). Two cases matter.
First, when k = mN for some integer m, the exponent is an integer multiple of 2π at every index, so each term is 1 and the sum equals N.
Second, when k is not an integer multiple of N, apply the substitution m = n + 1 and use the finite geometric series formula with common ratio e^(jk(2π/N)). The denominator 1 - e^(jk(2π/N)) is nonzero in this case, and since the numerator involves e^(jk2π) = 1, the whole expression evaluates to 0.
So the sum equals N when k is an integer multiple of N, and 0 otherwise. The derivation runs from index 0 to N-1, but it applies unchanged to any N consecutive indices because the summand is periodic in n with period N.
Appendix C: sine decomposition of x[n]
Returning to the DTFS coefficient formula, recall that x[n] is odd over the full range. Because the cosine is even, the cosine terms cancel in pairs across the period — term 1 equals the negative of term 11, and so on — leaving only sines. The resulting coefficients a_k are purely imaginary, so for convenience write a_k = j c_k.
Substituting into the reconstruction formula and pairing the exponential at k with the one at N-k, and using that for real x[n] the conjugate of a_k is a_{-k}, the paired exponentials combine via Euler's formula into a real sine term. The k = 0 and k = N/2 terms are excluded because sin(0) = sin(πk) = 0. That is what leaves the five sine terms used in the worked example above.



