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 is one of the angles that isn’t the right angle then you have

and

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 Imagine moving around the circle in an anticlockwise direction, starting at the right-most point, . After you have rotated through an angle of that is less than 90 degrees (corresponding to less than in radians) the point you are at defines a right-angled triangle, with corners and The hypotenuse of this triangle has length 1 because the point lies on our circle of radius is 1. For this triangle we have and

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 bigger than When you do this, the triangle with corners and no longer has as one of its angles.

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 in analogy with what we had before:

where are the coordinates of the point you are at.

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 . As you moved around the circle your vertical coordinate (the sine) started at and increased steadily until it reached a maximum of when you were on top of the circle. As you kept moving it then dropped down to again in a symmetrical fashion, before reaching a minimum of , and finally coming back up again to 0.

If you plot how the vertical coordinate (in red in the figure below) varies with the angle turned through (from 0 to ) you get a regular wave shape. It starts at 0, goes up to the maximum of 1, then down to 0 again, before dropping to the minimum of -1, and up again to 0.

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 to and a third time travelling from to , and so on. You end up with an infinitely long, perfectly regular wave. The horizontal coordinates (the cosine) give a similarly perfect wave (plotted in blue above), offset against the first one by a distance of along the horizontal axis. This extends our definition of the sine and cosine to angles greater than . (You can also define the sine and cosine for negative numbers by going round the circle in a clockwise direction.)

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 rather than , so you will see something like

We will switch to this notation now. This means that now represents what used to be our angle and that it no longer represents a coordinate of a point on the unit circle. That’s potentially a little confusing, but hang in there and you will get used to it.

The *wavelength* is the distance between two peaks of a wave, and in our example so far this is . That's because to go through one complete cycle of our wave we had to turn through an angle of .

It’s also possible to create waves with different wavelengths. To create a wave with wavelength you multiply the variable by to get the functions

By making the wavelength shorter you essentially squeeze the wave and by making it longer you stretch it.

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 to get

This constant is called the *amplitude* of the wave.

In the Geogebra applet below use the sliders to vary the amplitude and wavelength for the sine wave (red) and the cosine wave (blue).

### 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 and As before represents the position on the horizontal axis, while denotes time. Suppose you want your wave to be moving along at a speed of The functions

produce such moving waves. If you are keeping the time variable fixed then you are essentially seeing a snapshot in time, giving you a stationary wave just like the ones we had above. If you are keeping your location on the -axis fixed, then you are seeing the corresponding -variable as it moves up and down over time. This is a bit like watching a particular point on the surface of a lake move up and down as waves ripple through.

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 fixed. In this case you see a snapshot in time which looks like and ordinary sine (or cosine) wave, only perhaps shifted along the horizontal axis by some distance. Focusing on the blue dot corresponds to keeping the variable fixed. (We are not giving you the option of changing the wavelength and amplitude here as too much choice can be confusing!)

The reason the argument of our functions now is is that in a time period of length a wave travelling at speed will have travelled a distance of The height of the wave at point along the -axis at time will therefore be the same as the height was at time 0 at the point because that’s how far the wave has travelled in time .

### 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. *