The Complex Fourier Series

The sine-and-cosine Fourier series carries two families of coefficients and a special constant term — a little clumsy to push through calculations. Euler's formula e^{i\theta} = \cos\theta + i\sin\theta folds both families into one tidy package of complex exponentials.

At first glance that looks like a step backwards — trading real, everyday sines and cosines for imaginary numbers sounds like more work, not less. It is the opposite. Once a periodic signal is written in this exponential form, differentiating it, shifting it in time, or combining two signals together all collapse into simple algebra on exponents. That is precisely why every textbook on digital signal processing, and every engineer who designs an audio codec, a WiFi receiver, or a medical scanner, writes signals this way rather than in the sine-and-cosine form you met first. The sine-and-cosine series was the stepping stone; this is where the subject actually lives.

Writing \cos\theta = \tfrac12(e^{i\theta} + e^{-i\theta}) and \sin\theta = \tfrac1{2i}(e^{i\theta} - e^{-i\theta}) and collecting terms, the whole series becomes a single sum over all integers — positive and negative:

f(x) = \sum_{n=-\infty}^{\infty} c_n\, e^{i n\pi x / L}, \qquad c_n = \frac{1}{2L}\int_{-L}^{L} f(x)\, e^{-i n\pi x / L}\,dx.

One coefficient, one formula

This is the same idea as before — projection onto orthogonal building blocks — but now the blocks are the exponentials e^{i n\pi x/L}, which are orthogonal under the complex inner product \int_{-L}^{L} f\,\overline{g}\,dx. There is just one formula for one family of coefficients c_n, and the negative-n terms carry the rest of the information.

The dictionary back to the real coefficients is short:

c_0 = \frac{a_0}{2}, \qquad c_n = \frac{a_n - i b_n}{2}, \qquad c_{-n} = \frac{a_n + i b_n}{2} = \overline{c_n}.

For a real function the coefficients come in conjugate pairs, c_{-n} = \overline{c_n}, and |c_n| is the strength of frequency n — the function's spectrum.

Complex exponentials are eigenfunctions of differentiation: \frac{d}{dx}e^{ikx} = ik\,e^{ikx}. Differentiating a complex Fourier series just multiplies each c_n by i n\pi/L — no product rule, no sign-juggling between sines and cosines. That single fact makes the exponential form the working language of signal processing and quantum mechanics, and it sets up the Fourier transform cleanly.

A picture worth the whole formula

Euler's formula has a completely concrete picture. Mark a point on a circle of radius 1, at angle \theta measured round from the positive horizontal axis. That point's horizontal (real) coordinate is \cos\theta and its vertical (imaginary) coordinate is \sin\theta — which is exactly what e^{i\theta} means. As \theta increases the point simply spins round the circle at constant speed; each term c_n e^{in\pi x/L} in the complex series is one such spinning point, turning n times as fast as the fundamental and stretched/rotated by the complex number c_n.

Drag the slider below and watch the dashed shadows — the horizontal shadow is \cos\theta, the vertical shadow is \sin\theta — trace out exactly the two real building blocks the exponential is quietly stitching together.

Worked example: converting a real series into exponential form

Suppose (with period 2\pi, so L = \pi) a function's Fourier series is the short trigonometric polynomial

f(x) = 3 + 4\cos x - 2\sin x + \cos 2x,

so a_0 = 6, a_1 = 4,\ b_1 = -2, a_2 = 1,\ b_2 = 0, and every other coefficient is zero. Apply the dictionary term by term:

c_0 = \frac{a_0}{2} = 3, \qquad c_1 = \frac{a_1 - ib_1}{2} = \frac{4 + 2i}{2} = 2+i, \qquad c_{-1} = \overline{c_1} = 2-i, c_2 = \frac{a_2 - ib_2}{2} = \frac{1}{2}, \qquad c_{-2} = \overline{c_2} = \frac{1}{2}.

So the same function, in exponential dress, is

f(x) = 3 + (2+i)e^{ix} + (2-i)e^{-ix} + \tfrac12 e^{2ix} + \tfrac12 e^{-2ix}.

Check they really agree. At x = \pi/2 the real form gives f(\pi/2) = 3 + 4\cos\tfrac\pi2 - 2\sin\tfrac\pi2 + \cos\pi = 3 + 0 - 2 - 1 = 0. In the exponential form, e^{i\pi/2} = i, e^{-i\pi/2} = -i, e^{i\pi} = e^{-i\pi} = -1, so

f(\pi/2) = 3 + (2+i)(i) + (2-i)(-i) + \tfrac12(-1) + \tfrac12(-1) = 3 + (-1+2i) + (-1-2i) - 1 = 0.

The two imaginary parts 2i and -2i cancel exactly, leaving the same real answer, 0, that the cosine-and-sine form gave directly. That cancellation is not a coincidence — it is guaranteed whenever c_{-n} = \overline{c_n}, which is exactly what keeps a real-valued function's exponential series real at every x.

Worked example: the payoff — one formula for every index

The real gain shows up on an infinite series. The classic sawtooth wave f(x) = x on -\pi < x < \pi (period 2\pi) is odd, so every a_n = 0, and its sine coefficients are b_n = \dfrac{2(-1)^{n+1}}{n} for n \geq 1. In the real form that already needs two separate rules: one formula for the sines, and the blanket statement "no cosines at all."

Convert with the dictionary. For n \geq 1, c_n = \dfrac{0 - ib_n}{2} = \dfrac{-i(-1)^{n+1}}{n}, and c_{-n} = \overline{c_n} = \dfrac{i(-1)^{n+1}}{n}. Now substitute n \to -n directly into the first formula:

c_{-n} \overset{?}{=} \frac{-i(-1)^{(-n)+1}}{-n} = \frac{i(-1)^{1-n}}{n} = \frac{i(-1)^{n+1}}{n} \quad\checkmark

(using (-1)^{1-n} = (-1)^{n+1} since they differ by an even power). It matches perfectly. So the single formula

c_n = \frac{-i(-1)^{n+1}}{n}, \qquad n \neq 0,

already covers every nonzero integer, positive or negative, with no separate case for "which sign of n" and no bookkeeping about sines versus cosines. That is the compactness the exponential form buys: one index set (all integers), one formula, no exceptions.

It is tempting to think the negative-n terms are some kind of mathematical bookkeeping trick — extra baggage you could drop if you only cared about "real" frequencies. They are not optional. A single term c_n e^{in\pi x/L} on its own is generally complex-valued; it is only when it is paired with its partner c_{-n}e^{-in\pi x/L} = \overline{c_n e^{in\pi x/L}} that the imaginary parts cancel and the sum comes out real. Drop the negative-n half of the spectrum and you no longer have the same real function — you have thrown away exactly the information needed to keep it real. Every negative index carries genuine, necessary information; it is simply the "mirror image" of a positive one, not a duplicate.

If you open a textbook on digital signal processing, control theory, or quantum mechanics, you will almost never see a Fourier series written with separate a_n's and b_n's — you will see \sum c_n e^{in\omega x}. The exponential form is what MP3 encoders, WiFi chips, and MRI scanners are actually built around under the hood: it is the natural language for the Fourier transform that follows it, and for describing how a "negative frequency" spins the opposite way round the circle to a positive one. The sine-and-cosine version you met first is the friendly on-ramp; this exponential form is the motorway everyone actually drives on.

See it explained