Filming is currently underway on a special online course based on this blog which will include videos, animations and work-throughs to illustrate, in a visual way, how the Fourier Transform works, what all the maths is all about and how it is applied in the real world.
Click here to reserve your free module
The module will be emailed to you the moment the course goes live.
In the last post we talked about convolution and how by convolving lots of different sine waves at different frequencies over our signal we can discover the relative magnitudes and phases of each frequency component in our signal. We then demonstrated how you didn’t need to do the whole convolving operation (multiplying the signal by our known sine wave at every single phase) to get the desired result. It is enough to multiply the signal by one known sine wave and one known cosine wave at each frequency.
This led us to a 7 stage process through which we could identify the different sine waves, their frequencies, relative amplitudes and phases contributing to our signal. Here is a reminder of that process:
- Multiply every point of our signal by every point of a cosine wave of known frequency and amplitude.
- Add together all of the results from our multiplication operation. This gives us the cosine contribution for this frequency.
- Multiply every point of our signal by every point of a sine wave of known frequency and amplitude.
- Add together all of the results from our multiplication operation. This gives us the sine contribution for this frequency.
- Add the Sine and Cosine components together.
- Go back to (1) only now using a slightly higher frequency.
- Repeat steps 1-6 until we have covered every possible frequency in our signal.
What we’re going to do now is combine each of the 7 stages into one mathematical equation: The Fourier Transform equation.
We will call our signal x(t), that is some arbitrary function of time such as the one we used in the last post:

Stage 1
In stage 1 we multiply our signal by a cosine wave at a known frequency, lets call it f. However, remember we said in part 4 that our cosine function expects to receive an angle as its input not a value of time. Therefore, to convert our known frequency from a time signal to an angle, θ:
This means we can write stage 1 mathematically as:
Stage 2
In stage 2, we add together all the results from our multiplication operation. Remember that both our signal and our known cosine wave are continuous. This means that they exist for all possible values of time. The increment of time between one point of our signal and the next or one point on our cosine wave and the next is infinitesimally small. Also sine waves and cosine waves go on forever from minus infinity (the beginning of time) until infinity (the end of time). Therefore adding all the results together is known as integrating them over time. This we write as follows.
The dt tells us that it is the value of time, t, that is changing from minus infinity to infinity:
Stage 3 and Stage 4
In stages 3 and 4, we multiply our signal x(t) by a sine wave of known frequency: f then integrate the result.
Stage 5
In stage 5, we add the two integrals together. The reason we do this is not actually to add the two results together. That would get us nowhere. The whole point of the Fourier Transform is that it tells us that our wave is made up of lots of pairs of waves, cosine and sine waves, with different amplitudes at each of the component frequencies in our signal. The Fourier Transform seperates out these waves for us. If we were to actually add together the results of the two integrations above (remember the results of the integration are only numbers) that would get us nowhere. So what is stage 5 for? Stage 5 is there simply so that we can write down the process in one mathematical equation rather than two as we have above. Therefore we need some mathematical operator to keep them seperate.
That operator is our old friend from Part 4 of this blog, the square root of -1 or as he is otherwise known “i”. Remember, “i” is an imaginary number. It doesn’t really exist. Therefore, anything we multiply it by can’t be calculated. This is ideal for our situation where we want to make sure that the cosine and sine terms can’t actually be added together. Therefore, we combine the two integrals above by multiplying the sine term by “i” before we add them together. This is written as:
Mathematicians are an ecological bunch who like to save on ink and make their equations shorter (and therefore more readable) wherever possible. Both our known cosine and sine waves are multiplied by x(t). Therefore we can put these terms in brackets and rewrite our equation in a slightly more economic manner:
If we are already trying to save on ink then why not go the whole hog? The cosine + sine term in the brackets looks very similar to the polar representation of a complex number we discussed in part 4 of this blog. Therefore we can rewrite the equationin an even shorter form because:
Therefore:
So we can rewrite our integral as:
There is one more little modification we need to make to the above equation before we continue. Although it is beyond the scope of this blog, I would just like to briefly mention the Inverse Fourier Transform. If the Fourier Transform takes a signal and breaks it down into its component frequencies, the Inverse Fourier Transform, as its name suggests, does the opposite. It takes the component frequencies of a signal and reconstructs the original signal from them. The equation for the Inverse Fourier Transform looks very similar to the equation for the Fourier Transform. Although, to us mere mortals in the outside world, mathematicians talk in a very confusing way that we seldom fully understand, this is only because they are trying to make themselves very clear and understandable in a scientific way. As the equations for the Fourier and Inverse Fourier Transforms look very similar, they wanted to make it very obvious to the eye which of the transforms is being used. Therefore they decided to add a little minus sign in one of the tranforms’ equation. The widely accepted convention is to denote the Fourier Transform with the minus sign and the Inverse Fourier Transform without it. So the above equation is generally written as:
Now you may think that this would change the result of the calculation. But this is not the case if we look at what this minus sign actually means. Let’s rewrite the above equation in its polar form:
All it does is change the plus sign between the cos and sine terms to a minus sign. As I mentioned above, we are not really adding or subtracting these two terms anyway so it doesn’t really matter which sign goes between them, so long as they are kept seperate which is what the multiplication by “i” does.
Stage 6 and Stage 7
Stages 6 and 7 require us to repeat the whole operation for every possible frequency. In mathematical terms we say that we are producing a function that changes with frequency, lets call it X(f). This gives us the Fourier Transform equation:
So there we have it! The gibberish that was the Fourier Transform equation we first met in part 2 of this blog, if I have done my job correctly, should now make sense.
But wait a moment! What does our new function X(f) actually tell us?
Just as x(t) was a function of time, i.e. the function changed over time, X(f) is a function of frequency, i.e. the function changes over frequency. However, remember that X(f) is a complex function meaning that it is made up of a real part and an imaginary part. The real part is made up of the cosine contributions and the imaginary part is made up of the sine contributions of each frequency.

On its own, this doesn’t look like anything to write home about. However, remember what is so useful about complex numbers. They give us two very useful pieces of information: Magnitude (or amplitude) and Phase:
1. Magnitude
We can take each point from the cosine contribution graph (the real part of our complex function, let’s call it ℜ) and each point from the sine contribution graph (the imaginary part of our complex function, let’s call it ℑ) and by using pythagoras’ theorum we can find the relative magnitude (let’s call it M) of each frequency’s contribution:


The magnitude graph tells us that we have a signal that is made up of 3 frequency components (5, 10 and 15Hz) and we can read off their realtive amplitudes from the graph (72, 54 and 72 respectively).
2. Phase
We can take each point from the cosine contribution graph (the real part of our complex function, let’s call it ℜ) and each point from the sine contribution graph (the imaginary part of our complex function, let’s call it ℑ) and by using the inverse tangent function we can find the phase (let’s call it P) of each frequency’s contribution:


The phase graph tells us that we have a signal that is made up of 3 frequency components (5, 10 and 15Hz). The 5Hz component is shifted by -90º (i.e. it is a sine wave), the 10Hz component is shifted by -60º and the 15Hz component is shifted by -30º.
So what does the Fourier Transform do?
It tells us which frequencies make up our signal, what the relative amplitude or magnitude of each frequency is and by how much each frequency component is shifted in time (otherwise known as its phase).
How does it do it?
By convolving known sine and cosine waves at lots of different frequencies with the signal being tested and adding the results of each convolution operation together to producing 2 lists of numbers. One list represents the cosine contribution of each frequency and the other represents the sine contribution of each frequency. These lists can then be used to calculate the relative amplitude against frequency by using Pythagoras’ theorum and a graph of phase against frequency by using the inverse tangent function.
But just before you thought we had finished…
I’m afraid I have cheated slightly.
All of the above is purely theoretical. It cannot actually be done in the real world. Why not? One word: INFINITY. This gives rise to three problems:
The first is that real world signals do not go on forever. To bring an analogy: Even when your mother-in-law is giving you an earbashing, although it might seem to go on forever, at some point, she is going to stop talking. The sound signal starts at one point in time and ends at another.
The second is that when we look at signals, we simply cannot look at them as continuous signals. We have to sample them and only look at them at certain points in time otherwise we would have an infinite amount of data to calculate which would take forever.
The third is that if we are trying out lots of different frequencies, we simply cannot try out every single frequency in existance. Between 1Hz and 2Hz there are an infinite number of increments, just as there are between 2Hz and 3Hz and so on. We have to try frequencies at intervals like 1Hz, 2Hz, 3Hz etc.
As you might have guessed, I haven’t been working on this blog since the beginning of creation, and I intend to finish it before the end of time so, I’m sorry to say that I have taken a short cut.
I’ve actually been using the Discrete Fourier Transform to calculate my results and I have conveniently ignored just what happens in between the specific frequencies I have been testing.
This leads me to my next two posts in the Fourier Transform blog. In part 7 we are going to look at how we use the Discrete Fourier Transform to analyze non-continuous (or sampled) signals and in part 8 we are going to look at “Windowing” – a way of dealing with non-infinite signals (signals that don’t go on for ever).
Again, I would like to thank Professor Robert Cottis for his helpful suggestions which enabled me to improve this post.
Next Time: The Discrete Fourier Transform >>









