
Think of a right-angled triangle. Then you'll probably remember from school that you can use the sine and cosine functions to find out more about the triangle. If

For the angle α, the sine gives the ratio of the length of the opposite side to the length of the hypotenuse. The cosine gives the ratio of the length of the adjacent side to the length of the hypotenuse. (Image by Dnu72 – CC BY-SA 3.0.)
The sine and the cosine functions can do a lot more than help you solve geometry problems. They can be used to build any waveform — the music you are listening to, the digital signal you are sending over wifi, even the swell on the sea — no matter how complicated these natural or human made oscillations might be.
Going round and round
The first step to constructing a wave is to imagine a circle of radius 1 drawn in Cartesian coordinates, with the centre of the circle lying at the point

A right-angled triangle formed from a point on the unit circle.
You can continue to move around the circle anti-clockwise to make the angle

When α is greater than π/2, then the right-angled triangle formed from a point on the unit circle no longer contains the angle α.
However, there is nothing to stop you from extending the definitions of the sine and cosine of
What happens to the sine and cosine as you move once around the circle? In one circuit of the circle you will have turned through an angle of
If you plot how the vertical coordinate (in red in the figure below) varies with the angle turned through (from 0 to

The red wave is the sine of the angle plotted against the angle (coming from the vertical coordinate) and the blue wave is the cosine of the angle plotted against the angle (coming from the horizontal coordinate).
This wave pattern repeats as you carry on going around your circle a second time, increasing the angle you turned through from

The red wave is the sine of the angle plotted against the angle (coming from the vertical coordinate) and the blue wave is the cosine of the angle plotted against the angle (coming from the horizontal coordinate).
Squeezing and stretching
We've now seen how moving around the unit circle can give us two functions, the sine function and the cosine function, each of which comes with a graph that describes a regular wave. When you encounter these functions in text books the variable is usually called
The wavelength is the distance between two peaks of a wave, and in our example so far this is
It's also possible to create waves with different wavelengths. To create a wave with wavelength
In the Geogebra applet below, use the slider to change the wavelength of the sine (red) and cosine (blue) waves.
Going higher and going lower
The peaks of the waves we have created so far have the value 1 and the troughs have the value -1. To create a wave that has higher peaks and lower troughs, you simply multiply the entire function by a constant
In the Geogebra applet below use the sliders to vary the amplitude
Speeding up and slowing down
So far the waves we have created are stationary: they don't change over time. However, it is also possible to create waves that travel along. Our wave function will now be a function of two variables
In the Geogebra applet below use the slider to change the speed. Setting the speed to 0 (or pressing the pause button) corresponds to stopping time, so you're keeping the time variable
The reason the argument of our functions now is
Decoding messages
At first sight these sine and cosine waves we have created appear too perfect to tell you much about the waves we encounter in real life. But you can hear one in action if you strike a tuning fork. The sound you hear is the result of the vibrations of your ear drum, stimulated by the sound wave from the tuning fork travelling through the air. For a tuning fork, if you plotted the intensity, or pressure, of this vibration over time, you would see a perfect sine wave in action.


The sound wave from a tuning fork (top), compared with that of human speech (bottom).
As you can see the sound wave of something like speech is more complicated. But any sound wave, indeed any repeating function, can be broken up into a number of sine waves of various frequencies and amplitudes (intensities). This is the result of work that started with the French mathematician Joseph Fourier, who lived through the French revolution in the eighteenth century. The expression of a sound wave, or any signal varying over time, as the sum of its constituent sine waves, is known as the Fourier transform of that signal. (You can read a more detailed explanation of the maths involved here — the maths is quite complicated but the mathematical ideas involved are lovely!)

The function f varies in time – representing a sound wave. The Fourier transform process takes f and decomposes it into its constituent sine waves, with particular frequencies and amplitudes. The Fourier transform is represented as spikes in the frequency domain, the height of the spike showing the amplitude of the wave of that frequency.
About this article
This article was produced as part of our coverage of the Dispersive hydrodynamics: mathematics, simulation and experiments, with applications in nonlinear waves programme hosted by the Isaac Newton Institute for Mathematical Sciences. You can find more content about the programme here.
Rachel Thomas and Marianne Freiberger are the Editors of Plus.
This article is based on the book Numericon: A journey through the hidden lives of numbers by Marianne Freiberger and Rachel Thomas and our article Fourier transforms of images.
This article was produced as part of our collaboration with the Isaac Newton Institute for Mathematical Sciences (INI) – you can find all the content from the collaboration here.
The INI is an international research centre and our neighbour here on the University of Cambridge's maths campus. It attracts leading mathematical scientists from all over the world, and is open to all. Visit www.newton.ac.uk to find out more.
