Algebra, Geometry and Trigonometry at a Glance
Fourier's Idea That Waves Can Build Almost Any Signal
See how sums of sines and cosines rebuild sharp, irregular signals, how to find each wave's strength, and where the method has limits.
Key takeaways
- A periodic signal can be broken into sine and cosine waves whose frequencies are whole-number multiples of one base frequency.
- Each coefficient is found by an integral that picks out one wave and cancels all the others.
- Sharp corners and jumps require many high-frequency waves, and near a jump the partial sums keep a small overshoot.
- Breaking signals into frequencies underlies heat theory, audio and image compression, filtering and medical imaging.
Fourier's idea is that a complicated repeating signal can be written as a sum of simple sine and cosine waves, each with its own frequency and strength. Add enough of them in the right proportions and you can reproduce a jagged musical tone, a pulse in a circuit, or the temperature along a heated bar.
The word "almost" matters. The method works for a very wide class of signals, including ones with jumps and corners, but the sense in which the sum matches the original needs care. That care shaped much of modern mathematics.
Where the idea came from
Joseph Fourier, a French mathematician and scientist, was studying how heat flows through solid bodies. He presented early results in 1807 and published his major book on heat in 1822. His claim that very general functions could be expressed as trigonometric series struck some leading mathematicians as insufficiently justified.
He was not the first to add waves together. In the eighteenth century, Daniel Bernoulli had argued that the motion of a vibrating string could be built from simple sine shapes. Fourier pushed the idea much further, gave a systematic recipe for the coefficients, and used it to solve real problems.
The basic recipe
Take a signal f(t) that repeats every 2π units of time. Its Fourier series has the form
f(t) = a₀/2 + a₁ cos t + b₁ sin t
+ a₂ cos 2t + b₂ sin 2t
+ a₃ cos 3t + b₃ sin 3t + … The term a₀/2 is the average value. The pair with index n completes n full cycles in the period, and it is called the nth harmonic. In music, the first harmonic sets the pitch you hear, and the mix of higher ones helps give an instrument its tone color.
If sine and cosine feel tied to triangles in your mind, it helps to remember that they also describe motion around a circle, which is why they repeat so naturally.
How to find each coefficient
The key property is called orthogonality. Multiply two different waves from the list and integrate over one full period, and the positive and negative areas cancel exactly. For positive whole numbers m and n,
∫ sin mt · sin nt dt over [−π, π] = 0 if m ≠ n
= π if m = n Cosines behave the same way, and any sine paired with any cosine gives 0. So to find how much of sin nt hides inside f, multiply f by sin nt and integrate. Every other wave drops out.
aₙ = (1/π) ∫ f(t) cos nt dt
bₙ = (1/π) ∫ f(t) sin nt dt (both over [−π, π]) This is like finding the coordinates of a vector by taking dot products with perpendicular axes. The difference is that there are infinitely many axes.
A worked example: the square wave
Let f(t) equal −1 for t between −π and 0, and +1 for t between 0 and π, repeating after that. The function is odd, meaning f(−t) = −f(t), so every aₙ is 0. For the sine terms, the two halves contribute equally.
bₙ = (2/π) ∫ sin nt dt over [0, π]
= (2/π) (1 − cos nπ) / n
= 4/(nπ) if n is odd, 0 if n is even So the square wave is
f(t) = (4/π) ( sin t + (sin 3t)/3 + (sin 5t)/5 + … ) Test it at t = π/2, where f should equal 1. The sines alternate between 1 and −1, leaving (4/π)(1 − 1/3 + 1/5 − 1/7 + …). The bracketed sum is a classical series equal to π/4, so the total is exactly 1. The early partial sums swing around that target: about 1.273, then 0.849, then 1.103, then 0.922. They close in slowly.
Jumps, overshoot and convergence
At t = 0 the square wave jumps from −1 to 1. Every sine in the series is zero there, so the sum gives 0, the midpoint of the jump. This is typical behavior for well-behaved functions.
Near the jump something odd happens. Each partial sum rises above 1 before settling. Adding more terms squeezes that bump closer to the jump but does not shrink its height, which approaches about 9 percent of the size of the jump. This is the Gibbs phenomenon. At any fixed point away from the jump, the sums still converge to the correct value.
So when does a Fourier series behave? Some established answers:
- In 1829 Dirichlet proved convergence under conditions that cover most signals met in practice, such as a function with finitely many jumps and finitely many ups and downs in each period. At a jump the series gives the average of the two sides.
- Continuity alone is not enough. In the 1870s du Bois-Reymond found a continuous function whose Fourier series diverges at a point.
- If a function has finite energy, meaning the integral of its square is finite, the error measured as average squared difference goes to zero.
- In 1966 Lennart Carleson proved that such functions also have series converging at almost every point, in the technical sense of measure theory.
These questions pushed mathematicians to sharpen the meaning of "function", "integral" and "convergence".
Smoothness shows up in the coefficients
You can judge a signal's roughness by how fast its coefficients shrink. The square wave has jumps, and its coefficients fall off like 1/n. A triangle wave is continuous but has sharp corners, and its coefficients fall off like 1/n². The smoother the function, the faster the high harmonics fade, and very smooth periodic functions have coefficients that shrink faster than any fixed power of 1/n.
This explains why some signals are easy to approximate. For the square wave, the 99th harmonic still has size about 4/(99π), roughly 0.013. In a signal whose coefficients behave like 1/n², the matching term would be about a hundred times smaller.
There is also an accounting rule, called Parseval's identity. The average power of a signal equals the sum of the powers carried by its separate waves. For our series, with no constant term in the square wave,
(1/π) ∫ f(t)² dt over [−π, π] = b₁² + b₃² + b₅² + …
2 = (16/π²) (1 + 1/9 + 1/25 + …)
1 + 1/9 + 1/25 + … = π²/8 A statement about a switching signal has handed you the value of an infinite sum. The first harmonic alone carries 8/π², about 81 percent, of the square wave's power.
Why waves suit physics
Fourier's heat problem shows the payoff. Consider a thin bar from x = 0 to x = π with both ends held at temperature zero. A starting temperature shaped like sin nx keeps its shape and simply fades, multiplied over time by e raised to −kn²t, where k is a positive constant that depends on the material.
Wiggly waves, with large n, die out much faster than broad ones. Since any reasonable starting temperature is a sum of such shapes, and the heat equation is linear, you can follow each wave separately and add the results. This is why a hot spot smooths out. The approach is developed in solving equations on an interval, and the same strategy handles vibrating strings.
Beyond repeating signals
A signal that never repeats, such as a single clap, needs a continuous range of frequencies. The sum becomes an integral called the Fourier transform. The transform from a mathematician's point of view treats it as a way of switching between two descriptions of one object, by time and by frequency.
Computers work with samples. The fast Fourier transform, popularized by Cooley and Tukey in 1965 and foreshadowed in unpublished work by Gauss, computes the frequency content of sampled data far more quickly than the direct method. Why the fast transform mattered explains the speedup.
Sampling has a rule of its own: to capture frequencies up to some limit without confusing them, you need to sample at more than twice that limit.
Where you meet it
- Sound. Equalizers boost or cut frequency bands. Audio compression stores fine detail more coarsely where listeners are unlikely to notice.
- Images. The common JPEG format uses a close relative, the cosine transform, on small blocks of pixels.
- Medical imaging. Magnetic resonance scanners collect data that is essentially Fourier information about the body, then invert it.
- Science. Looking for strong frequencies helps find cycles in tides, vibrations in machines and periodic signals from space.
A way to experiment yourself
Open any graphing tool and plot (4/π) sin t. Then add the third harmonic divided by 3, then the fifth divided by 5. You will watch the flat tops and steep sides emerge, along with small ripples whose number grows as their width shrinks.
Next, try keeping the same strengths but shifting one wave in time. The power at each frequency is unchanged, yet the shape can look very different. A spectrum of strengths alone does not determine a signal. You also need the phases, which in the series above are carried by the balance between each aₙ and bₙ.
Common misconceptions
"Any function at all can be rebuilt." The class is huge, but conditions apply, and "rebuilt" may mean pointwise, almost everywhere or on average.
"The waves are physically there." Sometimes they correspond to something you can hear or see. In other cases they are a convenient coordinate system, as useful and as chosen as any other.
"More terms fix everything." They reduce the average error, but the Gibbs overshoot near a jump keeps its height. Engineers often taper the higher coefficients to soften it, at the cost of a less sharp edge.