Pluck a guitar string and something strange is happening in the air that reaches your ear. A tuning fork produces something close to a single pure tone: one frequency, one clean sine wave pushing the air back and forth. A plucked string does not. Look at the actual waveform on an oscilloscope and it is a jagged, lopsided, thoroughly complicated shape, repeating once per period of the note but otherwise looking nothing like a sine wave. And yet your ear, and a spectrum analyzer, both report the same fact: buried inside that complicated repeating shape is the fundamental pitch you hear, plus a specific, discrete set of higher overtones, each at its own volume. Somehow a complicated periodic shape is secretly a sum of simple ones.
That "somehow" is not a vague acoustic fact. It is an exact mathematical statement, and classical field theory already told you where it was heading, in a sentence dropped without proof: "a general field configuration can be decomposed into independent oscillation modes, much as a complicated musical tone can be decomposed into pure frequencies." This topic makes that decomposition precise. It is not a special trick invented for waveforms. It is a direct consequence of ideas already sitting in linear algebra, applied to a vector space you have not yet thought to look at that way: the space of functions itself.
Functions as vectors, integrals as dot products
Recall the central move of that earlier topic: strip an object down to nothing but its rules for addition and scalar multiplication, and many unrelated-looking things turn out to be vectors in disguise — arrows, quadratic polynomials, whatever obeys the ten vector-space axioms. Periodic functions qualify immediately. If and are both periodic with period , so is for any scalars . The set of such functions is closed under linear combination, exactly like or the polynomial space from that topic.
But carried more structure than the bare vector-space axioms supply: a dot product, letting you ask how much of one vector lies along another, and a notion of length and orthogonality built out of it. Functions can carry that structure too. Define, for functions on an interval ,
This plays exactly the role of the dot product. Where adds up products of components, adds up — via an integral instead of a sum — products of function values at every point of the interval. It has the properties a dot product needs: it is linear in each argument, symmetric under , and , vanishing only if is zero everywhere on the interval. Two functions are orthogonal when , in precise analogy with .
Orthogonality of the trigonometric functions
Here is the fact that makes the whole subject work: the infinite family
is mutually orthogonal under on . This is not asserted; it follows directly from the product-to-sum identities. Take two positive integers and use
with , :
For any nonzero integer ,
since vanishes at every integer multiple of ; and for , . If , both and are nonzero, so both terms in the identity integrate to zero:
If , the first term has and contributes , while the second term still has and vanishes. So
The same argument with gives for and for . Finally, , and for every integer (its antiderivative returns the same, even, cosine value at both endpoints, so the bracket cancels). So every sine is orthogonal to every cosine, with no exception at :
This entire family behaves exactly like the mutually perpendicular basis vectors of ordinary space — an orthogonal basis, only for an infinite-dimensional space of functions instead of three-dimensional .
The coefficient formulas
Suppose a periodic function can be written as a combination of these basis functions:
In finite dimensions, linear algebra found the coordinates of a vector in a basis just by matching components. Here there are infinitely many unknowns at once, and matching components directly is hopeless. Orthogonality is what rescues the problem: it lets every coefficient be isolated one at a time, without ever solving a system of equations.
Take the inner product of both sides with for some fixed :
By the orthogonality just derived, every term on the right vanishes except the single term in the cosine sum, which equals :
The identical argument with isolates
and taking the inner product with the constant function gives , the average value of over one period (times two, to match the convention above). Every Fourier coefficient is a projection: multiply by a basis function, integrate, divide by the basis function's own squared length — the exact continuum analogue of for an orthonormal basis of ordinary vectors.
The complex exponential form, and where comes back
Ordinary differential equations built its entire theory of constant-coefficient equations on one observation: the exponential reproduces itself under differentiation, so guessing it turns a differential equation into an algebraic one. When the characteristic roots came out purely imaginary, , Euler's formula converted the complex exponential solutions into the real and pair. Fourier series are built from exactly those same purely-imaginary-root building blocks, just relabeled as functions of position rather than time.
Using Euler's formula in reverse,
substitute these into the real Fourier series and collect terms by exponential. Every and pair, for , contributes to both and , and allowing the index to run over all integers (positive, negative, and zero) absorbs the whole series into one sum:
The relation between and follows directly from matching the two forms; it is bookkeeping, not new physics. What is worth pausing on is why is the natural building block at all: it is the general solution of the same equation type solved on the ordinary-differential-equations page, , whose characteristic roots are — purely imaginary, for exactly the same structural reason a frictionless spring's roots were purely imaginary. Each Fourier mode is, secretly, a tiny undamped harmonic oscillator indexed by .
From series to transform: letting the period run off to infinity
A Fourier series only makes sense for a function that repeats. But most functions worth analyzing in physics — a single pulse, a wave packet, a particle's position probability — do not repeat at all. What happens to the machinery above if the period is allowed to grow without bound?
Define and , the spacing between adjacent allowed frequencies. Then , so the coefficient formula can be rewritten as
and the series becomes
As , two things happen at once: the frequency spacing , so the discrete frequencies crowd into a continuum, and the sum over becomes a Riemann sum in , turning into an integral:
where
is the Fourier transform of . Nothing about the underlying idea changed: still measures how much of frequency is present in , exactly as measured how much of frequency was present in a periodic function. The only difference is that a function without a period has, in principle, every frequency present by some amount, so the discrete list of coefficients becomes a continuous density.
Worked example
Find the Fourier sine series of the square wave for and for , periodic with period , and describe what happens near the jump as more terms are kept. (click to reveal the solution)
Setting up: this is an odd function, . For an odd , every cosine coefficient vanishes: is odd (odd times even), and the integral of an odd function over the symmetric interval is zero. So and for all , and only the sine terms survive (here , so the basis functions are ).
Computing : the general formula is
Since is even (odd times odd), the integral over is twice the integral over , where :
Evaluating the integral,
Using ,
Evaluating for even and odd : if is even, , so . If is odd, , so
Assembling the series: writing for to run over the odd integers only,
Only odd harmonics appear, with amplitudes falling off as — a slow decay, which is itself a signature of the sharp jump in : smoother functions have Fourier coefficients that die off faster.
Near the jump: keeping only finitely many terms of this series produces a curve that approximates the square wave increasingly well almost everywhere, wiggling less and hugging the flat tops more tightly as more harmonics are added. But directly next to each jump, at and , something does not improve: every partial sum overshoots the top value before turning back down, by very nearly of the total jump height, no matter how many terms are included. Adding more terms squeezes that overshoot into an ever-narrower sliver next to the discontinuity, but its height does not shrink toward zero. This persistent overshoot is the Gibbs phenomenon, a general feature of Fourier approximations to any function with a jump discontinuity, not a peculiarity of this particular square wave. At the jump itself, the series converges to the average of the values on either side, , exactly the midpoint of the jump.
Where this leads
Fourier series were built on a finite interval, with a discrete, countable family of allowed frequencies ; the Fourier transform removed the interval and let those frequencies merge into a continuum. Both objects reappear immediately in partial differential equations, the next topic in this track: solving the wave equation on a string of finite length, fixed at both ends, hands back exactly the same sine functions built here, with the coefficients determined by decomposing the string's initial shape into precisely this basis. The square wave solved above will return there as a literal initial condition — a plucked string given that jagged shape at — and the coefficients found here will become the amplitudes of the string's individual vibration modes.