OK, so last time we worked out that the limits of the mandelbrot set on the real number line was negative two on the negative side and plus a quarter on the positive side. Between those limits you can keep squaring and adding your original number and your series will never head off to infinity. So let's complicate matters and move to the complex plane.
First of all, let's look at \(i\). We now know what you have to do to multiply and add complex numbers. Remember that you can also write the number \(i\) as \(0+i\) and as \(1\angle\tfrac{\pi}{2}\). The first version means our point on the complex plane has a real value of zero, and an imaginary value of one. The second version means the point is one unit away from the origin (the crossing point of the real and imaginary axes), a quarter turn of circle from the real axis. So we know what it is, let's make it the first in our sequence:
\(0+i,\ldots\)
So what's the next number? The first step of working out the next number is to square the last one. How do we do that with complex numbers? Well, squaring a number is just multiplying the number by itself, so that is a multiplication task. Best move is to use the polar form. The rule we worked out was to multiply the lengths and add the angles. So if we look at the polar form of \(i\) we need to multiply one by one (getting one), and then add \(\tfrac{\pi}{2}\) to \(\tfrac{\pi}{2}\) (getting \(\pi\)). So our squared number is \(1\angle\pi\). Well, of course it fucking is. \(i\) IS the square root of negative one, so if we square it we get negative one. And negative one is, of course, one unit away from the origin ON the real axis, a half circle round from the starting position.
The second step is to add our first number. We need to switch back to rectangular form for this. Negative one in rectangular form is \(-1+0i\). To this we add our starting number. We can do this by just adding the real and imaginary parts. The real part of our starting number is zero, and the real part of our intermediate number is negative one, so the final real part is negative one. The imaginary part of the original is one, and the intermediate is zero, so the result is one. So our final number is \(-1+i\). In polar form this is \(\sqrt{2}\angle\tfrac{3\pi}{4}\). The polar form means turn three quarters of the way to a half circle, and go a distance of the square root of two. We get the distance from pythagoras as usual.
It is a bit tricky thinking about all this in abstract notation, even though we have gone through all of these steps before. Lets look at the process in picture form so we get a feel for what is going on. Our first number looks like this:
Now, let's look at the result of doing the squaring operation:
You can see we have doubled the angle (I have shown the extra angle with a dashed line), because we have added itself to itself. And the distance remains the same because one multiplied by one is one. Now we add on the original number:
And you can see that we end up, as predicted, at \(-1+i\). But there is something important to spot when you look at this that has been very difficult to spot when we have just been using pure algebra. Look at the dotted line that represents the addition of the first number. Compare it with the thick black line that goes up to the first number. They are exactly the same length and angle aren't they? Yes. You see when you "add" on the starting number, it is just like picking the starting number up off the diagram and plonking it down in a new place. The length of it and the angle it is sitting at, does not change. To see what we mean, let see what the next number in our series is, geometrically. Remember we are here now:
\(0+i,-1+i,\ldots\)
So this time we start with \(-1+i\):
The angle is now \(\tfrac{3\pi}{4}\) as we calculated, with a length of \(\sqrt{2}\). When we square that, we will add \(\tfrac{3\pi}{4}\) to \(\tfrac{3\pi}{4}\) getting \(\tfrac{3\pi}{2}\). We will also multiply \(\sqrt{2}\) by itself getting, drumroll, two. That looks like this:
You can see again that the angle has doubled and the length is definitely two. Now we need to add on our starting number. That means you pick up the very first (from a couple of diagrams above) thick black line in your minds eye, and you drop it onto the point at \(-2+0i\):
That takes us to \(0-i\). Because our starting number was just \(0+i\), when we add it to \(0-2i\), we just move up the imaginary axis by one unit. So we now have:
\(0+i,-1+i,0-i,\ldots\)
What's next? Let's just do it in one step:
What's gone on there then? Well, our angle has now reached three quarters of a full circle, so when we add that to itself we get one and a half circles. That just means we go all the way round the circle, back to the beginning, and then add on a half. So we end up, after squaring, on the real axis at negative one. We then add on our first number which, hang on have we not been here before? Answer yes - it was in our first time through. So we end up adding \(-1+i\) to our series:
\(0+i,-1+i,0-i,-1+i, \ldots\)
Which means that we know what the next entry in the series is:
\(0+i,-1+i,0-i,-1+i,0-i, \ldots\)
And so on and on and on. We are going to be going around in this circle for ever and ever. So \(i\) IS in the mandelbrot set, because we are never going off to infinity. Hurrah! You can go through almost the same sequence with \(-i\) which end up looking like this:
\(0-i,-1-i,0+i,-1-i,0+i, \ldots\)
I promised a shortcut to determine inclusion (or more accurately exclusion) from the Mandelbrot set. Now we have seen what the operations of multiplication and addition look like on the complex plane, we can consider this shortcut. First of all let's ask ourselves what happens when we do the squaring operation. We multiply the absolute value of the complex number by itself. If the absolute value is less than one, then when we square it it is going to end up closer to the origin. If the absolute value is more than one, when we square it we are going to end up further away from the origin. Just ignore the question of what we do with the angles for now, and concentrate on the length of the line.
Once we have squared the number, we add on the starting number in the series. That starting number also has an absolute value. If this starting number absolute value is not big enough to counteract the increase created by the squaring, then the complex number will just get bigger and bigger, and will disappear off to infinity. What is the biggest absolute value that we have seen being able to hold back the series from drifting off to infinity? Well, it's not a quarter, which was the limit on the positive real axis. It is not plus or minus \(i\) either, their values were one. No, the largest absolute value is two, which is the value of starting number negative two. Remember with absolute values I am only interested in how far away from the origin the point is on the complex plane, not what angle it is at. So negative two is two units away, so it has an absolute value of two.
It turns out that no matter which complex number you choose, if it is more than two units away from the origin, it is out of the Mandelbrot set. Why? Let's look and see with the number \(3\angle \tfrac{3\pi}{4}\):
The rectangular values of the points are a bit nightmarish to look at here, because we started with a polar form number. I can assure you that they are correct, and in the right place. But the more important thing is what happens at the squaring stage. You can see that the absolute value jumps all the way up to nine, and is then only slightly pulled back when we add on our original number. The problem, and it may be obvious, is that the square of the first number is so much further away from the origin that when you add the first number back on you are still left too far away from the origin to avoid flying off to infinity on the next squaring.
Is there a boundary? In other words, is there an absolute value of the first number beyond which you are doomed to fly to infinity? Let's think of the very best case scenario for the addition stage. The very best case would be to head directly back to the origin, shrinking the absolute value as much as possible. You can see in the diagram above that we do not achieve that. The absolute value was off at an angle to the imaginary axis, so when we added it on we did not get the benefit of the full length of three. To get the full benefit of all of the absolute value of your starting number, what you want then is an original angle that points back to where you started when you add it to itself. Hmm. To point back in the direction we started, we would need to travel round half a circle. We could start at a quarter circle and travel round half a circle, but that would be a total of three quarters of a circle. Three quarters is not one quarter added to another quarter, which is what we are restricted to.
Now, there is only one angle which if you double it is the same as adding a half circle. That angle is a half circle, or \(\pi\) radians. That must mean the absolute value of our starting number has to lie on the negative real axis:
But, hang on. Last time we looked exclusively at the real axis. We worked out that the limit on the negative side of the real axis for the Mandelbrot set is negative two. So we can now say that the limit of the absolute value of a starting number in the series is two.
We can say that because when we square the previous number in the series, if its absolute value is more than one, we are going to end up further away from the origin. To be in the Mandelbrot set we want the numbers in our series to stay near the origin, so that they avoid heading off to infinity. So to get back towards the origin you need to get the best return possible from adding your starting number. That means using the full absolute value of your starting number, which means it must take you straight back to where you came from. The only starting angle that allows that is a half circle, which drops you onto the negative real axis. And we know that the limit for the negative real axis is two, but only two ON the negative real axis.
For instance two on the positive real axis is not in the set. It squares to four away from the origin (and remember its starting angle is zero, and double zero is still zero so the square is also on the positive real axis), and then adds on two - but it adds on two in the worst possible direction - directly away from the origin!
This all means that we can say that any starting number with an absolute value of MORE THAN TWO is NOT in the Mandelbrot set. I am going to call this Rule Alpha.
Now, that is a considerable short cut, because it means we can just ignore any numbers outside a circle with a radius of two about the origin. What about the numbers inside that circle. A lot of them are not in the Mandelbrot set. Last time I really fudged the question of how you tell that a number is in or out after a certain point in the series. I just said it was "obvious". Well, we now have a proper test to apply. What is it?
Well, once the series hits a number which has an absolute value of more than two, you can stop the series right there and then and declare that the starting number of the series is OUT of the Mandelbrot set. Why can you do this? Think about it. You now have a number which next time you are going to square, ending up with a number much further away than your starting number's absolute value. But hang on! I didn't TELL you the starting number of the series. What happens if you hit a number with an absolute value of three, and your starting number had an absolute value of nine? That would be fine, because squaring three you get nine, and if your angles worked out just perfectly, that would place you back at the previous number in the series, and the series would settle down and not drift off to infinity. That is all correct, and impossible. Why? Look at the assumption that we had to make, that we had a starting absolute value of nine. Now go and read Rule Alpha. We cannot ever HAVE a starting number with an absolute value of nine, or of anything more than two. This means that whenever the series reaches a number more than two, we know that even if the angles match up precisely, the absolute value of our starting number cannot be enough to drag the series away from infinity.
This all means that if a term in the series has an absolute value of MORE THAN TWO, the starting term in the series is NOT in the Mandelbrot set. We'll call that, for balance, Rule Beta.
Some starting numbers may generate a series which takes a very long time to get to more than two. For instance we know that the number a quarter \(0.250\) is IN the Mandelbrot set - we calculated that it was the boundary on the positive side of the real axis. If you increase it by just one thousandth to \(0.251\) we know that it is no longer in the Mandelbrot set. However, the series generated by that number does not increase beyond two until the 97th entry. And remember that with a quarter we saw that we could keep going for ever and ever getting closer and closer to a half. So it is not possible to know if a number is in or out of the set until you get a number more than two in the series.
What we do, to make life easier for ourselves, is say that if a series has not hit a number with an absolute value of more than two after a certain number of entries, we will just say for the sake of argument that the starting number is IN the Mandelbrot set. The farther along the series that we place out arbitrary cut off point the more accuratly we can draw our Mandelbrot set. Even with relatively small series, we can still generate a decent looking Mandelbrot set picture.
For example, after, say, ten steps all the numbers we have previously identified as in the set are still in (of course). So we can draw them as points:
(I have coloured the axes and markings in blue now, because there is going to be an awful lot of black shortly, and I want them to still be legible.) Each of those dots are one tenth of a unit across. That means I can sit two of them side by side representing numbers that are apart by tenths only. I could draw a Mandelbrot set using dots this size by only checking complex numbers to one decimal place (-2.0, -1.9, -1.8, to 1.9, 2.0 and so on). I have better things to do with my time than to sit around working this out. Even at this scale I am still going to have to consider forty multiplied by forty different complex numbers. That's one thousand six hundred numbers. I could just ignore the ones that are more than two units away from the origin, but to do that I will have to pythagorise their absolute values first. What a pain.
So I have told the computer to do it instead. I run a spreadsheet that spits out co-ordinates on the complex plane that are IN the Mandelbrot set, for a given resolution (dot size) and cut off point in the series. To see what a difference the choice of cut off point makes for the purpose of accuracy, let's start with by cutting off the series after the very first squaring and adding. (Beardy types would call this the first iteration.) With the same sized dots as last time (but zoomed in a bit), it looks like this:
That's just a blotch isn't it. I have marked on the points we knew about before in blue so you can see where they are. I couldn't put on the point at a quarter, because we are only dealing with tenths here, and a quarter is between two and three tenths.
That's the set with the cut off point after two terms of the series. It makes a neat oval shape around the zero point, extending from negative two to one, and from negative \(i\) to \(i\). OK. Let's throw ANOTHER term onto the series:
Well now, there's a thing. The oval shape has disappeared after just one more iteration (I am working on the beard) and it now looks a bit pointy. Let's do another iteration:
Even more pointy! And now the tops and bottoms of the shape are looking pointy. I am feeling a bit bad for the quarter that we have to keep missing out. To bring it back in means that I have to halve the sizes of the circles, so that I can look at numbers not just in tenths, but in halves of tenths, or twentieths. That will let us get down to \(0.25\), because the \(0.05\) bit that we add on to the two tenths IS a twentieth. I am not going to change the cut off point for this one, just the resolution. The result looks like this:
OK, you can see right away that the edges have become more refined. That just comes from using smaller dots. It's exactly the same as adding more mega pixels to your camera sensor. You can also see that a quarter has joined the party. There is something a bit off with a quarter though. It is supposed to be the limit on the positive real axis, but here it looks miles away from the edge. Remember though that I said that you needed ninety seven numbers in the series for \(0.251\) to get above two, and we are only on number four here. Let's use our higher resolution and move on to the next iteration:
It is now starting to get really weird. The smooth edges have gone and we have all kinds of humps and bumps appearing. You can see where this is going though. Let's skip on to the tenth iteration (which would be the eleventh number in the series - bit confusing but the first number is just a number, the second number comes after the first maths bit which we are calling an iteration - beard is coming on nicely):
Now it it starting to look like some weird insect. It has developed spindly appendages. It is worth reminding ourselves at this point that the only maths going on here is squaring and addition. That's it. It is squaring and addition of complex numbers which sounds a bit tricky, but even that is actually simple. Add the rectangular parts for addition, multiply the lengths and add angles for multiplication. And after only ten iterations you get that weird shape looking back at you. Maths is fucking odd.
OK, two more before we finish up. First lets double the resolution once more, so our dots will be half the size again:
Not so great a change this time, I think we must be into the land of diminishing returns. Let's sign off though by boosting the cut off point all the way to iteration twenty five:
Wow. You can really now see a circular region forming around the number \(-1+0i\). Also you can see how close a quarter has got to the boundary on the positive real line. It is nestled in what I will call for want of a better description, the arse cheeks of the big circle. Finally you can also see how weird plus and minus \(i\) are. They now seem to be way off on their own at the end of long spindly structures.
These pictures are in black and white. To get colours into this I would just ask at what iteration did the points drop out of the set, and then give all the points that dropped out at the same iteration the same colour. Look back up at the difference between the first three images. You can see that we lose whole blocks of dots between each one. If you wanted to colour this you wouldn't delete the dots, you would leave them in but give them a different colour.
If you keep adding more iterations, and if you keep increasing the resolution, and if you colour the dots that drop out, you eventually end up where we came in:
Monday, 26 September 2011
Monday, 19 September 2011
Mandelbrot Set Part One
Before we move on, interestingly we have now covered all the groundwork required to understand what the Mandelbrot set is, and why it is. This you may have heard of. It is the colourful weird shape that appears on t shirts, mouse mats and so on. It looks like this:
So what is it, or more accurately how do you make one? First of all the picture is drawn on the complex plane around the \(0\) position. The picture above is from about \(-2\) on the left to about \(1\) on the right hand side.
We now know that every point on the complex plane is actually a number. Numbers can belong to sets. We have already encountered some sets before, although we did not call them by that name. For instance, all the positive integers (the counting numbers we use for tractors and apples and so on) are called the set of natural numbers. In that set of numbers you have sub sets of even and odd natural numbers. If you add on the negative integers to the natural numbers you get the set of whole numbers (sometimes also called the set of all integers). If you add in fractions you now have a set of all rational numbers. If you add in irrationals you now have all the numbers at we have looked at, in a set called the real numbers. Once we add in the imaginary axis, we end up with a set of all complex numbers.
When we drew the circle of convergence for the infinite sums we were looking at, we could have described every point within that circle as belonging to the set of numbers which caused the infinite sum to converge. The mandelbrot set is like that kind of set. It defines an area on the complex plane, within which a number is in the set, and out with which a number is not in the set. Looking at the picture above though, it is a pretty complex figure. It must be created by a pretty complex mechanism, mustn't it? Well.....
Membership of the set is defined by whether or not the result of a mathematical operation converges or diverges. That is, just like an infinite sum, does it go off to infinity or does it approach an actual number? The operation you do here is a bit different to an infinite sum, but just like the infinite sum, we could keep on doing the maths for ever and ever. So what is this massively complicated operation?
Every starting number is used as the first in a long (actually infinity long) series.
The next number in the series is calculated by squaring the last number and adding the starting number.
If the numbers in the series head off to infinity (get larger and larger) then the number IS NOT in the Mandelbrot set.
If the numbers in the series do not head off to infinity, but settle down, then the number IS in the Mandelbrot set.
That's it. That is literally all there is to it. Squaring and adding. Frankly it looks a lot simpler than the infinite sums nonsense, or taking a limit. Bizarrely though, this simple process of squaring, and adding the first number you thought of generates the very, very, complex pattern we see above.
It would be very boring, not to mention fatal, to try to calculate an infinitely long series, so when you are testing for membership, you usually just calculate a fixed number of terms. The more terms you calculate the finer the detail you can draw at the boundary, but the longer it takes to do the calculations. Once it is obvious that a series has left the building, so to speak, you note down the number of terms you have in the series at that point, and you convert that number of terms to a colour for that point on the complex plane. That's how you get the gradual colouring effects. All of the colours are OUT of the Mandelbrot set, but the colour of the point determines how close it was to getting in.
Lets consider an example so we know exactly where we are. To keep things simple, lets look at the real number line only, so we get rid of the imaginary element. This is very like the step BEFORE we saw the circle of convergence on the complex plane. At that point all we had was zones on the real number line coloured red and blue. Let's do that with the Mandelbrot set. Where are the blue regions on the real number line for the Mandelbrot set? Let's start with zero.
\[0,(0^2+0)\]
\[0,0,(0^2+0)\]
Well this is easy. Zero squared plus zero is still zero. Square it again? Still zero. Never going to get to be more than two no matter how many times we do this. So zero is IN the Mandelbrot set.
What about two?
\[2,(2^2+2)\]
\[2,6,(6^2+2)\]
\[2,6,38,(38^2+2)\]
Can you see that that is never going to settle down now? There is nothing in the function (square and add two) which is capable of putting the brakes on the series. It is off into the wild blue yonder. Two is NOT in the Mandelbrot set. So zero in, two out. Lets look on the other side of zero, and find out if negative two is in:
\[-2,(-2^2-2)\]
\[-2,2,(2^2-2)\]
\[-2,2,2,(2^2-2)\]
A, ha! Negative two squared is four. Four plus negative two is two. TWO squared is four, plus minus two is two. So negative two IS in the Mandelbrot set because its series settles down to an infinite series of two's. But it is on a knife edge isn't it? It only settles down to all these two's because the starting point is EXACTLY the opposite of the amount that the next number in the series increases by when the last one is squared. So the squaring operation is precisely balanced by the addition of the starting number. If we increased the starting number by, say, a tenth, to \(2.1\) look what happens:
\[-2.1,(-2.1^2-2)\]
(It's not obvious how to square \(-2.1\), but if we write it as \(\tfrac{-21}{10}\) and then multiply it by itself \(\tfrac{-21}{10}\cdot \tfrac{-21}{10}\) we get \(\tfrac{-21\cdot -21}{10\cdot 10}\) or \(\tfrac{441}{100}\) which is \(4.41\).)
\[-2.1,2.41,(2.41^2-2)\]
\[-2.1,2.41,3.8081,(3.8081^2-2)\]
\[-2.1,2.41,3.8081,12.50162561,(12.50162561^2-2)\]
It's off as well isn't it? The minus two that is applied is no longer big enough to hold back what happens when the previous term is squared. So precisely at negative two is a boundary of the set on the real number line. We can conclude something about the mandelbrot set already: it is not symmetrical about the zero point on the real axis. Negative two is in, while positive two is out. Let's try to find the boundary on the positive side of the real axis. Two is out, so let's try one:
\[1,(1^2+1)\]
\[1,2,(2^2+1)\]
\[1,2,5,(5^2+1)\]
\[1,2,5,26,(26^2+1)\]
It's gone, hasn't? The fact that you are squaring one to get one doesn't help because the one that you then add increases your number. Because the increase is above one, the next square operation increases it further. There is no suitable brake. The next number is always going to be much bigger than the previous one.
With negative numbers, what was important was having a starting number half the value of the resulting square to pull the square back. Every time you squared, when you applied the starting number it brought you back to the same place. You squared two up to four, and took off two, back to two. Two steps forwards and precisely two steps back. Is there a starting number that will work for us on the positive side, or is zero the boundary? Well, the number that you add cannot be the brake for the positive starting numbers, because it is always going to increase the next term in the series - it's positive! What we need to find then is a number which, when you square it, gets smaller. That will be a number between zero and one. Numbers between zero and one get smaller when they are squared because they are reduced be the same amount as they were less than one to begin with. It is easier to see with fractions less than one, because the number on the top of the fraction does not increase as much as the number on the bottom of the fraction, so the ratio between the two gets smaller. But our special number may not be a fraction. We could just test all the numbers between zero and one to find the special one, but that could take an infinitely long time. Let's find it by logic instead.
Lets work backwards, and not look for the starting number in the series. Let's look for the number the series is going to settle down to. Let's call that number \(a\). \(a\) has to be a number whose square is also half of itself. Why? Well we would square \(a\), reducing it by half, and then add back on the half we just removed. That would completely balance the squaring and addition process. We can write this out mathematically as:
\[a^2=\frac{a}{2}\]
That says \(a\) squared is the same as half of \(a\). From there we can rearrange the right hand side to look like this:
\[a^2=\tfrac{1}{2}\cdot a\]
We can then divide both sides by \(a\):
\[\frac{a^2}{a}=\frac{\tfrac{1}{2}\cdot a}{a}\]
That's the same as:
\[\frac{a\cdot a}{a}=\tfrac{1}{2}\cdot \tfrac{a}{a}\]
And:
\[a\cdot \tfrac{a}{a}=\tfrac{1}{2}\cdot \tfrac{a}{a}\]
We know that \(\tfrac{a}{a}\) is just one, so:
\[a\cdot 1=\tfrac{1}{2}\cdot 1\]
The ones cancel, and we are left with:
\[a=\tfrac{1}{2}\]
So we have our magic number. It is a half. This is what the series will settle down to. So what is the first number in our series? It is the square of a half, which is a quarter. (A quarter is half of a half). So the prediction is that from our series, if we plug in the first number as a quarter, the series should never go flying off to infinity. It will get closer and closer to the magic number of a half. This is because if it ever reached a half, it would bounce right back with the next step in the series. Let's see what the first ten terms in the series starting with a half are:
\[0.25,(0.25^2+0.25)\]
\[0.25,0.3125,(0.3125^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,(0.3476\ldots^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,0.3708\ldots,(0.3708\ldots^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,(0.3875\ldots^2+0.25)\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,(0.4001\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,(0.4101\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,\\
0.4182\ldots,(0.4182\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,0.4182\ldots,\\
0.4249\ldots,(0.4249\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,0.4182\ldots,0.4249\ldots,\\
0.4305\ldots,(0.4305\ldots^2+0.25)
\end{multline}\]
In fact I can tell you, because I have done the sums, that the 100th term is \(0.490604220129385\ldots\) and the 1,000th is \(0.49900860913856\ldots\). So, it turns out we were right. Which ever way you look at it, one quarter is IN the Mandelbrot set, and the more times you run through the process the closer and closer to one half the result gets - just as we predicted. If we started with a number just a sliver higher than a quarter, this would not work. It would not be balanced by the addition of the quarter, so that when the long series, like the one above, got near a half, it would eventually pop over a half. Why? Well a half times a half plus a quarter and a little bit, is bigger than a half. So eventually the series of numbers is going to get to the point where the gap between the last number in the series squared and a quarter is LESS than the little bit your starting number is bigger than a quarter. Once that point is reached, the next term in the series must be bigger than a half. As soon as it is, the brake fails, and the series will eventually reach infinity.
So we can say, on the real number line, the limits of the mandelbrot set are negative two and one quarter. What about the limits on the complex plain? Well there it gets more complicated, and strangely more simple. Let's look at that next time.
So what is it, or more accurately how do you make one? First of all the picture is drawn on the complex plane around the \(0\) position. The picture above is from about \(-2\) on the left to about \(1\) on the right hand side.
We now know that every point on the complex plane is actually a number. Numbers can belong to sets. We have already encountered some sets before, although we did not call them by that name. For instance, all the positive integers (the counting numbers we use for tractors and apples and so on) are called the set of natural numbers. In that set of numbers you have sub sets of even and odd natural numbers. If you add on the negative integers to the natural numbers you get the set of whole numbers (sometimes also called the set of all integers). If you add in fractions you now have a set of all rational numbers. If you add in irrationals you now have all the numbers at we have looked at, in a set called the real numbers. Once we add in the imaginary axis, we end up with a set of all complex numbers.
When we drew the circle of convergence for the infinite sums we were looking at, we could have described every point within that circle as belonging to the set of numbers which caused the infinite sum to converge. The mandelbrot set is like that kind of set. It defines an area on the complex plane, within which a number is in the set, and out with which a number is not in the set. Looking at the picture above though, it is a pretty complex figure. It must be created by a pretty complex mechanism, mustn't it? Well.....
Membership of the set is defined by whether or not the result of a mathematical operation converges or diverges. That is, just like an infinite sum, does it go off to infinity or does it approach an actual number? The operation you do here is a bit different to an infinite sum, but just like the infinite sum, we could keep on doing the maths for ever and ever. So what is this massively complicated operation?
Every starting number is used as the first in a long (actually infinity long) series.
The next number in the series is calculated by squaring the last number and adding the starting number.
If the numbers in the series head off to infinity (get larger and larger) then the number IS NOT in the Mandelbrot set.
If the numbers in the series do not head off to infinity, but settle down, then the number IS in the Mandelbrot set.
That's it. That is literally all there is to it. Squaring and adding. Frankly it looks a lot simpler than the infinite sums nonsense, or taking a limit. Bizarrely though, this simple process of squaring, and adding the first number you thought of generates the very, very, complex pattern we see above.
It would be very boring, not to mention fatal, to try to calculate an infinitely long series, so when you are testing for membership, you usually just calculate a fixed number of terms. The more terms you calculate the finer the detail you can draw at the boundary, but the longer it takes to do the calculations. Once it is obvious that a series has left the building, so to speak, you note down the number of terms you have in the series at that point, and you convert that number of terms to a colour for that point on the complex plane. That's how you get the gradual colouring effects. All of the colours are OUT of the Mandelbrot set, but the colour of the point determines how close it was to getting in.
Lets consider an example so we know exactly where we are. To keep things simple, lets look at the real number line only, so we get rid of the imaginary element. This is very like the step BEFORE we saw the circle of convergence on the complex plane. At that point all we had was zones on the real number line coloured red and blue. Let's do that with the Mandelbrot set. Where are the blue regions on the real number line for the Mandelbrot set? Let's start with zero.
\[0,(0^2+0)\]
\[0,0,(0^2+0)\]
Well this is easy. Zero squared plus zero is still zero. Square it again? Still zero. Never going to get to be more than two no matter how many times we do this. So zero is IN the Mandelbrot set.
What about two?
\[2,(2^2+2)\]
\[2,6,(6^2+2)\]
\[2,6,38,(38^2+2)\]
Can you see that that is never going to settle down now? There is nothing in the function (square and add two) which is capable of putting the brakes on the series. It is off into the wild blue yonder. Two is NOT in the Mandelbrot set. So zero in, two out. Lets look on the other side of zero, and find out if negative two is in:
\[-2,(-2^2-2)\]
\[-2,2,(2^2-2)\]
\[-2,2,2,(2^2-2)\]
A, ha! Negative two squared is four. Four plus negative two is two. TWO squared is four, plus minus two is two. So negative two IS in the Mandelbrot set because its series settles down to an infinite series of two's. But it is on a knife edge isn't it? It only settles down to all these two's because the starting point is EXACTLY the opposite of the amount that the next number in the series increases by when the last one is squared. So the squaring operation is precisely balanced by the addition of the starting number. If we increased the starting number by, say, a tenth, to \(2.1\) look what happens:
\[-2.1,(-2.1^2-2)\]
(It's not obvious how to square \(-2.1\), but if we write it as \(\tfrac{-21}{10}\) and then multiply it by itself \(\tfrac{-21}{10}\cdot \tfrac{-21}{10}\) we get \(\tfrac{-21\cdot -21}{10\cdot 10}\) or \(\tfrac{441}{100}\) which is \(4.41\).)
\[-2.1,2.41,(2.41^2-2)\]
\[-2.1,2.41,3.8081,(3.8081^2-2)\]
\[-2.1,2.41,3.8081,12.50162561,(12.50162561^2-2)\]
It's off as well isn't it? The minus two that is applied is no longer big enough to hold back what happens when the previous term is squared. So precisely at negative two is a boundary of the set on the real number line. We can conclude something about the mandelbrot set already: it is not symmetrical about the zero point on the real axis. Negative two is in, while positive two is out. Let's try to find the boundary on the positive side of the real axis. Two is out, so let's try one:
\[1,(1^2+1)\]
\[1,2,(2^2+1)\]
\[1,2,5,(5^2+1)\]
\[1,2,5,26,(26^2+1)\]
It's gone, hasn't? The fact that you are squaring one to get one doesn't help because the one that you then add increases your number. Because the increase is above one, the next square operation increases it further. There is no suitable brake. The next number is always going to be much bigger than the previous one.
With negative numbers, what was important was having a starting number half the value of the resulting square to pull the square back. Every time you squared, when you applied the starting number it brought you back to the same place. You squared two up to four, and took off two, back to two. Two steps forwards and precisely two steps back. Is there a starting number that will work for us on the positive side, or is zero the boundary? Well, the number that you add cannot be the brake for the positive starting numbers, because it is always going to increase the next term in the series - it's positive! What we need to find then is a number which, when you square it, gets smaller. That will be a number between zero and one. Numbers between zero and one get smaller when they are squared because they are reduced be the same amount as they were less than one to begin with. It is easier to see with fractions less than one, because the number on the top of the fraction does not increase as much as the number on the bottom of the fraction, so the ratio between the two gets smaller. But our special number may not be a fraction. We could just test all the numbers between zero and one to find the special one, but that could take an infinitely long time. Let's find it by logic instead.
Lets work backwards, and not look for the starting number in the series. Let's look for the number the series is going to settle down to. Let's call that number \(a\). \(a\) has to be a number whose square is also half of itself. Why? Well we would square \(a\), reducing it by half, and then add back on the half we just removed. That would completely balance the squaring and addition process. We can write this out mathematically as:
\[a^2=\frac{a}{2}\]
That says \(a\) squared is the same as half of \(a\). From there we can rearrange the right hand side to look like this:
\[a^2=\tfrac{1}{2}\cdot a\]
We can then divide both sides by \(a\):
\[\frac{a^2}{a}=\frac{\tfrac{1}{2}\cdot a}{a}\]
That's the same as:
\[\frac{a\cdot a}{a}=\tfrac{1}{2}\cdot \tfrac{a}{a}\]
And:
\[a\cdot \tfrac{a}{a}=\tfrac{1}{2}\cdot \tfrac{a}{a}\]
We know that \(\tfrac{a}{a}\) is just one, so:
\[a\cdot 1=\tfrac{1}{2}\cdot 1\]
The ones cancel, and we are left with:
\[a=\tfrac{1}{2}\]
So we have our magic number. It is a half. This is what the series will settle down to. So what is the first number in our series? It is the square of a half, which is a quarter. (A quarter is half of a half). So the prediction is that from our series, if we plug in the first number as a quarter, the series should never go flying off to infinity. It will get closer and closer to the magic number of a half. This is because if it ever reached a half, it would bounce right back with the next step in the series. Let's see what the first ten terms in the series starting with a half are:
\[0.25,(0.25^2+0.25)\]
\[0.25,0.3125,(0.3125^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,(0.3476\ldots^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,0.3708\ldots,(0.3708\ldots^2+0.25)\]
\[0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,(0.3875\ldots^2+0.25)\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,(0.4001\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,(0.4101\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,\\
0.4182\ldots,(0.4182\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,0.4182\ldots,\\
0.4249\ldots,(0.4249\ldots^2+0.25)
\end{multline}\]
\[\begin{multline}
0.25,0.3125,0.3476\ldots,0.3708\ldots,0.3875\ldots,\\
0.4001\ldots,0.4101\ldots,0.4182\ldots,0.4249\ldots,\\
0.4305\ldots,(0.4305\ldots^2+0.25)
\end{multline}\]
In fact I can tell you, because I have done the sums, that the 100th term is \(0.490604220129385\ldots\) and the 1,000th is \(0.49900860913856\ldots\). So, it turns out we were right. Which ever way you look at it, one quarter is IN the Mandelbrot set, and the more times you run through the process the closer and closer to one half the result gets - just as we predicted. If we started with a number just a sliver higher than a quarter, this would not work. It would not be balanced by the addition of the quarter, so that when the long series, like the one above, got near a half, it would eventually pop over a half. Why? Well a half times a half plus a quarter and a little bit, is bigger than a half. So eventually the series of numbers is going to get to the point where the gap between the last number in the series squared and a quarter is LESS than the little bit your starting number is bigger than a quarter. Once that point is reached, the next term in the series must be bigger than a half. As soon as it is, the brake fails, and the series will eventually reach infinity.
So we can say, on the real number line, the limits of the mandelbrot set are negative two and one quarter. What about the limits on the complex plain? Well there it gets more complicated, and strangely more simple. Let's look at that next time.
Monday, 12 September 2011
Complex Operations and MORE TRIGONOMETRY
Right, we have complex numbers, we can draw them on our plane. We can convert between the two forms of notation that we are using, Polar and Rectangular. We also saw that multiplying by \(i\) had the effect of rotating a number by \(90^{\circ}\), or as we are now referring to angles, \(\tfrac{\pi}{2}\).
How, more generally, do we go about adding and multiplying and raising to an exponent complex numbers?
Adding is actually pretty easy. Lets put our number in rectangular notation. So it looks like \(a+bi\). Lets make a new number, \(c+di\). Now lets add them together:
\[(a+bi)+(c+di)\]
There is no multiplication there, apart from the \(b\) and \(d\) both being multiplied by \(i\). So we could just add all the terms up:
\[a+bi+c+di\]
And tidy:
\[a+c+bi+di\]
Now if we look closely, we can see that we have two numbers multiplied by \(i\). If you remember our red and blue baskets with apples and oranges in them, we can just pull out the \(i\)'s leaving the \(b\) and \(d\) in a bracket multiplied by \(i\):
\[a+c+i(b+d)\]
Hang on, we now have two real numbers added together, and then two other real numbers added together and multiplied by \(i\). That is very nearly back to our rectangular form of one real part, and one imaginary part represented by a real number multiplied by \(i\). We just stick another set of brackets in like this:
\[(a+c)+(b+d)i\]
And we are done, that looks just like a rectangular number. Adding numbers in rectangular form is as simple as just adding the real parts together, and then adding the imaginary parts together.
OK, what about multiplication?
\[(a+bi)\cdot (c+di)\]
Again, remember our baskets. We can write this out like this:
\[a\cdot c + a\cdot di + bi\cdot c + bi\cdot di\]
So we have each number in the first bracket multiplied by each number in the second bracket. It tidies up to look like:
\[a\cdot c + a\cdot di + bi\cdot c + b\cdot d\cdot i^2\]
\[a\cdot c + a\cdot di + bi\cdot c - bd\]
(Remember that when we multiply \(i\) by itself we get negative one, so the last term loses its \(i^2\) and is subtracted instead of added at the same time.) We can take away the dots as well:
\[ac + adi + bci - bd\]
And then rearrange to the real and imaginary parts:
\[ac - bd + adi + bci\]
Again we can take out the \(i\)'s, and bracket off the real and imaginary parts:
\[(ac - bd) + (ad + bc)i\]
Well, it IS a rectangular form complex number, but it looks horrid. You get no real feel for what is happening on the complex plane. What happens if we deal with multiplication in the polar form instead? Let's look at what happens to the absolute value of the number. We'll call \(r_{\scriptsize 1}\) the absolute value of the first number and \(r_{\scriptsize 2}\) the absolute value of the second number, and \(r_{\scriptsize 12}\) the absolute value of the pair of them multiplied together. And remember that the square of the absolute value of a complex number is the real part squared plus the imaginary part squared. So we get this:
\[r_{\scriptsize 1}^2=a^2+b^2\]
\[r_{\scriptsize 2}^2=c^2+d^2\]
\[r_{\scriptsize 12}^2=(ac-bd)^2+(ad+bc)^2\]
Let's take a very deep breath and try to expand the squares in the last line:
\[r_{\scriptsize 12}^2=acac-acbd-bdac+bdbd+adad+adbc+bcad+bcbc\]
Oh, boy. Lets try to tidy:
\[r_{\scriptsize 12}^2=a^2c^2-abcd-abcd+b^2d^2+a^2d^2+abcd+abcd+b^2c^2\]
Hmm. Not a great deal better. It's hard to spot but notice something about the four terms which are just \(abcd\). Two of them are subtracted, and two are added, so it could be written:
\[r_{\scriptsize 12}^2=a^2c^2-2\cdot abcd+2\cdot abcd+b^2d^2+a^2d^2+b^2c^2\]
But, of course if you add two somethings, and take two somethings away, then you end up with no somethings, so we can remove those parts altogether:
\[r_{\scriptsize 12}^2=a^2c^2+b^2d^2+a^2d^2+b^2c^2\]
Right. What do we do with that mess? The answer is red and blue baskets again. You spot that there are two parts multiplied by \(a^2\), namely \(a^2c^2\) and \(a^2d^2\), so we can take the \(a\)'s out and putting what remains in a bracket:
\[r_{\scriptsize 12}^2=a^2(c^2+d^2)+b^2d^2+b^2c^2\]
It should be easier to spot this time, but you can then do exactly the same with the \(b^2\) terms:
\[r_{\scriptsize 12}^2=a^2(c^2+d^2)+b^2(c^2+d^2)\]
And if we remember about the red and blue baskets, and we just want to know how many of everything we have, we can put the \(a^2\) and \(b^2\) in brackets as well:
\[r_{\scriptsize 12}^2=(a^2+b^2)(c^2+d^2)\]
Remember our definitions of the absolute values of the numbers we are multiplying?
\[r_{\scriptsize 1}^2=a^2+b^2\]
\[r_{\scriptsize 2}^2=c^2+d^2\]
So we can replace the contents of the first bracket with \(r_{\scriptsize 1}^2\) and the second bracket with \(r_{\scriptsize 2}^2\)
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}^2)(r_{\scriptsize 2}^2)\]
That can just be written as:
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}^2\cdot r_{\scriptsize 2}^2\]
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}\cdot r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot r_{\scriptsize 2}\]
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot r_{\scriptsize 1}\cdot r_{\scriptsize 2}\]
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}\cdot r_{\scriptsize 2})\cdot (r_{\scriptsize 1}\cdot r_{\scriptsize 2})\]
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}\cdot r_{\scriptsize 2})^2\]
And if we now take the square roots of both sides we get:
\[r_{\scriptsize 12}=r_{\scriptsize 1}\cdot r_{\scriptsize 2}\]
This tells us that when you multiply two complex numbers together, the absolute value of the result is the absolute values of the original two numbers multiplied together. So if the absolute values of your starting numbers were two and three, the absolute value of the result will be six.
Where will the angle at the origin point to once the numbers have been multiplied? Well, our formula for working out the polar number from the rectangular number was a horrific mess. If we actually wanted to trail through that for the rectangular form \((ac - bd) + (ad + bc)i\) just to see what would happen, we would have to be nuts. Stark raving mad. Is there an easier way? Joyfully, yes. Remember our formula for working out the rectangular form of a polar number?
\[rcos\theta + risin\theta\]
That is a perfect halfway house between a rectangular form number and a polar form number. Why? Well it has a real part (distance along the real axis) and an imaginary part (distance along the imaginary axis), but it is actually written in terms of the size of the angle involved. So we can use this to see what happens to the angle when we multiply. The first thing to do is to spot that there are two entities multiplied by \(r\) and take the \(r\) out:
\[r(cos\theta + isin\theta)\]
Lets call that complex number one:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\]
Lets make this next one complex number two:
\[r_{\scriptsize 2}(cos\alpha + isin\alpha)\]
If we multiply them together we get:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\cdot r_{\scriptsize 2}(cos\alpha + isin\alpha)\]
Rearranging the \(r\)'s gives us:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(cos\theta + isin\theta\big)\cdot \big(cos\alpha + isin\alpha\big)\]
This should make sense to us, because look what we are doing with our absolute values: we are multiplying them together, just like we worked out above. If we multiply out all the stuff in the brackets, we will get this:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(
cos\theta cos\alpha+cos\theta isin\alpha+isin\theta cos\alpha+iisin\theta sin\alpha
\big)\]
Which simplifies (a bit), because the term at the end has \(i^2\) in it:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(
cos\theta cos\alpha+cos\theta isin\alpha+isin\theta cos\alpha-sin\theta sin\alpha
\big)\]
And then we can move the \(i\)'s out of the middle two terms, putting the remainder in brackets:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)-sin\theta sin\alpha
\Big)\]
I'll then do one further rearranging to get the real parts together:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Now what in the name of sanity are we going to do with that mess in brackets? What we need to do is start drawing lines on the unit circle to see exactly what we are talking about. What IS the cosine of one angle multiplied by the cosine of another minus the sines of both multiplied together? To find out what this looks like, we are going to go back to the unit circle, and we are going to draw on the angle \(\theta\). I am marking the origin as point A, and the point where the radius hits the circle as B. We have seen all this before.
Forget for a moment that I am showing the angle down near the origin, or point A, rather than drawn onto the unit circle. This will make sense in due course. It doesn't really matter what size the angle is, because we are trying to come up with a general rule that will work for all angles. OK, next let's mark off the sine of the angle as a line going straight down from point B to the x axis:
We'll call the point where it meets the x axis C, and we will draw on a square to show that the angle at which it meets the x axis is a right angle:
And so we know what we are talking about, lets describe the line:
Good. Now what about the cosine of the angle \(\theta\)? That's just the x axis out to point C isn't it? So lets mark that on:
This is exactly the same picture that we have seen before, with a bit more writing on it for clarity's sake. For the purposes of this task I am going to zoom into the quarter circle between the positive x and y axes. That is the place where we are going to be playing, so we can just concentrate there:
OK, that's a bit clearer. Now what I am going to do is to take the point B and start to move it around the unit circle. But this time I am going to FIX the angle \(\theta\) so that does not change. That sounds very odd. What is that going to tell us? Well, wait and see. What is going to happen is that the whole triangle that we have just drawn, from A to B to C and back to A, is going to keep its shape but it is going to rotate about the point A. Lets see what we get:
So, you can see that we now have the triangle seemingly floating around. Point C is in empty space. The important fact is that I have ONLY rotated. The lengths of the sides have not changed. The angle at C is still a right angle. The length of A to B is still the radius of the unit circle, which is still one. What can I do now? Well I can show that I have rotated the first triangle by a new angle called \(\alpha\):
At this point, what I could do is draw a line all the way from the origin at A, through C and out to the unit circle to let us measure the sine and cosine of \(\alpha\). I am not going to do that though. What I am going to try and do is measure the sine and cosine of \(\alpha\) using the measurements we have already made for \(\theta\). You will see why shortly.
The first thing we need to do here is to draw on another line, to stand in for the sine of \(\alpha\). We want it to reach the x axis at right angles, just like a normal sine line. Because we are using the measurements of \(\theta\) to work out \(\alpha\) we need to use the whole of the line from A to C. So we will drop our "sine" of \(\alpha\) line down from C to the x axis, and we will mark the point where it hits as D, which is a right angle:
Right then, first BIG question. How do we work out the lengths of the line from A to D and from C to D? Just in case you are trying to figure this out I am talking about these distances:
If the line from A to C was actually the radius of a unit circle, then we could easily work out AD and CD. They would just be the cosine and sine of the angle \(\alpha\). So that's a start. Let's stick a circle on the diagram anyway, to see what that would look like:
So you can see that IF \(cos\theta\) was one, then the other two sides would just be the cosine and sine of \(\alpha\). What we are dealing with here is another problem of scaling. If you remember back to when we were first working out the rectangular form version of a complex number in polar form, what we did was to work out the sine and cosine on the unit circle and then we just multiplied them by the absolute value of the number. We did this because we had scaled the absolute value to one, so that we could work in the unit circle. Here we just need to do the same thing. Point C is not on the unit circle. It is like the complex number we are trying to find. The absolute value of that number is \(cos\theta\). So we just need to scale the ACTUAL sine and cosine of \(\alpha\) (whatever they are) by the factor \(cos\theta\), and that will give us the real and imaginary parts of the complex number C. Those real and imaginary parts are, of course, the lengths of the lines AD and CD that we are trying to find!
So we end up by saying that the length of AD is the cosine of \(\alpha\) MULTIPLIED by \(cos\theta\). Or \(cos\theta\cdot cos\alpha\). Hey! We've seen that before:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
It's the very first term of the mess in brackets that we are trying to sort out. Great, we are making progress! So what about the line CD? Well that is just going to be the sine of \(\alpha\) MULTIPLIED by \(cos\theta\). Or \(cos\theta\cdot sin\alpha\). And look, that's the third term in the mess in brackets. 50% done! Let's mark this up on our diagram:
I have taken the example unit circle away, because it was just making a mess, and we have finished with it. Right, we are halfway done now. We just need the other two terms of that mess so we can start to make sense of it. Looking at our diagram, we have now worked out the length of all our sides. What we need to make progress is ANOTHER triangle. No, I am not about to rotate the whole mess again, no more rotation. Instead I am going to look at the mess I am trying to make sense of and I am going to realise that to get the remaining two terms I need to start multiplying stuff by \(sin\theta\). I was able to multiply stuff by \(cos\theta\) because I made that the radius of a circle, and then scaled the other two sides by that factor. So lets make \(sin\theta\) the radius of a circle so we can play the same trick. How can we do that? Well if \(sin\theta\) is going to be the radius of a circle that makes either point B or point C the centre of the circle. Let's pick point C as the centre, and draw on the circle:
I am now going to twist the whole diagram through a quarter turn:
And I am going to draw on, in a dashed line because it is temporary, an x axis for this new circle. Now I can drop a line to this x axis from the point B, so as to meet the line at right angles at the new point E:
I will also draw in the line along the temporary x axis between C and E:
Now we can start working out the lengths of CE and BE. Hang on though, don't we need the size of the angle as well? Which angle? The angle marked \(\beta\):
So what size is this angle? The angle of a straight line is \(\pi\) radians. Is this right? Of course. If you take the unit circle, and you start at the normal place on the real axis, and you move along half the circle (\(\pi\) radians) you end up back on the real axis, on the negative side. You may as well have travelled in a straight line along the real axis and you would have ended up at the same place. Knowing what we know about angles on straight lines, what can we say about \(\beta\)?
Well, we can say that it is on a straight line, the line from D to E which passes through C. So the total angle on that straight line must be \(\pi\). We can see by looking that there are three angles that make up that total angle. They are the unmarked angle, the right angle (size \(\tfrac{\pi}{2}\)) and \(\beta\). So we can say:
\[\pi=\tfrac{\pi}{2}+\beta+unknown\]
Take away \(\tfrac{\pi}{2}\) from both sides and you get:
\[\tfrac{\pi}{2}=\beta+unknown\]
So what's the unknown angle? It is on the line, AND it is inside a right angled triangle. In case it is unclear it is a corner in this bold triangle:
If you add up all the angles in a right angled triangle in radian measure they total \(\pi\). Is this right? Yes, a right angled triangle is half of a rectangle. Each corner of the rectangle has an angle of \(\tfrac{\pi}{2}\), making a total of \(2\pi\). So one half of this shape will have angles that add up to one half of \(2\pi\) or \(\pi\). If they didn't two of them could not fit together to make a rectangle. (Actually this is true of any triangle drawn on a flat surface, but it is harder to explain why and involves Euclid and Parallel lines, which we do not need to concern ourselves with here).
The other two angles in that triangle are a right angle \(\tfrac{\pi}{2}\), and \(\alpha\), and all three angles must add up to \(\pi\). So we can also say that:
\[\pi=\tfrac{\pi}{2}+\alpha+unknown\]
Again, take away \(\tfrac{\pi}{2}\) from both sides:
\[\tfrac{\pi}{2}=\alpha+unknown\]
If we take \(\alpha\) away from both sides we get:
\[\tfrac{\pi}{2}-\alpha=unknown\]
So the unknown angle has size \(\tfrac{\pi}{2}-\alpha\). Let's put that back in our equation above, so:
\[\tfrac{\pi}{2}=\beta+unknown\]
Becomes:
\[\tfrac{\pi}{2}=\beta+\tfrac{\pi}{2}-\alpha\]
Now what can we do with that? First add \(\alpha\) to both sides:
\[\tfrac{\pi}{2}+\alpha=\beta+\tfrac{\pi}{2}\]
And finally, remove \(\tfrac{\pi}{2}\) from both sides:
\[\alpha=\beta\]
Hey presto, just like magic we have worked out that the angle \(\beta\) MUST be the same size as angle \(\alpha\). So lets mark that on our diagram:
Bingo. We can now deduce, using exactly the same logic we used for the lines AD and CD, the lengths of lines BE and CE. In particular, CE would be the cosine of \(\alpha\) IF you scaled it by the factor \(sin\theta\), so CE is \(sin\theta cos\alpha\). And in turn BE would be the sine of \(\alpha\) if you scaled it by the factor \(sin\theta\), so BE is \(sin\theta sin\alpha\). Lets draw those on:
Let's also get rid of the other circle, the temporary x axis, and rotate back to normal:
Now we have lines on our diagram that match all the parts of the mess in the brackets in this equation:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Now we can try to answer the question what is the cosine of \(\theta\) multiplied by the cosine of \(\alpha\) minus the sine of \(\theta\) mutlipied by the sine of \(\alpha\). We know what \(cos\theta cos\alpha\) is, it is the line from A to D. We also know what \(sin\theta sin\alpha\) is, it is the line from B to E. So what do we get if we subtract the line BE from the line AD? First notice that the point E is directly above the point D. So if we start at D, and move back towards the origin at A until we are directly under B, the remaining distance to A will be AD-BE. The first thing we need to do is drop a line from B to the real axis so we can see exactly where that point will be:
I have moved the text down a bit showing the length of A to D. The angles are getting in the way a bit though, so I will shrink them down:
Can you see what has happened? The two angles we have been dealing with, \(\theta\) and \(\alpha\) can now be see as one big angle, which I can call \(\theta + \alpha\). What is the cosine of the angle \(\theta + \alpha\)? Well, first you would fix the point on the circle that corresponds to a journey around the circle of the size of the angle. That point is B isn't it? Remember that the line from A to B is the radius of the unit circle, so it is length one. That means that the cosine of the angle \(\theta + \alpha\) is the length from the origin along the real axis to the point directly under the point B. That's the point F we just drew isn't it? So \(cos(\theta + \alpha)\) is the length A to F. But how did we find the length A to F? We started with A to D, which was \(cos\theta cos\alpha\) and we subtracted the length from B to E, which was \(sin\theta sin\alpha\). So if AF=AD-BE, then:
\[cos(\theta + \alpha)=cos\theta cos\alpha-sin\theta sin\alpha\]
Fantastic! We can now go back to our horrible equation:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
and we can replace the first part of the mess with:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos(\theta + \alpha)+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Well, that's better, and we are nearly finished. Let's tackle the second part. Back to the diagram, what is the sine of \(\theta + \alpha\)? Well given that the line from A to B is length one, the sine is just the height of the point B off the real axis, isn't it? Can you see a line that shows that height? Yes, it is the line from F to B. What OTHER line have we drawn that is the same height as F to B? Yes, D to E. So \(sin(\theta + \alpha)\) is the same as the length D to E. And look closely, what is D to E? It is \(cos\theta sin\alpha+sin\theta cos\alpha\). So:
\[sin(\theta + \alpha)=cos\theta sin\alpha+sin\theta cos\alpha\]
Fantastic times two! We can now finish clearing up our horrible equation by replacing the second mess in brackets with:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos(\theta + \alpha)+isin(\theta + \alpha)
\Big)\]
Just in case you think I fiddled the diagram with special angles, have a look at an animation of varying angles, and you'll set it holds for all of them:
What can we learn from this? Well, as we had already worked out, if you multiply two complex numbers in polar form, you multiply their absolute values together. That's the \(r_{\scriptsize 1}\cdot r_{\scriptsize 2}\) bit. You then just ADD the angles together - look you can see it happening in the brackets above. So the whole multiplication looks like this:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\cdot r_{\scriptsize 2}(cos\alpha + isin\alpha)=
r_{\scriptsize 1}r_{\scriptsize 2}\Big(
cos(\theta + \alpha)+isin(\theta + \alpha)
\Big)\]
Formally then we can say that:
\[(a+bi)+(c+di)=(a+c)+(b+d)i\]
and
\[r_{\scriptsize 1}\angle \theta \cdot r_{\scriptsize 2}\angle \alpha = r_{\scriptsize 1}r_{\scriptsize 2}\angle (\theta + \alpha)\]
Hurrah! We've done multiplication and addition. Subtraction and division are essentially just the reverse. What about exponents?
Raising a complex number to a real exponent is just the same as repeated multiplications, so that's fine. What about raising a real number to a complex exponent though? What does that look like? Answer a) it looks fucking horrible, is what it looks like. Answer b) it is the secret at the heart of finding out why \(e^{i\pi}+1=0\), because look, there is a complex number as an exponent of \(e\)! To get into that in any detail, we will have to work out a different way of writing out \(e\), which is going to be pretty traumatic. So as a diversion, lets look at something shiny instead.
How, more generally, do we go about adding and multiplying and raising to an exponent complex numbers?
Adding is actually pretty easy. Lets put our number in rectangular notation. So it looks like \(a+bi\). Lets make a new number, \(c+di\). Now lets add them together:
\[(a+bi)+(c+di)\]
There is no multiplication there, apart from the \(b\) and \(d\) both being multiplied by \(i\). So we could just add all the terms up:
\[a+bi+c+di\]
And tidy:
\[a+c+bi+di\]
Now if we look closely, we can see that we have two numbers multiplied by \(i\). If you remember our red and blue baskets with apples and oranges in them, we can just pull out the \(i\)'s leaving the \(b\) and \(d\) in a bracket multiplied by \(i\):
\[a+c+i(b+d)\]
Hang on, we now have two real numbers added together, and then two other real numbers added together and multiplied by \(i\). That is very nearly back to our rectangular form of one real part, and one imaginary part represented by a real number multiplied by \(i\). We just stick another set of brackets in like this:
\[(a+c)+(b+d)i\]
And we are done, that looks just like a rectangular number. Adding numbers in rectangular form is as simple as just adding the real parts together, and then adding the imaginary parts together.
OK, what about multiplication?
\[(a+bi)\cdot (c+di)\]
Again, remember our baskets. We can write this out like this:
\[a\cdot c + a\cdot di + bi\cdot c + bi\cdot di\]
So we have each number in the first bracket multiplied by each number in the second bracket. It tidies up to look like:
\[a\cdot c + a\cdot di + bi\cdot c + b\cdot d\cdot i^2\]
\[a\cdot c + a\cdot di + bi\cdot c - bd\]
(Remember that when we multiply \(i\) by itself we get negative one, so the last term loses its \(i^2\) and is subtracted instead of added at the same time.) We can take away the dots as well:
\[ac + adi + bci - bd\]
And then rearrange to the real and imaginary parts:
\[ac - bd + adi + bci\]
Again we can take out the \(i\)'s, and bracket off the real and imaginary parts:
\[(ac - bd) + (ad + bc)i\]
Well, it IS a rectangular form complex number, but it looks horrid. You get no real feel for what is happening on the complex plane. What happens if we deal with multiplication in the polar form instead? Let's look at what happens to the absolute value of the number. We'll call \(r_{\scriptsize 1}\) the absolute value of the first number and \(r_{\scriptsize 2}\) the absolute value of the second number, and \(r_{\scriptsize 12}\) the absolute value of the pair of them multiplied together. And remember that the square of the absolute value of a complex number is the real part squared plus the imaginary part squared. So we get this:
\[r_{\scriptsize 1}^2=a^2+b^2\]
\[r_{\scriptsize 2}^2=c^2+d^2\]
\[r_{\scriptsize 12}^2=(ac-bd)^2+(ad+bc)^2\]
Let's take a very deep breath and try to expand the squares in the last line:
\[r_{\scriptsize 12}^2=acac-acbd-bdac+bdbd+adad+adbc+bcad+bcbc\]
Oh, boy. Lets try to tidy:
\[r_{\scriptsize 12}^2=a^2c^2-abcd-abcd+b^2d^2+a^2d^2+abcd+abcd+b^2c^2\]
Hmm. Not a great deal better. It's hard to spot but notice something about the four terms which are just \(abcd\). Two of them are subtracted, and two are added, so it could be written:
\[r_{\scriptsize 12}^2=a^2c^2-2\cdot abcd+2\cdot abcd+b^2d^2+a^2d^2+b^2c^2\]
But, of course if you add two somethings, and take two somethings away, then you end up with no somethings, so we can remove those parts altogether:
\[r_{\scriptsize 12}^2=a^2c^2+b^2d^2+a^2d^2+b^2c^2\]
Right. What do we do with that mess? The answer is red and blue baskets again. You spot that there are two parts multiplied by \(a^2\), namely \(a^2c^2\) and \(a^2d^2\), so we can take the \(a\)'s out and putting what remains in a bracket:
\[r_{\scriptsize 12}^2=a^2(c^2+d^2)+b^2d^2+b^2c^2\]
It should be easier to spot this time, but you can then do exactly the same with the \(b^2\) terms:
\[r_{\scriptsize 12}^2=a^2(c^2+d^2)+b^2(c^2+d^2)\]
And if we remember about the red and blue baskets, and we just want to know how many of everything we have, we can put the \(a^2\) and \(b^2\) in brackets as well:
\[r_{\scriptsize 12}^2=(a^2+b^2)(c^2+d^2)\]
Remember our definitions of the absolute values of the numbers we are multiplying?
\[r_{\scriptsize 1}^2=a^2+b^2\]
\[r_{\scriptsize 2}^2=c^2+d^2\]
So we can replace the contents of the first bracket with \(r_{\scriptsize 1}^2\) and the second bracket with \(r_{\scriptsize 2}^2\)
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}^2)(r_{\scriptsize 2}^2)\]
That can just be written as:
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}^2\cdot r_{\scriptsize 2}^2\]
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}\cdot r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot r_{\scriptsize 2}\]
\[r_{\scriptsize 12}^2=r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot r_{\scriptsize 1}\cdot r_{\scriptsize 2}\]
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}\cdot r_{\scriptsize 2})\cdot (r_{\scriptsize 1}\cdot r_{\scriptsize 2})\]
\[r_{\scriptsize 12}^2=(r_{\scriptsize 1}\cdot r_{\scriptsize 2})^2\]
And if we now take the square roots of both sides we get:
\[r_{\scriptsize 12}=r_{\scriptsize 1}\cdot r_{\scriptsize 2}\]
This tells us that when you multiply two complex numbers together, the absolute value of the result is the absolute values of the original two numbers multiplied together. So if the absolute values of your starting numbers were two and three, the absolute value of the result will be six.
Where will the angle at the origin point to once the numbers have been multiplied? Well, our formula for working out the polar number from the rectangular number was a horrific mess. If we actually wanted to trail through that for the rectangular form \((ac - bd) + (ad + bc)i\) just to see what would happen, we would have to be nuts. Stark raving mad. Is there an easier way? Joyfully, yes. Remember our formula for working out the rectangular form of a polar number?
\[rcos\theta + risin\theta\]
That is a perfect halfway house between a rectangular form number and a polar form number. Why? Well it has a real part (distance along the real axis) and an imaginary part (distance along the imaginary axis), but it is actually written in terms of the size of the angle involved. So we can use this to see what happens to the angle when we multiply. The first thing to do is to spot that there are two entities multiplied by \(r\) and take the \(r\) out:
\[r(cos\theta + isin\theta)\]
Lets call that complex number one:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\]
Lets make this next one complex number two:
\[r_{\scriptsize 2}(cos\alpha + isin\alpha)\]
If we multiply them together we get:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\cdot r_{\scriptsize 2}(cos\alpha + isin\alpha)\]
Rearranging the \(r\)'s gives us:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(cos\theta + isin\theta\big)\cdot \big(cos\alpha + isin\alpha\big)\]
This should make sense to us, because look what we are doing with our absolute values: we are multiplying them together, just like we worked out above. If we multiply out all the stuff in the brackets, we will get this:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(
cos\theta cos\alpha+cos\theta isin\alpha+isin\theta cos\alpha+iisin\theta sin\alpha
\big)\]
Which simplifies (a bit), because the term at the end has \(i^2\) in it:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \big(
cos\theta cos\alpha+cos\theta isin\alpha+isin\theta cos\alpha-sin\theta sin\alpha
\big)\]
And then we can move the \(i\)'s out of the middle two terms, putting the remainder in brackets:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)-sin\theta sin\alpha
\Big)\]
I'll then do one further rearranging to get the real parts together:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Now what in the name of sanity are we going to do with that mess in brackets? What we need to do is start drawing lines on the unit circle to see exactly what we are talking about. What IS the cosine of one angle multiplied by the cosine of another minus the sines of both multiplied together? To find out what this looks like, we are going to go back to the unit circle, and we are going to draw on the angle \(\theta\). I am marking the origin as point A, and the point where the radius hits the circle as B. We have seen all this before.
Forget for a moment that I am showing the angle down near the origin, or point A, rather than drawn onto the unit circle. This will make sense in due course. It doesn't really matter what size the angle is, because we are trying to come up with a general rule that will work for all angles. OK, next let's mark off the sine of the angle as a line going straight down from point B to the x axis:
We'll call the point where it meets the x axis C, and we will draw on a square to show that the angle at which it meets the x axis is a right angle:
And so we know what we are talking about, lets describe the line:
Good. Now what about the cosine of the angle \(\theta\)? That's just the x axis out to point C isn't it? So lets mark that on:
This is exactly the same picture that we have seen before, with a bit more writing on it for clarity's sake. For the purposes of this task I am going to zoom into the quarter circle between the positive x and y axes. That is the place where we are going to be playing, so we can just concentrate there:
OK, that's a bit clearer. Now what I am going to do is to take the point B and start to move it around the unit circle. But this time I am going to FIX the angle \(\theta\) so that does not change. That sounds very odd. What is that going to tell us? Well, wait and see. What is going to happen is that the whole triangle that we have just drawn, from A to B to C and back to A, is going to keep its shape but it is going to rotate about the point A. Lets see what we get:
So, you can see that we now have the triangle seemingly floating around. Point C is in empty space. The important fact is that I have ONLY rotated. The lengths of the sides have not changed. The angle at C is still a right angle. The length of A to B is still the radius of the unit circle, which is still one. What can I do now? Well I can show that I have rotated the first triangle by a new angle called \(\alpha\):
At this point, what I could do is draw a line all the way from the origin at A, through C and out to the unit circle to let us measure the sine and cosine of \(\alpha\). I am not going to do that though. What I am going to try and do is measure the sine and cosine of \(\alpha\) using the measurements we have already made for \(\theta\). You will see why shortly.
The first thing we need to do here is to draw on another line, to stand in for the sine of \(\alpha\). We want it to reach the x axis at right angles, just like a normal sine line. Because we are using the measurements of \(\theta\) to work out \(\alpha\) we need to use the whole of the line from A to C. So we will drop our "sine" of \(\alpha\) line down from C to the x axis, and we will mark the point where it hits as D, which is a right angle:
Right then, first BIG question. How do we work out the lengths of the line from A to D and from C to D? Just in case you are trying to figure this out I am talking about these distances:
If the line from A to C was actually the radius of a unit circle, then we could easily work out AD and CD. They would just be the cosine and sine of the angle \(\alpha\). So that's a start. Let's stick a circle on the diagram anyway, to see what that would look like:
So you can see that IF \(cos\theta\) was one, then the other two sides would just be the cosine and sine of \(\alpha\). What we are dealing with here is another problem of scaling. If you remember back to when we were first working out the rectangular form version of a complex number in polar form, what we did was to work out the sine and cosine on the unit circle and then we just multiplied them by the absolute value of the number. We did this because we had scaled the absolute value to one, so that we could work in the unit circle. Here we just need to do the same thing. Point C is not on the unit circle. It is like the complex number we are trying to find. The absolute value of that number is \(cos\theta\). So we just need to scale the ACTUAL sine and cosine of \(\alpha\) (whatever they are) by the factor \(cos\theta\), and that will give us the real and imaginary parts of the complex number C. Those real and imaginary parts are, of course, the lengths of the lines AD and CD that we are trying to find!
So we end up by saying that the length of AD is the cosine of \(\alpha\) MULTIPLIED by \(cos\theta\). Or \(cos\theta\cdot cos\alpha\). Hey! We've seen that before:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
It's the very first term of the mess in brackets that we are trying to sort out. Great, we are making progress! So what about the line CD? Well that is just going to be the sine of \(\alpha\) MULTIPLIED by \(cos\theta\). Or \(cos\theta\cdot sin\alpha\). And look, that's the third term in the mess in brackets. 50% done! Let's mark this up on our diagram:
I have taken the example unit circle away, because it was just making a mess, and we have finished with it. Right, we are halfway done now. We just need the other two terms of that mess so we can start to make sense of it. Looking at our diagram, we have now worked out the length of all our sides. What we need to make progress is ANOTHER triangle. No, I am not about to rotate the whole mess again, no more rotation. Instead I am going to look at the mess I am trying to make sense of and I am going to realise that to get the remaining two terms I need to start multiplying stuff by \(sin\theta\). I was able to multiply stuff by \(cos\theta\) because I made that the radius of a circle, and then scaled the other two sides by that factor. So lets make \(sin\theta\) the radius of a circle so we can play the same trick. How can we do that? Well if \(sin\theta\) is going to be the radius of a circle that makes either point B or point C the centre of the circle. Let's pick point C as the centre, and draw on the circle:
I am now going to twist the whole diagram through a quarter turn:
And I am going to draw on, in a dashed line because it is temporary, an x axis for this new circle. Now I can drop a line to this x axis from the point B, so as to meet the line at right angles at the new point E:
I will also draw in the line along the temporary x axis between C and E:
Now we can start working out the lengths of CE and BE. Hang on though, don't we need the size of the angle as well? Which angle? The angle marked \(\beta\):
So what size is this angle? The angle of a straight line is \(\pi\) radians. Is this right? Of course. If you take the unit circle, and you start at the normal place on the real axis, and you move along half the circle (\(\pi\) radians) you end up back on the real axis, on the negative side. You may as well have travelled in a straight line along the real axis and you would have ended up at the same place. Knowing what we know about angles on straight lines, what can we say about \(\beta\)?
Well, we can say that it is on a straight line, the line from D to E which passes through C. So the total angle on that straight line must be \(\pi\). We can see by looking that there are three angles that make up that total angle. They are the unmarked angle, the right angle (size \(\tfrac{\pi}{2}\)) and \(\beta\). So we can say:
\[\pi=\tfrac{\pi}{2}+\beta+unknown\]
Take away \(\tfrac{\pi}{2}\) from both sides and you get:
\[\tfrac{\pi}{2}=\beta+unknown\]
So what's the unknown angle? It is on the line, AND it is inside a right angled triangle. In case it is unclear it is a corner in this bold triangle:
If you add up all the angles in a right angled triangle in radian measure they total \(\pi\). Is this right? Yes, a right angled triangle is half of a rectangle. Each corner of the rectangle has an angle of \(\tfrac{\pi}{2}\), making a total of \(2\pi\). So one half of this shape will have angles that add up to one half of \(2\pi\) or \(\pi\). If they didn't two of them could not fit together to make a rectangle. (Actually this is true of any triangle drawn on a flat surface, but it is harder to explain why and involves Euclid and Parallel lines, which we do not need to concern ourselves with here).
The other two angles in that triangle are a right angle \(\tfrac{\pi}{2}\), and \(\alpha\), and all three angles must add up to \(\pi\). So we can also say that:
\[\pi=\tfrac{\pi}{2}+\alpha+unknown\]
Again, take away \(\tfrac{\pi}{2}\) from both sides:
\[\tfrac{\pi}{2}=\alpha+unknown\]
If we take \(\alpha\) away from both sides we get:
\[\tfrac{\pi}{2}-\alpha=unknown\]
So the unknown angle has size \(\tfrac{\pi}{2}-\alpha\). Let's put that back in our equation above, so:
\[\tfrac{\pi}{2}=\beta+unknown\]
Becomes:
\[\tfrac{\pi}{2}=\beta+\tfrac{\pi}{2}-\alpha\]
Now what can we do with that? First add \(\alpha\) to both sides:
\[\tfrac{\pi}{2}+\alpha=\beta+\tfrac{\pi}{2}\]
And finally, remove \(\tfrac{\pi}{2}\) from both sides:
\[\alpha=\beta\]
Hey presto, just like magic we have worked out that the angle \(\beta\) MUST be the same size as angle \(\alpha\). So lets mark that on our diagram:
Bingo. We can now deduce, using exactly the same logic we used for the lines AD and CD, the lengths of lines BE and CE. In particular, CE would be the cosine of \(\alpha\) IF you scaled it by the factor \(sin\theta\), so CE is \(sin\theta cos\alpha\). And in turn BE would be the sine of \(\alpha\) if you scaled it by the factor \(sin\theta\), so BE is \(sin\theta sin\alpha\). Lets draw those on:
Let's also get rid of the other circle, the temporary x axis, and rotate back to normal:
Now we have lines on our diagram that match all the parts of the mess in the brackets in this equation:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Now we can try to answer the question what is the cosine of \(\theta\) multiplied by the cosine of \(\alpha\) minus the sine of \(\theta\) mutlipied by the sine of \(\alpha\). We know what \(cos\theta cos\alpha\) is, it is the line from A to D. We also know what \(sin\theta sin\alpha\) is, it is the line from B to E. So what do we get if we subtract the line BE from the line AD? First notice that the point E is directly above the point D. So if we start at D, and move back towards the origin at A until we are directly under B, the remaining distance to A will be AD-BE. The first thing we need to do is drop a line from B to the real axis so we can see exactly where that point will be:
I have moved the text down a bit showing the length of A to D. The angles are getting in the way a bit though, so I will shrink them down:
Can you see what has happened? The two angles we have been dealing with, \(\theta\) and \(\alpha\) can now be see as one big angle, which I can call \(\theta + \alpha\). What is the cosine of the angle \(\theta + \alpha\)? Well, first you would fix the point on the circle that corresponds to a journey around the circle of the size of the angle. That point is B isn't it? Remember that the line from A to B is the radius of the unit circle, so it is length one. That means that the cosine of the angle \(\theta + \alpha\) is the length from the origin along the real axis to the point directly under the point B. That's the point F we just drew isn't it? So \(cos(\theta + \alpha)\) is the length A to F. But how did we find the length A to F? We started with A to D, which was \(cos\theta cos\alpha\) and we subtracted the length from B to E, which was \(sin\theta sin\alpha\). So if AF=AD-BE, then:
\[cos(\theta + \alpha)=cos\theta cos\alpha-sin\theta sin\alpha\]
Fantastic! We can now go back to our horrible equation:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos\theta cos\alpha-sin\theta sin\alpha+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
and we can replace the first part of the mess with:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos(\theta + \alpha)+i\big(cos\theta sin\alpha+sin\theta cos\alpha\big)
\Big)\]
Well, that's better, and we are nearly finished. Let's tackle the second part. Back to the diagram, what is the sine of \(\theta + \alpha\)? Well given that the line from A to B is length one, the sine is just the height of the point B off the real axis, isn't it? Can you see a line that shows that height? Yes, it is the line from F to B. What OTHER line have we drawn that is the same height as F to B? Yes, D to E. So \(sin(\theta + \alpha)\) is the same as the length D to E. And look closely, what is D to E? It is \(cos\theta sin\alpha+sin\theta cos\alpha\). So:
\[sin(\theta + \alpha)=cos\theta sin\alpha+sin\theta cos\alpha\]
Fantastic times two! We can now finish clearing up our horrible equation by replacing the second mess in brackets with:
\[r_{\scriptsize 1}\cdot r_{\scriptsize 2}\cdot \Big(
cos(\theta + \alpha)+isin(\theta + \alpha)
\Big)\]
Just in case you think I fiddled the diagram with special angles, have a look at an animation of varying angles, and you'll set it holds for all of them:
What can we learn from this? Well, as we had already worked out, if you multiply two complex numbers in polar form, you multiply their absolute values together. That's the \(r_{\scriptsize 1}\cdot r_{\scriptsize 2}\) bit. You then just ADD the angles together - look you can see it happening in the brackets above. So the whole multiplication looks like this:
\[r_{\scriptsize 1}(cos\theta + isin\theta)\cdot r_{\scriptsize 2}(cos\alpha + isin\alpha)=
r_{\scriptsize 1}r_{\scriptsize 2}\Big(
cos(\theta + \alpha)+isin(\theta + \alpha)
\Big)\]
Formally then we can say that:
\[(a+bi)+(c+di)=(a+c)+(b+d)i\]
and
\[r_{\scriptsize 1}\angle \theta \cdot r_{\scriptsize 2}\angle \alpha = r_{\scriptsize 1}r_{\scriptsize 2}\angle (\theta + \alpha)\]
Hurrah! We've done multiplication and addition. Subtraction and division are essentially just the reverse. What about exponents?
Raising a complex number to a real exponent is just the same as repeated multiplications, so that's fine. What about raising a real number to a complex exponent though? What does that look like? Answer a) it looks fucking horrible, is what it looks like. Answer b) it is the secret at the heart of finding out why \(e^{i\pi}+1=0\), because look, there is a complex number as an exponent of \(e\)! To get into that in any detail, we will have to work out a different way of writing out \(e\), which is going to be pretty traumatic. So as a diversion, lets look at something shiny instead.
Monday, 5 September 2011
Polar Form, Rectangular Form and TRIGONOMETRY
So how have we finally come to a topic called trigonometry. Is this not just a hellish torture for school pupils who have to learn crap mnemonics? Well, not quite.
Last time we looked at the two forms of complex numbers. The rectangular form identified the location of our complex number on the complex plane by it’s real and imaginary parts. You mark them off on the relevant axes, and then draw a rectangle. The corner opposite the origin (the zero point) is your complex number. Fine. The other way to describe EXACTLY the same number, the polar form, was to note down which direction to point in at the origin and then how far to move to get to the number. So with the rectangular form you draw a rectangle, with the polar form you draw a line at some angle.
So we need to describe the angle when placing a value on our complex number. I picked a really easy complex number to get to last time, which was just at a \(45^{\circ}\) angle, or one eighth of the whole circle. I could work out the angle without any particular bother, because the real and imaginary parts of the number were the same. If we are dealing with any other complex numbers, we will need to deal with more complicated angles. How, then, would we go about converting any complex number in rectangular form to polar form and vice versa?
First of all I like to ask the question “Can we do that?” I mean, do we have enough information available to actual perform the task? For instance, I once struggled for quite some time trying to work out how to get the area of a piece of ground when the only information I had was the lengths of each of the four sides. I was staring idly into space trying to get an answer when my eyes focused on the mechanism use to automatically close my door. I am talking about the things described in this article. I realised that the two arms of the door closer, the door frame and the door itself made up four fixed length sides of an area. However I saw when the door opened and closed that the area enclosed by the sides went from very long and slim to very broad and fat. The area was obviously changing depending on the angles. I then stopped trying to find a solution to the area of the ground, because I realised that I could not find one without some more information, namely the angles between the sides of the area of ground.
(Second reasonable question, why are we doing this? It turns out, as we will see, that it is dead easy to add complex numbers in rectangular form, but hard to multiply them. Conversely it is easy to multiply numbers in polar form, but hard to add them. So if we can swap between the two forms, we get the best of both worlds. Also, it turns out that the process of converting between sides and angles is going to be key to the understanding of this whole project, so we will have to look at all this eventually.)
So, do we have enough information from the angle and length only to derive the length of the sides of the rectangle? Lets draw out roughly what I am talking about:
[pic of rect and polar]
See the polar form line? It has a fixed angle and length? What happens if we change either the angle or the length? The point that the line reaches will change won’t it? And if that point changes, then the lengths of the rectangle that reach that point will also have to change? Yes. And vice versa, if we change the lengths of either of the sides of the rectangle, that will force the length AND the angle to change as well? Yes. So one set of rectangle lengths is equal to one, and only one, set of line and angle sizes. So, if we have the rectangle lengths OR the angle and line length, we DO have enough information to work out the one from the other. Good stuff. At least this won’t be an afternoon wasted.
Let’s start with the number \(\sqrt{5}\angle 30^{\circ}\). How do we find the rectangular form of this number? Let’s see what it looks like first:
[pic of number]
Well, it looks like it ends up at roughly our old friend \(2+i\), but I may not have drawn the line with sufficient precision. Is it exactly \(2+i\)? The first thing to do is to test that the length of the line fits. When we convert to rectangular form, we are dealing with a right angled triangles. Why? Because a defining characteristic of rectangles is that they have four right angles in them. So with the rectangular form that we are converting to, the angle where the line from the number hits either the real or the imaginary axis will be a right angle. The absolute value line cuts through the middle of this rectangle creating two triangles. Pythagoras’ theorem tells us that the square of the length of the absolute value line must equal the square of the lengths of the other two sides added together. The other two sides are of course, the size of the real and imaginary parts of the number marked off on those axes.
We said that it looks like our candidate number is \(2+i\), so if we guess that the other two sides have lengths of two and one, then we get \(2^2=4\) and \(1^1=1\) and four plus one is five, and we know our line is \(\sqrt{5}\) long, so that fits. It does appear that \(2+i\) is correct. But, it only MIGHT be correct. There are lots of points which have a line length of \(\sqrt{5}\); they lie on a circle with that radius. That circle goes through the number \(2+i\). Because the circle goes through that number it also goes through other numbers that are very very close indeed to \(2+i\) (actually as close as you like). That means that just because our line length fits our guess, we cannot stop there. We need to confirm that the angle we have, \(30^{\circ}\) points directly at the number \(2+i\) and not to a number very close to it.
So how are we going to do this? Well, let's try to work out what the relationship is between the size of the angle, and the real and imaginary parts of the complex number. In other words, if you change the size of the angle, what happens to the size of the real and imaginary parts? Remember, though, we are looking only at changes in the real and imaginary parts and the angle, so we will be leaving the length of the line itself fixed so it cannot be a factor in what happens.
Right. If we have a fixed length, and a varying angle at one end, what is going to happen to the other end of that line? Glittering prizes for anyone who said it will mark out a circle. Remember that our definition of a circle was all points a fixed distance from a fixed point? Here we have that fixed point, the origin, and a fixed distance, the length of the line attached to the origin (otherwise known as the absolute value of our complex number). And we also just said above that there are lots of points with a length of \(sqrt{5}\) which lie on a circle with that radius about the origin.
As our angle increases, one point remains at the origin, and the other point will trace out the shape of a circle around the origin.
[pic] [pic] [pic]
This all looks a bit messy with the square root floating about there. Even if the absolute value was something nice like two or seven, rather than a square root, if we study this arrangement in detail we will only be able to draw conclusions about this arrangement. We want to be able to reach more general conclusions that will help us find out what angles do to the real and imaginary parts of complex numbers with ANY absolute value. We therefore want to get rid of the square root. To get rid of it, I am going to shrink the circle down so that it just has a radius of one. The units we use are unimportant. This is OK, as long as we remember that we need to scale all the other measurements to get answers. The good news is that we do not need to do any scaling on the angle. Angles do not change when the size of the things meeting at an angle change. Basically any rules that we discover about the behaviour of the line lengths and angles here, will be true for bigger circles, as long as we remember to scale them back up properly. So our circle now looks like this:
[pic]
Lets give the various things we are going to talk about some names. A circle with a radius of one, is known as a unit circle. We also have an angle here, which I am going to call Angie, because I am sick of one letter names for variables. Let’s call the line with unchanging length Abby. Abby is one unit long. Good. Now remember that the circumference of a circle is \(\pi\) times the diameter. The diameter here is two Abbies. So the whole circumference is \(2\cdot \pi \cdot Abby\). But we have already decided that Abby is one, so that makes the circle \(2\pi\) long.
Next we are going to name the point where Abby meets the circle, Polly. As Angie changes in size Polly is going to move around the circle. We can then draw two new lines along the real and imaginary axes. The line on the real axis corresponds the Polly’s real value, and the one on the imaginary axis corresponds to Polly’s imaginary part. The real axis line we will call Raul, and the imaginary axis line we will call Imogen. This all looks like this:
OK, starting places please! Where does Polly start if the angle is actually closed all the way? We agreed that we start measuring angles on positive side of the x axis, so Polly will be on the circle where it meets the positive real axis here:
Now, what can we say about our characters at this size of Angie? Well, Raul is one unit long, all the way to Polly. Imogen is actually zero, because Polly has not lifted off the real axis. So this number on the complex plane at Polly, has no Imaginary part – in other words it is just a real number. Now let’s open up the angle to one quarter of the circle. Polly is now right at the very top of the circle. It is now Raul's turn to be zero, and Imogen is now exactly one unit long because Polly is actually ON the imaginary axis, directly above the origin. Now the number has no REAL value.
You can see in the picture that the computer has written Imogen and Abby on top of each other because with this size of Angie, they are actually exactly the same size.
If we move Polly further round the circle, anticlockwise, Imogen is going to start shrinking, and Raul is going to start growing into a negative length:
So in that picture Raul is now negative because it is to the left of the zero on the real axis. We can keep picturing what happens to Raul and Imogen at different sizes of Angie, OR we could calculate what happens for each of the three hundred and sixty different whole angles, and then make an animation of the result. That would be handy.
So as the angle increases in size, Polly travels around the circle, Raul grows, while Imogen shrinks, until Raul is at maximum size, and Imogen at zero, and then the process reverses. At any point, either Raul or Imogen is growing and the other shrinking. The important fact to notice is that any point on the circle has a unique value of both Raul and Imogen. This means if you are given the lengths of Raul AND Imogen, you can work out the size of the angle. Can you do that if you are only given the size of Raul OR Imogen? No. Say you are told that Imogen is half a unit long. Well, Imogen is half a unit long twice - first on the way UP to Polly being at the top of the circle, and second on the way DOWN from Polly being at the top. So you also need to know something about Raul (whether it is positive or negative), to tell whether the Imogen in question is that on the left or right of the imaginary axis. In fact, if all you know is whether Raul and Imogen are positive or negative, you can tell which quarter of the circle Polly will be on. For instance, if both are positive, Polly will be in the first quarter. If Raul is negative, but Imogen is Positive, Polly will be in the second quarter. If both are negative, Polly is in the third quarter, and if Raul is positive but Imogen negative, Polly will be in the fourth and final quarter.
Let’s talk about Polly’s journey as well. When Polly reached the very top of the circle, we said that Angie was one quarter of a circle. How far has Polly traveled? Remember that Polly is stuck on the circle. So if we ask how far Polly has traveled to get to the top of the circle, what we are really asking is what is the length of that quarter of the circle. How do we find that out? Well, remember that we know, exactly, how long the circumference of our unit circle is. It is \(2\pi\) long. So a quarter of that total distance would be \(\tfrac{1}{2}\pi\), or \(\tfrac{\pi}{2}\). So the distance covered by Polly from the start to the very top of the circle is exactly \(\tfrac{\pi}{2}\) units. When Polly is all the way over at the left hand side, the total distance traveled is exactly \(\pi\) units. In fact, instead of talking about the amount of “turn” at the centre of the circle to define the angle, we could just talk about the distance covered by Polly. If we decided to do that, and I am going to do that from now on, we would be using something called radian measure. This just measures the distance around the circle in units called radians. There are exactly \(2\pi\) radians in the unit circle. So instead of saying \(180^{\circ}\), we would say \(\pi\) radians.
Let's quickly convert our polar form complex number into radians. It looks like this in degrees: \(\sqrt{5}\angle 30^{\circ}\). So what is thirty degrees in radians? It is going to be some fraction of \(\pi\). If \(180^{\circ}\) is \(\pi\) radians, then one degree is \(\tfrac{\pi}{180}\) radians. That means that thirty degrees is just thirty times that amount, which is \(\tfrac{30\cdot \pi}{180}\). That's a bit of a mouthful though, and we can simplify it by spotting that one hundred and eighty can be divided up into six parts, each of size thirty. In other words, or mathematical notation, \(\tfrac{30}{180}=\tfrac{1}{6}\). What we have done there is to say that the ratio of thirty to one hundred and eighty is the same as the ratio of one to six. So there are six thirties in one hundred and eighty and six ones in six, so the ratios represented by both of those fractions are the same. Instead of \(\tfrac{30\cdot \pi}{180}\) radians, we can say \(\tfrac{\pi}{6}\) radians. Our polar form number using radian measure looks like this: \(\sqrt{5}\angle \tfrac{\pi}{6}\). We do not typically need to write radians after the angle units. If an angle does not have the degree symbol, and involves \(\pi\) in any capacity, you are safe to assume it is in radians.
I like radians because they are a much more sensible form of measurement. You can see exactly what they are on the unit circle. You could try to measure the size of an angle in radians using only a bit of string (lay it along the line of the circle one unit from the origin life it up and lie it flat along a ruler, there's your angle size). You can't do that with degrees.
OK, let's get back to the relationship between Angie, Raul and Imogen. If you want to find the size of Imogen for any given size of Angie, you just use a function with Angie as the input variable. Good, that sounds simple. What does the function look like then? The function is not the same as functions we have looked at before. These had letters in place of variables, and algebraic notation. In other words they were algebraic functions. You get different kinds of functions. Remember our very first function hotbeverage of drink flavouring? No algebra there was there? So what is the function we use to find the size of Imogen for any specific value of Angie? It is a geometric function, meaning that it involves drawing pictures. Just like the pictures above in fact. The steps in the function are:
Draw a unit circle on the real and imaginary axes, centered at the origin.
Start at the point where the circle meets the real axis on the positive side.
Moving along the unit circle until you have traveled the distance equal to the angle in radians.
Measure the height you are above, or as the case may be below, the real axis.
The distance is the value of Imogen you want.
This function has a name. It is called the sine function. None of this was explained to me in school. Exactly what the sine function was, was a complete mystery. It is hardly difficult. It only involves the measurement of two lines, the circumference of the unit circle, and the distance away from the real axis. Anyway, we write thes function down like this \(sin(angle)\). If we use variables instead of precise numbers for the size of the angle, we leave out the brackets around the angle. Also, we don't tend to use letters of the latin alphabet (the one this is written in), we use the greek alphabet instead.
(I am only calling the horizontal axis the real axis here because we are dealing with complex numbers. The sine function works perfectly well if you change from real and imaginary to horizontal and vertical, or x and y, or any other labels you want to give the axes. What is important is that you are measuring the lengths of two lines on a two dimensional plane (a flat surface). So the sine function is not restricted to the complex plane, and indeed was discovered, or invented if you have that world view, millennia before the complex plane).
What about Raul? We've left it behind just now. There is another function for working out Raul. It looks almost exactly the same as the sine function:
Draw a unit circle on the real and imaginary axes, centered at the origin.
Start at the point where the circle meets the real axis on the positive side.
Moving along the unit circle until you have traveled the distance equal to the angle in radians.
Measure the distance you are to the right, or as the case may be left, of the imaginary axis.
The distance is the value of Raul you want.
This is called the cosine function. We write it as \(cos(angle)\), and the same rule apply if using variables as applied to the sine function.
So, back to our complex number. We want to find out what number we get with the angle \(\tfrac{\pi}{6}\) at length \(\sqrt{5}\) from the origin. First of all let's look at that angle on the unit circle:
You can see that I am now drawing the “angle” ONTO the unit circle itself instead of down about the origin. This shows us exactly what we are talking about in our geometric function above. We have completed the first three instructions. We now just need to measure the height we are above the real axis. Lets stick show this:
There's our Imogen! It's a bit difficult to see what value it has though, because I haven't drawn on any other markings. Let's zoom in a bit to the intersection between the dashed line and the imaginary axis:
If you think that Imogen looks like it is a half, then you are right. No matter how closely you measure Imogen, it is perfectly a half. Right, what about Raul?
OK, lets zoom in again to see if we can find it more accurately:
Well, that's not really helping this time. It is between eight and nine tenths. To save zooming time, I will say that no matter how carefully you measure Raul, it does not resolve into a nice fraction. It is actually an irrational number. I can actually prove what it is exactly! How? Look at the diagram. You have the green line, the dashed line and the real axis. We know the length of the green line, it is one unit. We also know the value of the dashed line – it's Imogen, and we just measured it in the last step – it is a half. The dashed line meets at a right angle, so we can use pythagoras to get the length of Raul. So the length of the green line squared has to equal the length of the dashed line squared plus the length of Raul. Lets algebra this sod:
\[Green^2=Imogen^2+Raul^2\]
\[Green^2-Imogen^2=Raul^2\]
\[(1)^2-(\tfrac{1}{2})^2=Raul^2\]
\[1-\tfrac{1}{4}=Raul^2\]
\[\tfrac{3}{4}=Raul^2\]
\[Raul=\sqrt{\tfrac{3}{4}}\]
What can we do with the square root of a fraction? Well, let's think of it as raising the fraction to a power instead. So:
\[Raul=(\tfrac{3}{4})^{\tfrac{1}{2}}\]
And if you raise a fraction to a power, that is the same as raising the top part by the power and the bottom part by the power. So:
\[Raul=\frac{3^{\tfrac{1}{2}}}{4^{\tfrac{1}{2}}}\]
We know what the square root of four is, that's just two. To save time I will just tell you that the square root of three is irrational, so we just leave it as the square root of three. That gives us:
\[Raul=\frac{\sqrt{3}}{2}\]
If you ask your calculator what the square root of three divided by two is, you will get a number which goes on for ever, but is somewhere between eight and nine tenths.
OK, so we have our sine and cosine functions of the angle. How do we turn these into the rectangular form of the complex number? There is actually only one stage left to go. We just need to scale the numbers back up. When we scaled down the number to the unit circle, we saw the absolute value of \(\sqrt{5}\) becoming one. To get from one back to \(\sqrt{5}\), we just multiply one by \(\sqrt{5}\). If we are multiplying one length by this scale factor, we need to multiply all lengths by the same factor.
So the real part of our complex number is going to be Raul (\(\tfrac{\sqrt{3}}{2}\)) multiplied by \(\sqrt{5}\). That will be \(\frac{\sqrt{5}\cdot \sqrt{3}}{2}\). To multiply two square roots together, you just multiply the two numbers being square rooted, and then take the square root of that. (Think about it: \(\sqrt{2}\cdot \sqrt{2}\) is the same as \(\sqrt{4}\)). So the real part of the complex number is \(\tfrac{\sqrt{15}}{2}\). If you think that looks like a horror, you are right. It certainly is not two, which was our guess. What about the imaginary part of the number? That's going to be Imogen (a half) multiplied by \(\sqrt{5}\), or just \(\tfrac{\sqrt{5}}{2}\). Again, that's a horror, and certainly is not one, which was our guess. This can be confirmed, if we measure the actual real and imaginary parts of the number using dashed lines:
As you can see when we plot this out properly, you can see that the real value is a little bit less than two, and the imaginary value is a little bit more than \(i\), or one. If you run the numbers we calculated above through a calculator to get a decimal representation, you will see they match this geometric one.
So we can say that the following polar form equals the following rectangular form:
\[\sqrt{5}\angle \tfrac{\pi}{6}=\tfrac{\sqrt{15}}{2}+\tfrac{\sqrt{5}}{2}i\]
We can say more generally that given any polar form number with an absolute value of \(r\) and an angle of \(\theta\) (\(r\angle \theta\)) the rectangular form of that number will be \(r\cdot cos\theta + r\cdot sin\theta i\). The bit at the end looks a little ambiguous. Do we mean \(sin(\theta \cdot i)\) or \(sin(\theta)\cdot i\)? To avoid this potential confusion, I am going to move the \(i\): \(r\cdot cos\theta + r\cdot i\cdot sin\theta\). We may as well lose the dots for multiplication as well: \(rcos\theta + risin\theta\)
What about going back the other way? You basically just do everything in reverse. Let's consider the number \(2+2i\) that we looked at before. What you do is simple Pythagoras to get the absolute value (we did this last time). So that absolute value is \(\sqrt{2^2+2^2}\) or \(\sqrt{8}\). Easy. Now, what about the angle, which we will call \(\theta\)?
To get the real and imaginary parts we multiplied the sine and cosine of the angle by the absolute value. So to GET the sine and cosine of the real and imaginary parts, we just DIVIDE those parts by the absolute value. That gets us to:
\[sin\theta=\frac{2}{\sqrt{8}}\]
\[cos\theta=\frac{2}{\sqrt{8}}\]
Those are the co-ordinates for the point on the unit circle we are interested in. So let's mark these off as values for Imogen and Raul:
Now let's find the point on the unit circle that corresponds to those values:
The two dashed lines that we have just projected represent the OPPOSITE of the sine and cosine functions. These are known as the arcsine or arccosine functions. They take a value on the axes and convert it into possible distances around the unit circle for those functions.
But, here's the thing, the function arcsin, doesn't know whether the point on the circle you are trying to find is to the left or right of the imaginary axis. Equally, the function arccosine doesn't know if the point is above or below the real axis. So the honest output of the function \(arcsine(imogen)\) should be either the distance to Polly OR Polly-A. Equally, the honest output of the function \(arccosine(raul)\) shoud be either the distance to Polly OR Polly-B. This is really the same as the honest answer to the square root of four being both plus and minus two. There are two equally good answers. Ask your calculator though, and it will only tell you about plus two. Ask your calculator about \(arcsine(imogen)\) and it will only tell you about distances on the right hand side of the imaginary axis. Ask about \(arccosine(raul)\) and it will only tell you about distances above the real axis.
We'll come back to this problem, but for now, we can see the only possible distance is where \(arcsine(imogen)=arccosine(raul)\). This is where the two dashed lines meet, and this must be the Polly we are after. Remember that if we only had one or the other of imogen or raul, we would be in trouble, because we wouldn't know which of the two possible Pollys was the correct one. Finally, lets work out how far around the circle you have to go from the starting point to get to Polly:
If you actually measure the distance around the circle to Polly, you will find it is exactly one eighth of the circle, or \(\tfrac{\pi}{4}\) radians. So that gives us our angle for the polar form:
\[2+2i=\sqrt{8}\angle \tfrac{\pi}{4}\]
Now, the problem at this stage is finding an easy way to express this as a general rule. Let's look at the function to turn a polar form complex number into a rectangular form. The polar form has two variables, the absolute value of the number, and the angle. We are using the variables \(r\) for the absolute value, and \(\theta\) for the angle. So the function to convert one to the other is going to have TWO variables going into it. We write that like this: \(f(r,\theta)\). And setting the whole thing out we get:
\[f(r,\theta)= rcos\theta + risin\theta\]
Now it makes perfect sense. Moving on, how do we write the same kind of function to show the relationship between Raul, Imogen and the distance around the unit circle to Polly? How do we, in otherwords, turn the step of “look for where the two lines cross, and that's your Polly” into mathematical notation? What we need is a function that takes a variable and then asks a question. Weird? Yes, but very useful. What am I talking about? Well, the function is going to have two variables going into it again. This time they are just the real and imaginary parts of the complex number. We'll call them \(a\) for the real part and \(b\) for the imaginary part. So our new function for converting a rectangular number to a polar one is going to be written like this: \(g(a,b)\). The function is going to start in any case with the absolute value of the complex number being set to the square root of \(a^2+b^2\), which is the same, whatever the angle.
But we cannot just write out a simple one line function can we? No, because we know that the exact length of \(\theta\) is going to depend on the reverse sine or cosine function of one part, and whether the other part is positive or negative. It is actually easier to work with the reverse of the cosine function for this, because it always produces a positive number. Basically the arccosine function always tells you how far you need to move away from the starting position, and then you just need to know which side of the real axis you are. You could work with the arcsine function, but it has the problem that it spits out negative distances. This is not a massive problem - a negative angle, just really means go round the whole circle and then back up that quantity, but it is an unnecessary hassle.
So, we can actually write out our function as follows:
\[\begin{equation*}
g(a,b)= \left\{ \begin{array}{lr}
\sqrt{a^2+b^2} \angle arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b >= 0,\\
\sqrt{a^2+b^2} \angle 2 \pi-arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b < 0.
\end{array} \right.
\end{equation*}\]
If that looks fucking horrendous, yes it is pretty much the worst thing we have seen in this adventure so far. Lets have a go at translating it into english shall we? It says that you have two options for finding the polar form of the rectangular number with real part \(a\) and imaginary part \(b\). No matter which option you choose, the absolute value is always the square root of \(a\) squared plus \(b\) squared. If the imaginary part is greater than or equal to zero, then the angle is the arccosine of the real part divided by the absolute value of the number. If the imaginary part is less than zero, then the angle is \(2\pi\) (or the full circle) minus the arccosine of the real part divided by the absolute value of the number.
Actually, lumping zero in with the positive imaginary parts is a red herring. It doesn't matter which club zero joins. If the imaginary part is zero, then Polly has to lie on the real number line. There are only two places on the real number line where polly can lie. So if the imaginary part is zero, then the value of the real part will tell you whether it is one or the other. In other words, \(arccosine(-1)=\pi\), and \(arccosine(1)=0\). So in either case it doesn't matter if you take the first option and ADD the result to 0, or start with \(2\pi\) and SUBTRACT the result, you end up in the same place. We are assuming, incidentally, that the position on the circle with a distance of \(0\) is the same as the position \(2\pi\). Which is a safe assumption to make for now.
So there you go, Polar to Recangular:
\[f(r,\theta)= r\cdot cos\theta + risin\theta\]
and Rectangular to Polar:
\[\begin{equation*}
g(a,b)= \left\{ \begin{array}{lr}
\sqrt{a^2+b^2} \angle arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b >= 0,\\
\sqrt{a^2+b^2} \angle 2 \pi-arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b < 0.
\end{array} \right.
\end{equation*}\]
Last time we looked at the two forms of complex numbers. The rectangular form identified the location of our complex number on the complex plane by it’s real and imaginary parts. You mark them off on the relevant axes, and then draw a rectangle. The corner opposite the origin (the zero point) is your complex number. Fine. The other way to describe EXACTLY the same number, the polar form, was to note down which direction to point in at the origin and then how far to move to get to the number. So with the rectangular form you draw a rectangle, with the polar form you draw a line at some angle.
So we need to describe the angle when placing a value on our complex number. I picked a really easy complex number to get to last time, which was just at a \(45^{\circ}\) angle, or one eighth of the whole circle. I could work out the angle without any particular bother, because the real and imaginary parts of the number were the same. If we are dealing with any other complex numbers, we will need to deal with more complicated angles. How, then, would we go about converting any complex number in rectangular form to polar form and vice versa?
First of all I like to ask the question “Can we do that?” I mean, do we have enough information available to actual perform the task? For instance, I once struggled for quite some time trying to work out how to get the area of a piece of ground when the only information I had was the lengths of each of the four sides. I was staring idly into space trying to get an answer when my eyes focused on the mechanism use to automatically close my door. I am talking about the things described in this article. I realised that the two arms of the door closer, the door frame and the door itself made up four fixed length sides of an area. However I saw when the door opened and closed that the area enclosed by the sides went from very long and slim to very broad and fat. The area was obviously changing depending on the angles. I then stopped trying to find a solution to the area of the ground, because I realised that I could not find one without some more information, namely the angles between the sides of the area of ground.
(Second reasonable question, why are we doing this? It turns out, as we will see, that it is dead easy to add complex numbers in rectangular form, but hard to multiply them. Conversely it is easy to multiply numbers in polar form, but hard to add them. So if we can swap between the two forms, we get the best of both worlds. Also, it turns out that the process of converting between sides and angles is going to be key to the understanding of this whole project, so we will have to look at all this eventually.)
So, do we have enough information from the angle and length only to derive the length of the sides of the rectangle? Lets draw out roughly what I am talking about:
[pic of rect and polar]
See the polar form line? It has a fixed angle and length? What happens if we change either the angle or the length? The point that the line reaches will change won’t it? And if that point changes, then the lengths of the rectangle that reach that point will also have to change? Yes. And vice versa, if we change the lengths of either of the sides of the rectangle, that will force the length AND the angle to change as well? Yes. So one set of rectangle lengths is equal to one, and only one, set of line and angle sizes. So, if we have the rectangle lengths OR the angle and line length, we DO have enough information to work out the one from the other. Good stuff. At least this won’t be an afternoon wasted.
Let’s start with the number \(\sqrt{5}\angle 30^{\circ}\). How do we find the rectangular form of this number? Let’s see what it looks like first:
[pic of number]
Well, it looks like it ends up at roughly our old friend \(2+i\), but I may not have drawn the line with sufficient precision. Is it exactly \(2+i\)? The first thing to do is to test that the length of the line fits. When we convert to rectangular form, we are dealing with a right angled triangles. Why? Because a defining characteristic of rectangles is that they have four right angles in them. So with the rectangular form that we are converting to, the angle where the line from the number hits either the real or the imaginary axis will be a right angle. The absolute value line cuts through the middle of this rectangle creating two triangles. Pythagoras’ theorem tells us that the square of the length of the absolute value line must equal the square of the lengths of the other two sides added together. The other two sides are of course, the size of the real and imaginary parts of the number marked off on those axes.
We said that it looks like our candidate number is \(2+i\), so if we guess that the other two sides have lengths of two and one, then we get \(2^2=4\) and \(1^1=1\) and four plus one is five, and we know our line is \(\sqrt{5}\) long, so that fits. It does appear that \(2+i\) is correct. But, it only MIGHT be correct. There are lots of points which have a line length of \(\sqrt{5}\); they lie on a circle with that radius. That circle goes through the number \(2+i\). Because the circle goes through that number it also goes through other numbers that are very very close indeed to \(2+i\) (actually as close as you like). That means that just because our line length fits our guess, we cannot stop there. We need to confirm that the angle we have, \(30^{\circ}\) points directly at the number \(2+i\) and not to a number very close to it.
So how are we going to do this? Well, let's try to work out what the relationship is between the size of the angle, and the real and imaginary parts of the complex number. In other words, if you change the size of the angle, what happens to the size of the real and imaginary parts? Remember, though, we are looking only at changes in the real and imaginary parts and the angle, so we will be leaving the length of the line itself fixed so it cannot be a factor in what happens.
Right. If we have a fixed length, and a varying angle at one end, what is going to happen to the other end of that line? Glittering prizes for anyone who said it will mark out a circle. Remember that our definition of a circle was all points a fixed distance from a fixed point? Here we have that fixed point, the origin, and a fixed distance, the length of the line attached to the origin (otherwise known as the absolute value of our complex number). And we also just said above that there are lots of points with a length of \(sqrt{5}\) which lie on a circle with that radius about the origin.
As our angle increases, one point remains at the origin, and the other point will trace out the shape of a circle around the origin.
[pic] [pic] [pic]
This all looks a bit messy with the square root floating about there. Even if the absolute value was something nice like two or seven, rather than a square root, if we study this arrangement in detail we will only be able to draw conclusions about this arrangement. We want to be able to reach more general conclusions that will help us find out what angles do to the real and imaginary parts of complex numbers with ANY absolute value. We therefore want to get rid of the square root. To get rid of it, I am going to shrink the circle down so that it just has a radius of one. The units we use are unimportant. This is OK, as long as we remember that we need to scale all the other measurements to get answers. The good news is that we do not need to do any scaling on the angle. Angles do not change when the size of the things meeting at an angle change. Basically any rules that we discover about the behaviour of the line lengths and angles here, will be true for bigger circles, as long as we remember to scale them back up properly. So our circle now looks like this:
[pic]
Lets give the various things we are going to talk about some names. A circle with a radius of one, is known as a unit circle. We also have an angle here, which I am going to call Angie, because I am sick of one letter names for variables. Let’s call the line with unchanging length Abby. Abby is one unit long. Good. Now remember that the circumference of a circle is \(\pi\) times the diameter. The diameter here is two Abbies. So the whole circumference is \(2\cdot \pi \cdot Abby\). But we have already decided that Abby is one, so that makes the circle \(2\pi\) long.
Next we are going to name the point where Abby meets the circle, Polly. As Angie changes in size Polly is going to move around the circle. We can then draw two new lines along the real and imaginary axes. The line on the real axis corresponds the Polly’s real value, and the one on the imaginary axis corresponds to Polly’s imaginary part. The real axis line we will call Raul, and the imaginary axis line we will call Imogen. This all looks like this:
OK, starting places please! Where does Polly start if the angle is actually closed all the way? We agreed that we start measuring angles on positive side of the x axis, so Polly will be on the circle where it meets the positive real axis here:
Now, what can we say about our characters at this size of Angie? Well, Raul is one unit long, all the way to Polly. Imogen is actually zero, because Polly has not lifted off the real axis. So this number on the complex plane at Polly, has no Imaginary part – in other words it is just a real number. Now let’s open up the angle to one quarter of the circle. Polly is now right at the very top of the circle. It is now Raul's turn to be zero, and Imogen is now exactly one unit long because Polly is actually ON the imaginary axis, directly above the origin. Now the number has no REAL value.
You can see in the picture that the computer has written Imogen and Abby on top of each other because with this size of Angie, they are actually exactly the same size.
If we move Polly further round the circle, anticlockwise, Imogen is going to start shrinking, and Raul is going to start growing into a negative length:
So in that picture Raul is now negative because it is to the left of the zero on the real axis. We can keep picturing what happens to Raul and Imogen at different sizes of Angie, OR we could calculate what happens for each of the three hundred and sixty different whole angles, and then make an animation of the result. That would be handy.
So as the angle increases in size, Polly travels around the circle, Raul grows, while Imogen shrinks, until Raul is at maximum size, and Imogen at zero, and then the process reverses. At any point, either Raul or Imogen is growing and the other shrinking. The important fact to notice is that any point on the circle has a unique value of both Raul and Imogen. This means if you are given the lengths of Raul AND Imogen, you can work out the size of the angle. Can you do that if you are only given the size of Raul OR Imogen? No. Say you are told that Imogen is half a unit long. Well, Imogen is half a unit long twice - first on the way UP to Polly being at the top of the circle, and second on the way DOWN from Polly being at the top. So you also need to know something about Raul (whether it is positive or negative), to tell whether the Imogen in question is that on the left or right of the imaginary axis. In fact, if all you know is whether Raul and Imogen are positive or negative, you can tell which quarter of the circle Polly will be on. For instance, if both are positive, Polly will be in the first quarter. If Raul is negative, but Imogen is Positive, Polly will be in the second quarter. If both are negative, Polly is in the third quarter, and if Raul is positive but Imogen negative, Polly will be in the fourth and final quarter.
Let’s talk about Polly’s journey as well. When Polly reached the very top of the circle, we said that Angie was one quarter of a circle. How far has Polly traveled? Remember that Polly is stuck on the circle. So if we ask how far Polly has traveled to get to the top of the circle, what we are really asking is what is the length of that quarter of the circle. How do we find that out? Well, remember that we know, exactly, how long the circumference of our unit circle is. It is \(2\pi\) long. So a quarter of that total distance would be \(\tfrac{1}{2}\pi\), or \(\tfrac{\pi}{2}\). So the distance covered by Polly from the start to the very top of the circle is exactly \(\tfrac{\pi}{2}\) units. When Polly is all the way over at the left hand side, the total distance traveled is exactly \(\pi\) units. In fact, instead of talking about the amount of “turn” at the centre of the circle to define the angle, we could just talk about the distance covered by Polly. If we decided to do that, and I am going to do that from now on, we would be using something called radian measure. This just measures the distance around the circle in units called radians. There are exactly \(2\pi\) radians in the unit circle. So instead of saying \(180^{\circ}\), we would say \(\pi\) radians.
Let's quickly convert our polar form complex number into radians. It looks like this in degrees: \(\sqrt{5}\angle 30^{\circ}\). So what is thirty degrees in radians? It is going to be some fraction of \(\pi\). If \(180^{\circ}\) is \(\pi\) radians, then one degree is \(\tfrac{\pi}{180}\) radians. That means that thirty degrees is just thirty times that amount, which is \(\tfrac{30\cdot \pi}{180}\). That's a bit of a mouthful though, and we can simplify it by spotting that one hundred and eighty can be divided up into six parts, each of size thirty. In other words, or mathematical notation, \(\tfrac{30}{180}=\tfrac{1}{6}\). What we have done there is to say that the ratio of thirty to one hundred and eighty is the same as the ratio of one to six. So there are six thirties in one hundred and eighty and six ones in six, so the ratios represented by both of those fractions are the same. Instead of \(\tfrac{30\cdot \pi}{180}\) radians, we can say \(\tfrac{\pi}{6}\) radians. Our polar form number using radian measure looks like this: \(\sqrt{5}\angle \tfrac{\pi}{6}\). We do not typically need to write radians after the angle units. If an angle does not have the degree symbol, and involves \(\pi\) in any capacity, you are safe to assume it is in radians.
I like radians because they are a much more sensible form of measurement. You can see exactly what they are on the unit circle. You could try to measure the size of an angle in radians using only a bit of string (lay it along the line of the circle one unit from the origin life it up and lie it flat along a ruler, there's your angle size). You can't do that with degrees.
OK, let's get back to the relationship between Angie, Raul and Imogen. If you want to find the size of Imogen for any given size of Angie, you just use a function with Angie as the input variable. Good, that sounds simple. What does the function look like then? The function is not the same as functions we have looked at before. These had letters in place of variables, and algebraic notation. In other words they were algebraic functions. You get different kinds of functions. Remember our very first function hotbeverage of drink flavouring? No algebra there was there? So what is the function we use to find the size of Imogen for any specific value of Angie? It is a geometric function, meaning that it involves drawing pictures. Just like the pictures above in fact. The steps in the function are:
Draw a unit circle on the real and imaginary axes, centered at the origin.
Start at the point where the circle meets the real axis on the positive side.
Moving along the unit circle until you have traveled the distance equal to the angle in radians.
Measure the height you are above, or as the case may be below, the real axis.
The distance is the value of Imogen you want.
This function has a name. It is called the sine function. None of this was explained to me in school. Exactly what the sine function was, was a complete mystery. It is hardly difficult. It only involves the measurement of two lines, the circumference of the unit circle, and the distance away from the real axis. Anyway, we write thes function down like this \(sin(angle)\). If we use variables instead of precise numbers for the size of the angle, we leave out the brackets around the angle. Also, we don't tend to use letters of the latin alphabet (the one this is written in), we use the greek alphabet instead.
(I am only calling the horizontal axis the real axis here because we are dealing with complex numbers. The sine function works perfectly well if you change from real and imaginary to horizontal and vertical, or x and y, or any other labels you want to give the axes. What is important is that you are measuring the lengths of two lines on a two dimensional plane (a flat surface). So the sine function is not restricted to the complex plane, and indeed was discovered, or invented if you have that world view, millennia before the complex plane).
What about Raul? We've left it behind just now. There is another function for working out Raul. It looks almost exactly the same as the sine function:
Draw a unit circle on the real and imaginary axes, centered at the origin.
Start at the point where the circle meets the real axis on the positive side.
Moving along the unit circle until you have traveled the distance equal to the angle in radians.
Measure the distance you are to the right, or as the case may be left, of the imaginary axis.
The distance is the value of Raul you want.
This is called the cosine function. We write it as \(cos(angle)\), and the same rule apply if using variables as applied to the sine function.
So, back to our complex number. We want to find out what number we get with the angle \(\tfrac{\pi}{6}\) at length \(\sqrt{5}\) from the origin. First of all let's look at that angle on the unit circle:
You can see that I am now drawing the “angle” ONTO the unit circle itself instead of down about the origin. This shows us exactly what we are talking about in our geometric function above. We have completed the first three instructions. We now just need to measure the height we are above the real axis. Lets stick show this:
There's our Imogen! It's a bit difficult to see what value it has though, because I haven't drawn on any other markings. Let's zoom in a bit to the intersection between the dashed line and the imaginary axis:
If you think that Imogen looks like it is a half, then you are right. No matter how closely you measure Imogen, it is perfectly a half. Right, what about Raul?
OK, lets zoom in again to see if we can find it more accurately:
Well, that's not really helping this time. It is between eight and nine tenths. To save zooming time, I will say that no matter how carefully you measure Raul, it does not resolve into a nice fraction. It is actually an irrational number. I can actually prove what it is exactly! How? Look at the diagram. You have the green line, the dashed line and the real axis. We know the length of the green line, it is one unit. We also know the value of the dashed line – it's Imogen, and we just measured it in the last step – it is a half. The dashed line meets at a right angle, so we can use pythagoras to get the length of Raul. So the length of the green line squared has to equal the length of the dashed line squared plus the length of Raul. Lets algebra this sod:
\[Green^2=Imogen^2+Raul^2\]
\[Green^2-Imogen^2=Raul^2\]
\[(1)^2-(\tfrac{1}{2})^2=Raul^2\]
\[1-\tfrac{1}{4}=Raul^2\]
\[\tfrac{3}{4}=Raul^2\]
\[Raul=\sqrt{\tfrac{3}{4}}\]
What can we do with the square root of a fraction? Well, let's think of it as raising the fraction to a power instead. So:
\[Raul=(\tfrac{3}{4})^{\tfrac{1}{2}}\]
And if you raise a fraction to a power, that is the same as raising the top part by the power and the bottom part by the power. So:
\[Raul=\frac{3^{\tfrac{1}{2}}}{4^{\tfrac{1}{2}}}\]
We know what the square root of four is, that's just two. To save time I will just tell you that the square root of three is irrational, so we just leave it as the square root of three. That gives us:
\[Raul=\frac{\sqrt{3}}{2}\]
If you ask your calculator what the square root of three divided by two is, you will get a number which goes on for ever, but is somewhere between eight and nine tenths.
OK, so we have our sine and cosine functions of the angle. How do we turn these into the rectangular form of the complex number? There is actually only one stage left to go. We just need to scale the numbers back up. When we scaled down the number to the unit circle, we saw the absolute value of \(\sqrt{5}\) becoming one. To get from one back to \(\sqrt{5}\), we just multiply one by \(\sqrt{5}\). If we are multiplying one length by this scale factor, we need to multiply all lengths by the same factor.
So the real part of our complex number is going to be Raul (\(\tfrac{\sqrt{3}}{2}\)) multiplied by \(\sqrt{5}\). That will be \(\frac{\sqrt{5}\cdot \sqrt{3}}{2}\). To multiply two square roots together, you just multiply the two numbers being square rooted, and then take the square root of that. (Think about it: \(\sqrt{2}\cdot \sqrt{2}\) is the same as \(\sqrt{4}\)). So the real part of the complex number is \(\tfrac{\sqrt{15}}{2}\). If you think that looks like a horror, you are right. It certainly is not two, which was our guess. What about the imaginary part of the number? That's going to be Imogen (a half) multiplied by \(\sqrt{5}\), or just \(\tfrac{\sqrt{5}}{2}\). Again, that's a horror, and certainly is not one, which was our guess. This can be confirmed, if we measure the actual real and imaginary parts of the number using dashed lines:
As you can see when we plot this out properly, you can see that the real value is a little bit less than two, and the imaginary value is a little bit more than \(i\), or one. If you run the numbers we calculated above through a calculator to get a decimal representation, you will see they match this geometric one.
So we can say that the following polar form equals the following rectangular form:
\[\sqrt{5}\angle \tfrac{\pi}{6}=\tfrac{\sqrt{15}}{2}+\tfrac{\sqrt{5}}{2}i\]
We can say more generally that given any polar form number with an absolute value of \(r\) and an angle of \(\theta\) (\(r\angle \theta\)) the rectangular form of that number will be \(r\cdot cos\theta + r\cdot sin\theta i\). The bit at the end looks a little ambiguous. Do we mean \(sin(\theta \cdot i)\) or \(sin(\theta)\cdot i\)? To avoid this potential confusion, I am going to move the \(i\): \(r\cdot cos\theta + r\cdot i\cdot sin\theta\). We may as well lose the dots for multiplication as well: \(rcos\theta + risin\theta\)
What about going back the other way? You basically just do everything in reverse. Let's consider the number \(2+2i\) that we looked at before. What you do is simple Pythagoras to get the absolute value (we did this last time). So that absolute value is \(\sqrt{2^2+2^2}\) or \(\sqrt{8}\). Easy. Now, what about the angle, which we will call \(\theta\)?
To get the real and imaginary parts we multiplied the sine and cosine of the angle by the absolute value. So to GET the sine and cosine of the real and imaginary parts, we just DIVIDE those parts by the absolute value. That gets us to:
\[sin\theta=\frac{2}{\sqrt{8}}\]
\[cos\theta=\frac{2}{\sqrt{8}}\]
Those are the co-ordinates for the point on the unit circle we are interested in. So let's mark these off as values for Imogen and Raul:
Now let's find the point on the unit circle that corresponds to those values:
The two dashed lines that we have just projected represent the OPPOSITE of the sine and cosine functions. These are known as the arcsine or arccosine functions. They take a value on the axes and convert it into possible distances around the unit circle for those functions.
But, here's the thing, the function arcsin, doesn't know whether the point on the circle you are trying to find is to the left or right of the imaginary axis. Equally, the function arccosine doesn't know if the point is above or below the real axis. So the honest output of the function \(arcsine(imogen)\) should be either the distance to Polly OR Polly-A. Equally, the honest output of the function \(arccosine(raul)\) shoud be either the distance to Polly OR Polly-B. This is really the same as the honest answer to the square root of four being both plus and minus two. There are two equally good answers. Ask your calculator though, and it will only tell you about plus two. Ask your calculator about \(arcsine(imogen)\) and it will only tell you about distances on the right hand side of the imaginary axis. Ask about \(arccosine(raul)\) and it will only tell you about distances above the real axis.
We'll come back to this problem, but for now, we can see the only possible distance is where \(arcsine(imogen)=arccosine(raul)\). This is where the two dashed lines meet, and this must be the Polly we are after. Remember that if we only had one or the other of imogen or raul, we would be in trouble, because we wouldn't know which of the two possible Pollys was the correct one. Finally, lets work out how far around the circle you have to go from the starting point to get to Polly:
If you actually measure the distance around the circle to Polly, you will find it is exactly one eighth of the circle, or \(\tfrac{\pi}{4}\) radians. So that gives us our angle for the polar form:
\[2+2i=\sqrt{8}\angle \tfrac{\pi}{4}\]
Now, the problem at this stage is finding an easy way to express this as a general rule. Let's look at the function to turn a polar form complex number into a rectangular form. The polar form has two variables, the absolute value of the number, and the angle. We are using the variables \(r\) for the absolute value, and \(\theta\) for the angle. So the function to convert one to the other is going to have TWO variables going into it. We write that like this: \(f(r,\theta)\). And setting the whole thing out we get:
\[f(r,\theta)= rcos\theta + risin\theta\]
Now it makes perfect sense. Moving on, how do we write the same kind of function to show the relationship between Raul, Imogen and the distance around the unit circle to Polly? How do we, in otherwords, turn the step of “look for where the two lines cross, and that's your Polly” into mathematical notation? What we need is a function that takes a variable and then asks a question. Weird? Yes, but very useful. What am I talking about? Well, the function is going to have two variables going into it again. This time they are just the real and imaginary parts of the complex number. We'll call them \(a\) for the real part and \(b\) for the imaginary part. So our new function for converting a rectangular number to a polar one is going to be written like this: \(g(a,b)\). The function is going to start in any case with the absolute value of the complex number being set to the square root of \(a^2+b^2\), which is the same, whatever the angle.
But we cannot just write out a simple one line function can we? No, because we know that the exact length of \(\theta\) is going to depend on the reverse sine or cosine function of one part, and whether the other part is positive or negative. It is actually easier to work with the reverse of the cosine function for this, because it always produces a positive number. Basically the arccosine function always tells you how far you need to move away from the starting position, and then you just need to know which side of the real axis you are. You could work with the arcsine function, but it has the problem that it spits out negative distances. This is not a massive problem - a negative angle, just really means go round the whole circle and then back up that quantity, but it is an unnecessary hassle.
So, we can actually write out our function as follows:
\[\begin{equation*}
g(a,b)= \left\{ \begin{array}{lr}
\sqrt{a^2+b^2} \angle arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b >= 0,\\
\sqrt{a^2+b^2} \angle 2 \pi-arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b < 0.
\end{array} \right.
\end{equation*}\]
If that looks fucking horrendous, yes it is pretty much the worst thing we have seen in this adventure so far. Lets have a go at translating it into english shall we? It says that you have two options for finding the polar form of the rectangular number with real part \(a\) and imaginary part \(b\). No matter which option you choose, the absolute value is always the square root of \(a\) squared plus \(b\) squared. If the imaginary part is greater than or equal to zero, then the angle is the arccosine of the real part divided by the absolute value of the number. If the imaginary part is less than zero, then the angle is \(2\pi\) (or the full circle) minus the arccosine of the real part divided by the absolute value of the number.
Actually, lumping zero in with the positive imaginary parts is a red herring. It doesn't matter which club zero joins. If the imaginary part is zero, then Polly has to lie on the real number line. There are only two places on the real number line where polly can lie. So if the imaginary part is zero, then the value of the real part will tell you whether it is one or the other. In other words, \(arccosine(-1)=\pi\), and \(arccosine(1)=0\). So in either case it doesn't matter if you take the first option and ADD the result to 0, or start with \(2\pi\) and SUBTRACT the result, you end up in the same place. We are assuming, incidentally, that the position on the circle with a distance of \(0\) is the same as the position \(2\pi\). Which is a safe assumption to make for now.
So there you go, Polar to Recangular:
\[f(r,\theta)= r\cdot cos\theta + risin\theta\]
and Rectangular to Polar:
\[\begin{equation*}
g(a,b)= \left\{ \begin{array}{lr}
\sqrt{a^2+b^2} \angle arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b >= 0,\\
\sqrt{a^2+b^2} \angle 2 \pi-arccos\left(\tfrac{a}{\sqrt{a^2+b^2}}\right) & \text{if } b < 0.
\end{array} \right.
\end{equation*}\]
Subscribe to:
Comments (Atom)