 So the mathematical beauty of i, the square root of minus one, is all very well. But what used to us is a number that cannot be calculated. Well, in the Fourier transform, i serves a very important purpose indeed. It keeps things separate, which is exactly what we want from an algorithm that splits a signal apart into its constituent sine waves. How does i keep things separate? And how does this help us? Back in the lecture on phase, we saw how any phase shifted sine wave can be made by adding together a non-phase shifted cosine wave and a non-phase shifted sine wave at the same frequency but different amplitudes. If I was to write this down in a mathematical equation, then my phase shifted sine wave, which I'm going to call S of theta, would be S of theta equals A times cosine of theta plus B times sine of theta, where A is the amplitude of the cosine wave and B is the amplitude of the sine wave and theta is the angle. In the lecture on Euler's identity, we saw how Euler's number E is related to the sine and cosine functions. But we have to multiply the sine part of the equation by the imaginary number i to make the relationship work. We're now going to use this relationship to create an entirely new type of number called a complex number. The numbers we have always known up to now, one, two, three and so on, are made up of only one dimension. We could represent them simply the distance along a single line. Even minus numbers are points on the same line. They're just points that go off in the opposite direction. Let's call these simple numbers for now. Complex numbers, on the other hand, are made up of two dimensions, a real dimension and an imaginary dimension. The real dimension is any simple number and the imaginary dimension is any simple number multiplied by i. So an example of a complex number is three plus four i. Here is where i keeps things separate for us. If this was any normal sort of number, three plus four, for example, we could simply add the two numbers together to get seven. Like walking a distance of three units in on-going line and then continuing to walk another four. But this is not what we want to do. We want to keep the three and the four mathematically separate. We want to make sure that we can't simply add them together. This is what i does for us. It forces the imaginary part of our complex number into its own independent dimension. It changes our simple one-dimensional world into a more complex world with two dimensions rather like a two-dimensional graph. The three is in the real dimension which we plot along the x-axis and the four i is in the imaginary dimension which we plot along the y-axis. So a complex number can be represented as a coordinate described by the distances along two perpendicular axes. The axes must be perpendicular as only perpendicular lines are truly independent of each other. That is to say the real number can occupy any value on the x-axis and the imaginary number can occupy any value along the y-axis. I'm now walking around in a two-dimensional world where any location in that world can be described by a complex number. We call this world the complex plane. We're now going to combine all the different principles that we have learned into one set of equations. Here's how we're going to do it. We already have the first equation, 3 plus 4i. This is known as the Cartesian form of a complex number as it describes the Cartesian coordinate of my complex number point, 3 by 4. I'm going to use this as the apex of a right-angled triangle similar to those we drew in the phase lecture. Remember, I could arrive at the same point of my triangle in one of two ways, either by walking along the base of the triangle a distance of three units and then walking up inside a distance of four units. Alternatively, I could set off at an angle of about 53.1 degrees which I calculated using the inverse tangent rule and walking five units along its hypotenuse which I calculated using Pythagoras' theorem. Now, the base of the triangle represents the amplitude A of the cosine wave and the height of the triangle represents the amplitude B of the sine wave. This produces a sine wave which I called S of theta with an amplitude of 5 represented by the length of the hypotenuse of the triangle and a phase shift of 53.1 degrees represented by the angle of the triangle here. However, another way of calculating the length of the base of the triangle is to take the cosine of the angle and multiply it by the length of the hypotenuse. 5 times the cosine of 53.1 degrees equals 3. Another way of calculating the length of the height of the triangle is to take the sine of the angle and multiply it by the length of the hypotenuse. 5 times the sine of 53.1 degrees equals 4. So I could describe my complex number point in another way by writing it in its polar form. 5 times the cosine of 53.1 degrees plus 5 times I times the sine of 53.1 degrees. It's called polar form as in geometric terms a pole is a point and a polar is a line leading to that point. We can describe this line by its length and by its angle. So the polar form of a complex number rather than giving us the coordinates of a point in the complex plane like the Cartesian form does is the angle and distance of that point from the origin. But Euler gave us Euler's formula which links Euler's number E to the polar form of a complex number. So we can write our number in yet another form in exponential form using Euler's number. 5 times E to the I times 53.1 degrees. We can therefore describe the amplitudes of the cosine and sine components A and B of our phase shifted sine wave S of theta in three different ways. We could describe them in Cartesian form using the distance we walked along the X and Y axes to describe the coordinates of the apex of the triangle in the complex plane 3 plus 4I which are the amplitudes A of the cosine wave and B of the sine wave respectively. We could describe them in polar form using the length of the hypotenuse and the angle of the triangle which corresponds to the amplitude and phase shift of S of theta. And finally Euler showed us that by using his formula we can describe them in exponential form as 5 times E to the I times 53.1 degrees. So 5 times E to the I times 53.1 degrees is equal to 5 times the cosine of 53.1 degrees plus 5 times I times the sine of 53.1 degrees which is equal to 3 plus 4I. What use is this set of equations to us? Well firstly using the Cartesian form we can easily see the amplitudes of the cosine and sine waves that make up our phase shifted wave. Using the exponential form we can easily see the amplitude and the phase shift of the resultant wave. And using the polar form we can convert from the exponential form to the Cartesian form. So complex numbers gives us an easily readable definition for each sine wave making up our signal. Secondly the Fourier transform involves rather a lot of mathematical operations which would be fiddly to do if we had to write each sine wave out in full. By choosing the most convenient of the three different forms of actually writing the equation of our sine wave down we can do these mathematical operations more easily. Let's do an example. The two operations that we're going to need to do again and again in the Fourier transform are adding and multiplying. So let's first add together two complex numbers. Let's add 3 plus 4i and 9 plus 2i. To do this we need to group together the real and imaginary parts of the number. The 3 and the 9 are real so we group those together. The 4 and the 2 are both multiplied by i so they are imaginary. So let's rewrite the sum as 3 plus 9 and 4i plus 2i. Well that's easy to do. 3 plus 9 is 12 and 4i plus 2i is 6i. So the result is 12 plus 6i. Subtraction is just as easy. Let's subtract 9 plus 2i and 3 plus 4i. Again we group together the real and imaginary terms. 3 minus 9 is minus 6 and 4i minus 2i is 2i so the result is minus 6 plus 2i. How about if we were to multiply the two complex numbers from the previous example? 3 plus 4i times 9 plus 2i. When it's just like multiplying brackets we use the FOIL method. FOIL stands for first, outside, inside, last. We have to multiply the numbers together in four stages. Stage 1 we multiply the two first terms in each bracket. 3 times 9 equals 27. Stage 2 we multiply the two outside terms. 3 times 2i equals 6i. Stage 3 we multiply the two inside terms. 4i times 9 equals 36i. Stage 4 we multiply the two last terms in each bracket. 4i times 2i equals 8i squared. But remember that i squared equals minus 1 so the answer to this last stage is minus 8. This all gives us 27 plus 6i minus 8 plus 36i. Now we group together the real and imaginary terms just as we did before when we were adding. 27 minus 8 and 6i plus 36i which gives us the result 19 plus 42i. However when multiplying it could be easier to express the two complex numbers in exponential form because then we could multiply them together using the exponential products rule. The exponential product rule states to multiply two exponential numbers simply add together their indices e to the power a times e to the power b equals e to the power a plus b. Let's leave Euler out of it a second and take a simple example. If I want to multiply 2 to the power 3 by 2 to the power 4 all I have to do is add together the 3 and the 4 to get the answer. 2 to the power 3 times 2 to the power 4 equals 2 to the power 3 plus 4 which is equal to 2 to the power 7. Let's look at why this is true. 2 to the power 3 equals 2 times 2 times 2 2 to the power 4 equals 2 times 2 times 2 times 2 If I write this out in full to multiply the two numbers together I simply do 2 times 2 times 2 times 2 times 2 times 2 times 2 If I count up all the 2's you can see why this is the same as writing 2 to the power 7 Now the 2 could be any number Euler's number for example So exactly the same method works for 3 plus 4i times 9 plus 2i if we write them out in exponential form To do this we use Pythagoras and the inverse tangent rule So for 3 plus 4i Pythagoras gives us the root of 3 squared plus 4 squared equals 5 The inverse tangent rule gives us inverse tan of 4 divided by 3 is roughly equal to 53.1 degrees For 9 plus 2i Pythagoras gives us the root of 9 squared plus 2 squared is roughly equal to 9.2 And the inverse tangent rule gives us inverse tan of 2 divided by 9 is roughly equal to 12.5 degrees So we can rewrite the multiplication in the form 5 times e to the power of 53.1 degrees times i times 9.2 e to the power of 12.5 degrees times i The 5 and the 9.2 we multiply as normal giving us 46 The 53.1 degrees and the 12.5 degrees and together giving us 65.6 degrees which gives us the overall result of 46 times e to the power of 65.6 degrees times i We can then use the polar form to convert this back into the Cartesian form and show that the two methods give the same answer 46 times cosine of 65.6 degrees is equal to 19 and 46 times i times sine of 65.6 degrees is equal to 42 i Now let's try to divide 3 plus 4 i by 9 plus 2 i How about if we use the FOIL method to divide the numbers Well this time we really hit a problem Look what happens Dividing the two first terms in brackets 3 divided by 9 is no problem as that simply gives us a third No it's the outside terms that are the difficult ones as look what happens to the i If we divide the two outside terms 3 divided by 2 i the i ends up on the bottom as the denominator This makes things very awkward We've already had enough trouble with i being the square root of minus 1 having to introduce a new term to cope with 1 over the square root of minus 1 If only there was some trick we could use to get the i out of the denominator Well as it happens there is we use something called the complex conjugate The complex conjugate is a nifty little number Any complex number multiplied by its complex conjugate gives us a real number as the result No i's to worry about The complex conjugate of 9 plus 2 i is 9 minus 2 i Now if we multiply these two numbers together using FOIL this is what we get 9 times 9 equals 81 9 times minus 2 i equals minus 18 i 2 i times 9 equals 18 i and 2 i times minus 2 i equals minus 4 i squared But i squared equals minus 1 So minus 4 i squared equals minus 4 times minus 1 which simply equals 4 So grouping these terms together gives us 81 minus 18 i plus 18 i plus 4 The minus 18 i and 18 i cancel out leaving us with no i's So we are simply left with 81 plus 4 giving us 85 a totally real result So how do we use this trick in our division calculation? What we can do is to multiply both the 3 plus 4 i and the 9 plus 2 i by 9 minus 2 i We can do this as 9 minus 2 i divided by 9 minus 2 i is equal to 1 So all we have done is multiplied our original calculation by 1 which doesn't affect the result However what it does do is allow us to use FOIL on both the numerator and the denominator We already calculated the denominator as 9 minus 2 i is the complex conjugate of 9 plus 2 i which we worked up before simply equaled 85 So without changing the outcome of the calculation at all we have managed to get the i out of the denominator and can now treat the rest of the calculation as a multiplication So using FOIL 3 times 9 equals 27 3 times minus 2 i equals minus 6 i 4 i times 9 equals 36 i and 4 i times minus 2 i equals minus 8 i squared or simply 8 as i squared equals minus 1 This makes 27 minus 6 i plus 8 plus 36 i If we arrange this grouping the real and imaginary terms we get 27 plus 8 minus 6 i plus 36 i which gives us 35 plus 30 i So now we are left with the result 35 plus 30 i over 85 But we're used to seeing complex numbers written out with the real and imaginary part So let's rewrite this expression slightly 35 over 85 plus 30 over 85 i or if we actually work at the division 0.41 plus 0.35 i Although the FOIL method does allow us to get to an answer when dividing two complex numbers we had to work very hard to get there It is here that writing out two complex numbers in their exponential form really comes into its own If we rewrite our calculation using the exponential form of the two complex numbers like we did when we multiplied them before we can use a similar method to divide them When multiplying we first multiplied the 5 and the 9.2 Now that we are dividing we simply divide them instead giving us the answer 0.54 When multiplying we divide the 53.1 degrees and the 12.5 degrees Now that we're dividing we simply minus them instead giving us 40.6 degrees This gives us the overall result 0.54 times e to the 40.6 degrees times i Using the polar form we can convert this back into the Cartesian form which gives us 0.54 a cosine of 40.6 degrees plus 0.54 times i times the sine of 40.6 degrees which gives us the result 0.41 plus 0.35 i The same result as we got before but arrived at with much greater ease So the imaginary number i and the world of complex numbers gave Fourier a notation a mathematical language used to do his calculations However, although complex numbers gave Fourier a way of describing mathematically what he was trying to do a notation is only an alphabet a set of individual letters He still had to join these letters up to form the words and sentences he needed to describe his theory In the next lecture we're going to find out how the Fourier transform actually works We're going to learn all about convolution