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:
Showing posts with label apropos of nothing. Show all posts
Showing posts with label apropos of nothing. Show all posts
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, 6 June 2011
Irrationality of the Square Root of Four?
OK, last time we proved that the square root of two is not one whole number divided by another whole number, because we could continue dividing for ever, and we know that we cannot do that because we would eventually run out of numbers. It does all sound a bit fishy though. Is this not just some trick of the maths? To double check, lets try the same process, but with the square root of four instead. The square root of four is easy - it is just two, because two multiplied by two is four.
Anyway, we are assuming that the square root of four can be written as one number over another number. So lets use the same letters as last time.
\[\frac{a}{b}=\sqrt{4}\]
Excellent, again. Some fraction equals the square root of four. That's the assumption that we want to make. Nothing wrong so far. Let's now do a mathematical operation on this equation.
What we want to do is get the right hand side to just be four. This means that we need to multiply it by itself to get four. Obviously the square root of four multiplied by the square root of four is four - because that's where it came from. Let's skip the not equals sign stuff this time around, you get the idea.
\[\frac{a^2}{b^2}=4\]
And again, we know that we can multiply both sides by \(b^2\) to get:
\[a^2=4\cdot b^2\]
Now at this point can we say that \(a\) is an even number? Yes, we can run through all of our odds and evens arguments and still say that, because four is just two multiplied by two, so the left hand side is still some other number on the right hand side multiplied by two. So that gives us:
\[(2\cdot c)^2=4\cdot b^2\]
And we can square out contents of the brackets on the left hand side:
\[2\cdot 2\cdot c\cdot c=4\cdot b^2\]
\[2\cdot 2\cdot c^2=4\cdot b^2\]
\[4\cdot c^2=4\cdot b^2\]
OK. Last time when hunting for the square root of two we had this:
\[4\cdot c^2=2\cdot b^2\]
What is the difference here? The right hand side is multiplied by the SAME NUMBER as the left hand side - four. What can we gather from this? Well we can divide both sides by four to get this:
\[c^2 = b^2\]
And we can square root each side to get this:
\[c = b\]
So we now know that \(c\) is the same as \(b\). We also know that \(a\) is the same as \(2\cdot c\). So we can now convert both \(a\) and \(b\) into their equivalents of \(c\) and stick those back in the very first equation:
\[\frac{2c}{c}=\sqrt{4}\]
And from our arguments last time we also know that is the same as:
\[2\cdot \frac{c}{c}=\sqrt{4}\]
\[2\cdot 1=\sqrt{4}\]
\[2=\sqrt{4}\]
So we have established that two is the square root of four. Which it is. So our assumption this time, that the square root of four can be written as one number divided by another number IS correct. In fact we know that it is always correct as long as the top number is the bottom number multiplied by two.
Anyway, we are assuming that the square root of four can be written as one number over another number. So lets use the same letters as last time.
\[\frac{a}{b}=\sqrt{4}\]
Excellent, again. Some fraction equals the square root of four. That's the assumption that we want to make. Nothing wrong so far. Let's now do a mathematical operation on this equation.
What we want to do is get the right hand side to just be four. This means that we need to multiply it by itself to get four. Obviously the square root of four multiplied by the square root of four is four - because that's where it came from. Let's skip the not equals sign stuff this time around, you get the idea.
\[\frac{a^2}{b^2}=4\]
And again, we know that we can multiply both sides by \(b^2\) to get:
\[a^2=4\cdot b^2\]
Now at this point can we say that \(a\) is an even number? Yes, we can run through all of our odds and evens arguments and still say that, because four is just two multiplied by two, so the left hand side is still some other number on the right hand side multiplied by two. So that gives us:
\[(2\cdot c)^2=4\cdot b^2\]
And we can square out contents of the brackets on the left hand side:
\[2\cdot 2\cdot c\cdot c=4\cdot b^2\]
\[2\cdot 2\cdot c^2=4\cdot b^2\]
\[4\cdot c^2=4\cdot b^2\]
OK. Last time when hunting for the square root of two we had this:
\[4\cdot c^2=2\cdot b^2\]
What is the difference here? The right hand side is multiplied by the SAME NUMBER as the left hand side - four. What can we gather from this? Well we can divide both sides by four to get this:
\[c^2 = b^2\]
And we can square root each side to get this:
\[c = b\]
So we now know that \(c\) is the same as \(b\). We also know that \(a\) is the same as \(2\cdot c\). So we can now convert both \(a\) and \(b\) into their equivalents of \(c\) and stick those back in the very first equation:
\[\frac{2c}{c}=\sqrt{4}\]
And from our arguments last time we also know that is the same as:
\[2\cdot \frac{c}{c}=\sqrt{4}\]
\[2\cdot 1=\sqrt{4}\]
\[2=\sqrt{4}\]
So we have established that two is the square root of four. Which it is. So our assumption this time, that the square root of four can be written as one number divided by another number IS correct. In fact we know that it is always correct as long as the top number is the bottom number multiplied by two.
Monday, 30 May 2011
Irrationality of the Square Root of Two
Now we have learned a little bit about fractions and equations, we can try and satisfy ourselves that the square root of two cannot be written as a whole number divided by another whole number (a rational number). This is a small detour on the way to \(e\), but I did promise to deal with it. We should now have all the tools we need to work it out. The way we are going to do this is to simply assume that you can actually write the square root of two as one whole number divided by another, do some logic, and if something breaks then it means that our assumption was wrong. This is called proof by contradiction.
You can use proof by contradiction in your own life as well. When you wake up in the morning, and you can't remember if it is a work (or school) day or not, just assume it is the weekend, and go back to sleep. If nobody wakes you from your slumber, your assumption was correct. If your boss (or parent, or teacher), starts shouting at you to get up, your assumption was wrong, and you have to get up. This is an easy way of proving something by not doing very much, and waiting to see if it all goes tits up. It's the lazy approach to proof.
So, let's assume that the square root of two is actually a rational number. What would that look like? Well, it would be one number divided by another number. We don't know what those two numbers would be, so let's replace them with symbols in the meantime. Let's use 'a' for the top number and 'b' for the bottom number. So it would look like this:
\[\frac{a}{b}\]
Good start. Let's bring in the equals sign and the square root of two so we can see exactly what we are talking about:
\[\frac{a}{b}=\sqrt{2}\]
Excellent. Some fraction equals the square root of two. That's the assumption that we want to make. Nothing wrong so far. Let's now do a mathematical operation on this equation.
What we want to do is get the right hand side to just be two. This means that we need to multiply it by itself to get two. Obviously the square root of two multiplied by the square root of two is two - because that's where it came from. This looks like this:
\[\frac{a}{b}\neq 2\]
Notice that we have had to change the equals sign to a not equals sign. This is because we did something to the right hand side without doing the same to the left hand side. Now, we could just multiply the left hand side by \(\sqrt{2}\) as well, but that's not going to help us, because we want to get rid of the square root. So, instead lets multiply the left hand side by 'a divided by b' (because we have said that a divided by b is the same as \(\sqrt{2}\) and that's what we multiplied the right hand side by). If we do the same thing to both sides, we still get to use the equals sign. So:
\[\frac{a}{b}\cdot\frac{a}{b}=2\]
We also know what to do to multiply fractions together, so we get:
\[\frac{a\cdot a}{b\cdot b}=2\]
This is the same as:
\[\frac{a^2}{b^2}=2\]
For those last two steps, we were just rearranging the left hand side, not performing an operation on it, so we get to keep our equals sign. Now, we want to have only \(a^2\) on the left hand side. How do we achieve that? Well, we multiply the left hand side by \(b^2\). That looks like this:
\[b^2\cdot \frac{a^2}{b^2}\neq2\]
We have had to bring in the not equals sign again, so lets get the equals sign back:
\[b^2\cdot \frac{a^2}{b^2}=2\cdot b^2\]
Now we know that something times a fraction is just something times the top number of the fraction, leaving the bottom number untouched (two times one third equals two thirds). So the left hand side above is the same as:
\[\frac{b^2\cdot a^2}{b^2}=2\cdot b^2\]
It is important to note that, again, we are not actually doing anything to the left hand side just now. The number it equals stays the same. We are just rearranging the way we write the number. This means we do not lose our equals sign. Now, remember it does not matter in which order you multiply things, so \(b^2\cdot \frac{a^2}{b^2} =\frac{b^2\cdot a^2}{b^2} = \frac{a^2\cdot b^2}{b^2}=a^2\cdot\frac{b^2}{b^2}\). This all means that we can just take the \(a^2\) out on its own leaving:
\[\frac{b^2}{b^2}\cdot a^2=2\cdot b^2\]
Now what is any number divided by itself? One. So we get:
\[1\cdot a^2=2\cdot b^2\]
Which is the same as:
\[a^2=2\cdot b^2\]
Remember, it is worth mentioning again, that since multiplying both sides by \(b^2\) we have not actually changed the numbers at all - we have just rearranged the way they are written down. So in all the changes on the left hand side since we got our equals sign back again, we have not lost it. Now, what does that number above tell us? It tells us that \(a\) multiplied by itself is an even number. Why can we say that? Well, an even number is a number that can be divided by two. And look at the equation: \(a^2\) is two times some other number. So \(a^2\) divided by two IS that other number. So \(a^2\) CAN be divided by two, so \(a^2\) is even. So if \(a^2\) is even, can we draw any conclusions about \(a\)?
Let's think about this. Any even number is any number that can be divided by two. That's the same as saying that any even number is some other number (the number you get when you divide your even number by two) MULTIPLIED by two. So lets call this number that you multiply by two to get an even number \(n\). Then any even number can be written as \(2\cdot n\) or \(2n\). If we then square that even number we get \(2\cdot n\cdot 2\cdot n\). Again remember that it doesn't matter what order we multiply things in. So that expression is the same as \(2\cdot 2\cdot n^2\). So, no matter what starting number \(n\) we choose, and in fact no matter whether the square of that number is odd or even, once we get the square of it we multiply it by two and then two again. Because we multiply by two to get the final number, what this tells us is that the final number has to be divisible by two. In turn this tells us that the square of any even number can be divided by two. And therefore that the square of any even number is an even number itself.
OK. But what about the square root of an even number (which is what we are considering). Just because every even number squares to an even number, it does not necessarily follow that the square root of an even number has to be even. That's like saying that because all sheep are fluffy white things, every fluffy white thing is a sheep. Which would be baaad news for clouds. Sorry.
Let's consider the possibility that an odd number could be the square root of an even number. Every number is capable of being multiplied by two, that's simple. So once you have multiplied every number by two, you end up with a list of all the even numbers. There is a gap between each even number which is exactly one number wide. That's because your original list which you multiplied had no gaps. If you multiplied all the original numbers by three, the gap would be two numbers wide. So between every even number there is a gap of exactly one number, and that number is an odd number, because it does not appear on the list of evens, so it cannot be divided by two. So for every even number if you add one, you move into that gap and land on an odd number. So, every odd number is an even number plus one. We have already agreed that every even number is \(2n\), so every odd number is \(2n+1\).
Good show. But what happens when we square an odd number? We get \((2n+1)(2n+1)\). You remember how you get rid of brackets don't you? We went through that whole tortuitous metaphor about the greengrocer with OCD. Once we have multiplied away the brackets we get:
\[2n\cdot 2n = 2\cdot 2\cdot n\cdot n = 4\cdot n^2\]
\[2n\cdot 1 = 2n\]
\[1\cdot 2n = 2n\]
\[1\cdot 1 = 1\]
And added all together those results look like this:
\[4n^2 + 2n + 2n +1\]
The \(n\)'s are the same thing, so we can just add them together:
\[4n^2 + 4n +1\]
Now we have added up everything, we can simplify it a bit by spotting that we have two things multiplied by four, so we can stick those things in a bracket and multiply the bracket by four:
\[4(n^2 + n)+1\]
Now, what can we tell from this? Well no matter what \(n^2\) actually is, we multiply it by four, which is two multiplied by two. Remember that as long as something is multiplied by two, the result can be divided by two, meaning that the result must be even. So no matter what goes on inside the brackets, when it gets multiplied by four it becomes even. What happens then? WE ADD ONE. We have already worked out that any even number plus one is an odd number. So no matter what \(n\) we choose to give us our original odd number, the square of that odd number will be odd because it is an even number plus one.
So we have now proved that any even number squared produces an even number, and any odd number squared produces an odd number. Now, you have to take one final thing on trust, because I have no proof for it. Other than zero and one, every other integer is either odd or even. There is no third type. And remember that because we are talking about the square root of two being one whole number divided by another whole number, all we care about are whole numbers.
So what does this tell us about \(a\)? Well we know that \(a^2\) is even (because it is some other number multiplied by two so it has to be divisible by two). If \(a^2\) is even can \(a\) be odd? No, because we just proved that any odd number squared is also an odd number. Can it be zero? No, because then the left hand side of the equation would be zero immediately, and the square root of two is not zero. Can it be one? No, because remember we are dealing with two whole numbers and 1 is not two times another whole number, one is two times a half. So if \(a\) is not odd, is not zero, is not one, it can only be even (because I have asked you to take as a given that there is no other option).
So if \(a\) is even, it is divisible by two, meaning that there is some other number that, if multiplied by two, gives \(a\). Lets call this other number \(c\). Important point, \(c\) is half of \(a\) so is smaller than \(a\). So we can now rewrite our equation by replacing a with two multiplied by \(c\). Remember the equation is:
\[a^2=2\cdot b^2\]
Replacing \(a\) for \(2\cdot c\) gives us:
\[(2\cdot c)^2=2\cdot b^2\]
Or:
\[2\cdot 2\cdot c\cdot c=2\cdot b^2\]
\[2\cdot 2\cdot c^2=2\cdot b^2\]
\[4\cdot c^2=2\cdot b^2\]
Notice that we have a two on the right hand side of the formula. We can divide that side by two to get rid of the two, as long as we divide the left hand side by two as well. If we do so, we get:
\[2\cdot c^2=b^2\]
Reverse the two sides and we get:
\[b^2=2\cdot c^2\]
What is the actual practical difference between that statement and the one we had before the substitution:
\[a^2=2\cdot b^2\]
The only difference is that we are dealing now with \(b\) and \(c\). We can still follow exactly the same logical steps with these two symbols as we did with \(a\) and \(b\). What will we end up with?
\[c^2=2\cdot d^2\]
with \(d\) equal to one half of \(b\). We could then go back to the beginning and end up with \(e\) and \(f\) with \(f\) half of \(d\) which is half of \(b\).
How long can we keep on doing this? How long can we keep running through this series of steps, getting new symbols each time? You may say, until we get to \(z\), but then we could move on to Greek letters, or hieroglyphs, or any other symbols you care to imagine, like pictures of clouds or puppies. Trust me we have plenty of symbols. The answer in maths in that once you have done something once, you can always do it again and again. I can add one to two to get three five hundred million times, and on the five hundred millionth and first time it is not going to suddenly be four. So we HAVE to be able to keep halving our variables each we run through, progressively getting smaller and smaller numbers.
But can we actually do that? Can we keep taking our original numbers and cut them in half forever and ever and never end up with a number less than one? Try it. Go on. Pick a number, any number. Cut it in half. Cut it in half again, and again, and do it forever. It will eventually get to a number that when you cut it in half it does not produce a whole number - the very last number, the finish line if you will, is the number one. If you hit that, you cut it in half and are left with a half.
(You may say, if you are being a smart arse, "A ha! I picked infinity, and I can keep cutting that in half forever." Tough. You can't do that. For a start it isn't really a number, but a concept. And secondly, you would need to have infinity on both the top AND bottom of the fraction. And what is any number divided by itself? One. And one multiplied by one is one, not two.)
So, you cannot keep reducing these starting numbers forever and ever, because you will eventually cut one into non-whole number sized pieces. But our original assumption, that the square root of two can be written as one whole number over another, says that we have to be able to just that. What is our conclusion? Our conclusion is that something has gone tits up, and broken. The office has phoned, and it's a work day, not the weekend. Our original assumption was false. Hence, the square root of two cannot be written as one whole number divided by another.
You can use proof by contradiction in your own life as well. When you wake up in the morning, and you can't remember if it is a work (or school) day or not, just assume it is the weekend, and go back to sleep. If nobody wakes you from your slumber, your assumption was correct. If your boss (or parent, or teacher), starts shouting at you to get up, your assumption was wrong, and you have to get up. This is an easy way of proving something by not doing very much, and waiting to see if it all goes tits up. It's the lazy approach to proof.
So, let's assume that the square root of two is actually a rational number. What would that look like? Well, it would be one number divided by another number. We don't know what those two numbers would be, so let's replace them with symbols in the meantime. Let's use 'a' for the top number and 'b' for the bottom number. So it would look like this:
\[\frac{a}{b}\]
Good start. Let's bring in the equals sign and the square root of two so we can see exactly what we are talking about:
\[\frac{a}{b}=\sqrt{2}\]
Excellent. Some fraction equals the square root of two. That's the assumption that we want to make. Nothing wrong so far. Let's now do a mathematical operation on this equation.
What we want to do is get the right hand side to just be two. This means that we need to multiply it by itself to get two. Obviously the square root of two multiplied by the square root of two is two - because that's where it came from. This looks like this:
\[\frac{a}{b}\neq 2\]
Notice that we have had to change the equals sign to a not equals sign. This is because we did something to the right hand side without doing the same to the left hand side. Now, we could just multiply the left hand side by \(\sqrt{2}\) as well, but that's not going to help us, because we want to get rid of the square root. So, instead lets multiply the left hand side by 'a divided by b' (because we have said that a divided by b is the same as \(\sqrt{2}\) and that's what we multiplied the right hand side by). If we do the same thing to both sides, we still get to use the equals sign. So:
\[\frac{a}{b}\cdot\frac{a}{b}=2\]
We also know what to do to multiply fractions together, so we get:
\[\frac{a\cdot a}{b\cdot b}=2\]
This is the same as:
\[\frac{a^2}{b^2}=2\]
For those last two steps, we were just rearranging the left hand side, not performing an operation on it, so we get to keep our equals sign. Now, we want to have only \(a^2\) on the left hand side. How do we achieve that? Well, we multiply the left hand side by \(b^2\). That looks like this:
\[b^2\cdot \frac{a^2}{b^2}\neq2\]
We have had to bring in the not equals sign again, so lets get the equals sign back:
\[b^2\cdot \frac{a^2}{b^2}=2\cdot b^2\]
Now we know that something times a fraction is just something times the top number of the fraction, leaving the bottom number untouched (two times one third equals two thirds). So the left hand side above is the same as:
\[\frac{b^2\cdot a^2}{b^2}=2\cdot b^2\]
It is important to note that, again, we are not actually doing anything to the left hand side just now. The number it equals stays the same. We are just rearranging the way we write the number. This means we do not lose our equals sign. Now, remember it does not matter in which order you multiply things, so \(b^2\cdot \frac{a^2}{b^2} =\frac{b^2\cdot a^2}{b^2} = \frac{a^2\cdot b^2}{b^2}=a^2\cdot\frac{b^2}{b^2}\). This all means that we can just take the \(a^2\) out on its own leaving:
\[\frac{b^2}{b^2}\cdot a^2=2\cdot b^2\]
Now what is any number divided by itself? One. So we get:
\[1\cdot a^2=2\cdot b^2\]
Which is the same as:
\[a^2=2\cdot b^2\]
Remember, it is worth mentioning again, that since multiplying both sides by \(b^2\) we have not actually changed the numbers at all - we have just rearranged the way they are written down. So in all the changes on the left hand side since we got our equals sign back again, we have not lost it. Now, what does that number above tell us? It tells us that \(a\) multiplied by itself is an even number. Why can we say that? Well, an even number is a number that can be divided by two. And look at the equation: \(a^2\) is two times some other number. So \(a^2\) divided by two IS that other number. So \(a^2\) CAN be divided by two, so \(a^2\) is even. So if \(a^2\) is even, can we draw any conclusions about \(a\)?
Let's think about this. Any even number is any number that can be divided by two. That's the same as saying that any even number is some other number (the number you get when you divide your even number by two) MULTIPLIED by two. So lets call this number that you multiply by two to get an even number \(n\). Then any even number can be written as \(2\cdot n\) or \(2n\). If we then square that even number we get \(2\cdot n\cdot 2\cdot n\). Again remember that it doesn't matter what order we multiply things in. So that expression is the same as \(2\cdot 2\cdot n^2\). So, no matter what starting number \(n\) we choose, and in fact no matter whether the square of that number is odd or even, once we get the square of it we multiply it by two and then two again. Because we multiply by two to get the final number, what this tells us is that the final number has to be divisible by two. In turn this tells us that the square of any even number can be divided by two. And therefore that the square of any even number is an even number itself.
OK. But what about the square root of an even number (which is what we are considering). Just because every even number squares to an even number, it does not necessarily follow that the square root of an even number has to be even. That's like saying that because all sheep are fluffy white things, every fluffy white thing is a sheep. Which would be baaad news for clouds. Sorry.
Let's consider the possibility that an odd number could be the square root of an even number. Every number is capable of being multiplied by two, that's simple. So once you have multiplied every number by two, you end up with a list of all the even numbers. There is a gap between each even number which is exactly one number wide. That's because your original list which you multiplied had no gaps. If you multiplied all the original numbers by three, the gap would be two numbers wide. So between every even number there is a gap of exactly one number, and that number is an odd number, because it does not appear on the list of evens, so it cannot be divided by two. So for every even number if you add one, you move into that gap and land on an odd number. So, every odd number is an even number plus one. We have already agreed that every even number is \(2n\), so every odd number is \(2n+1\).
Good show. But what happens when we square an odd number? We get \((2n+1)(2n+1)\). You remember how you get rid of brackets don't you? We went through that whole tortuitous metaphor about the greengrocer with OCD. Once we have multiplied away the brackets we get:
\[2n\cdot 2n = 2\cdot 2\cdot n\cdot n = 4\cdot n^2\]
\[2n\cdot 1 = 2n\]
\[1\cdot 2n = 2n\]
\[1\cdot 1 = 1\]
And added all together those results look like this:
\[4n^2 + 2n + 2n +1\]
The \(n\)'s are the same thing, so we can just add them together:
\[4n^2 + 4n +1\]
Now we have added up everything, we can simplify it a bit by spotting that we have two things multiplied by four, so we can stick those things in a bracket and multiply the bracket by four:
\[4(n^2 + n)+1\]
Now, what can we tell from this? Well no matter what \(n^2\) actually is, we multiply it by four, which is two multiplied by two. Remember that as long as something is multiplied by two, the result can be divided by two, meaning that the result must be even. So no matter what goes on inside the brackets, when it gets multiplied by four it becomes even. What happens then? WE ADD ONE. We have already worked out that any even number plus one is an odd number. So no matter what \(n\) we choose to give us our original odd number, the square of that odd number will be odd because it is an even number plus one.
So we have now proved that any even number squared produces an even number, and any odd number squared produces an odd number. Now, you have to take one final thing on trust, because I have no proof for it. Other than zero and one, every other integer is either odd or even. There is no third type. And remember that because we are talking about the square root of two being one whole number divided by another whole number, all we care about are whole numbers.
So what does this tell us about \(a\)? Well we know that \(a^2\) is even (because it is some other number multiplied by two so it has to be divisible by two). If \(a^2\) is even can \(a\) be odd? No, because we just proved that any odd number squared is also an odd number. Can it be zero? No, because then the left hand side of the equation would be zero immediately, and the square root of two is not zero. Can it be one? No, because remember we are dealing with two whole numbers and 1 is not two times another whole number, one is two times a half. So if \(a\) is not odd, is not zero, is not one, it can only be even (because I have asked you to take as a given that there is no other option).
So if \(a\) is even, it is divisible by two, meaning that there is some other number that, if multiplied by two, gives \(a\). Lets call this other number \(c\). Important point, \(c\) is half of \(a\) so is smaller than \(a\). So we can now rewrite our equation by replacing a with two multiplied by \(c\). Remember the equation is:
\[a^2=2\cdot b^2\]
Replacing \(a\) for \(2\cdot c\) gives us:
\[(2\cdot c)^2=2\cdot b^2\]
Or:
\[2\cdot 2\cdot c\cdot c=2\cdot b^2\]
\[2\cdot 2\cdot c^2=2\cdot b^2\]
\[4\cdot c^2=2\cdot b^2\]
Notice that we have a two on the right hand side of the formula. We can divide that side by two to get rid of the two, as long as we divide the left hand side by two as well. If we do so, we get:
\[2\cdot c^2=b^2\]
Reverse the two sides and we get:
\[b^2=2\cdot c^2\]
What is the actual practical difference between that statement and the one we had before the substitution:
\[a^2=2\cdot b^2\]
The only difference is that we are dealing now with \(b\) and \(c\). We can still follow exactly the same logical steps with these two symbols as we did with \(a\) and \(b\). What will we end up with?
\[c^2=2\cdot d^2\]
with \(d\) equal to one half of \(b\). We could then go back to the beginning and end up with \(e\) and \(f\) with \(f\) half of \(d\) which is half of \(b\).
How long can we keep on doing this? How long can we keep running through this series of steps, getting new symbols each time? You may say, until we get to \(z\), but then we could move on to Greek letters, or hieroglyphs, or any other symbols you care to imagine, like pictures of clouds or puppies. Trust me we have plenty of symbols. The answer in maths in that once you have done something once, you can always do it again and again. I can add one to two to get three five hundred million times, and on the five hundred millionth and first time it is not going to suddenly be four. So we HAVE to be able to keep halving our variables each we run through, progressively getting smaller and smaller numbers.
But can we actually do that? Can we keep taking our original numbers and cut them in half forever and ever and never end up with a number less than one? Try it. Go on. Pick a number, any number. Cut it in half. Cut it in half again, and again, and do it forever. It will eventually get to a number that when you cut it in half it does not produce a whole number - the very last number, the finish line if you will, is the number one. If you hit that, you cut it in half and are left with a half.
(You may say, if you are being a smart arse, "A ha! I picked infinity, and I can keep cutting that in half forever." Tough. You can't do that. For a start it isn't really a number, but a concept. And secondly, you would need to have infinity on both the top AND bottom of the fraction. And what is any number divided by itself? One. And one multiplied by one is one, not two.)
So, you cannot keep reducing these starting numbers forever and ever, because you will eventually cut one into non-whole number sized pieces. But our original assumption, that the square root of two can be written as one whole number over another, says that we have to be able to just that. What is our conclusion? Our conclusion is that something has gone tits up, and broken. The office has phoned, and it's a work day, not the weekend. Our original assumption was false. Hence, the square root of two cannot be written as one whole number divided by another.
Subscribe to:
Posts (Atom)


















