Monday, 22 August 2011

Real or Imaginary Part 4

Last time we managed to graph the function \(f(x)=\frac{1}{1-x^2}\). First we calculated some values for the function around zero in intervals of a quarter. Then we drew a line and marked off these intervals to scale and then drew circles above each interval at a point that was to scale with the value of the function when we used that particular interval as the input to the function.

Now we are going to try that with the other function that we created. This is the other one that is exactly equal to the result of an infinite sum, but lets give it a different name to avoid confusion: \(g(x)=\frac{1}{1+x^2}\). The first job is to work out the values of the function at the same intervals as before, to get a rough idea about how this function behaves.

\[g(0)=1\]
\[g(\tfrac{1}{4})=\frac{16}{17}\]
\[g(\tfrac{1}{2})=\frac{4}{5}\]
\[g(\tfrac{3}{4})=\frac{16}{25}\]
\[g(1)=\frac{1}{2}\]

Hey look! This time the function is perfectly calculable at one. No breaking. What about a quarter more than one?

\[g(\tfrac{5}{4})=\frac{16}{41}\]
OK, so it is still going then. Let's do one more just to check.
\[g(\tfrac{3}{2})=\frac{4}{13}\]
Yep, still going strong, and it seems to be getting smaller and smaller. What about negative numbers as inputs to the function? Well again the only variable that we plug into this function is immediately squared, so it matters not a jot whether or not the input is positive or negative, the square is always going to be positive. So the function should be symmetrical around zero, because there is no difference in the output between a positive or negative input.

So let's set up the same graph as we did last time. This time we have calculated the values of the function at up to one and a half. We'll stop there for now, and make our line stretch from minus one and a half to plus one and a half. That makes our line look like this:


Now we have our line, lets mark off, using circles, the values of the function that we worked out above - and their negative mirrors which we know have the same value.


Those plotted points look very different to the set of points for the other function, don't they? Instead of a smiley face it is a moustache. There is a hump in the middle at \(x\) equal to zero and then the ends just seem to tail off. Let's fill in the gaps in-between our plotted values by getting the computer to calculate and draw the hundreds of points needed to form what looks like a line:


As we thought the line that appears bulges in the middle and then tails off at either end towards zero. Notice that it does not go nuts at plus and minus one by heading off to infinity, it just smoothly sails through those values.

As with the other function, we can construct estimates of our function from the first so many terms of the infinite sum. These should get closer and closer to our function just like when we first tested to see if we could get to \(\tfrac{4}{3})\) by adding up terms of the sum. Remember we saw that the more terms we added onto the infinite sum, the closer the total did indeed get to the answer we got from our function. We can do that again, this time starting by graphing the function \(g(x)=1-x^2\). That looks like this:


OK, that looks a bit different to our last one as well. Why? Well look what we do with our \(x^2\). We subtract it instead of adding it. That is why the line in this one disappears off below our number line instead of heading off to the top. You can see, as it was last time, that around the zero value the function we just drew is a pretty good fit but it all goes to hell shortly afterwards. Ok, let's add \(x^4\) onto our function and see where that takes us (in cyan):


Bloody hell, what's happened here then? Well the plus \(x^4\) drowns out the other parts of the function, so this time it stays positive. Again it looks like it is trying to match the real function around the zero point but then it heads off at high speed up the way. Lets now subtract the next term which is \(x^6\). We'll draw resulting line in green:


That is starting to look distinctly odd. The green one seems to flatten out along the real line and then it spears off down the way. Like adding the previous term, the subtraction of the sixth power of \(x\) is now dominating, so the function is only very briefly positive. Also, can you see that the lines at either end head down the way at a much more pronounced angle than the blue line? OK, lets add \(x^8\) to the mix to see what happens. We'll do this one in red:


It looks much like we have come to expect. Very similar to the \(x^4\) addition, but with the ends tilted in much more - like the previous one where we subtracted \(x^3\). What is going on with these line ends? They are acting much like the estimate lines in the previous function when they were getting closer and closer to the real line that went off to infinity. But HERE the real line doesn't go off to infinity at all. Just to make what seems to be happening clearer, I'll graph the functions that would result if we worked out all the terms to our sum up to subtracting \(x^{18}\) in green, and up to adding \(x^{20}\) in red. We'll take the other functions we've drawn out, apart from the real one, so we can see what is going on:


That's pretty clear. The more and more powers of \(x\) that you add on to the sum, the faster and more dramatically they head off to positive and negative infinity. And look where they are doing it! Right at plus and minus one. But why is this? The real function that short cuts to the answer is nice and smooth at plus and minus one. In fact it is nice and smooth all along the graph. Why on earth does the shortcut to the answer stay normal at plus and minus one, but the actual totals of the infinite sum go daft at plus and minus one?

The answer is that the number \(x\) that we plug into the function to give us our graph is, like every number, made up of a real and an imaginary part. What we are seeing at plus and minus one on that graph above, is the effect of the imaginary part of \(x\) sending the function off to infinity. I thought in school that imaginary numbers were just tacked onto real numbers to answer questions like what is the square root of minus one. In other words, that they were an artificial invention of mathematicians. But here you have no square roots of negative numbers at all. You just have plus and minus various powers of \(x\). Nevertheless though, the imaginary part of \(x\) is making itself known by sending the totals of the sums closer and closer to infinity at plus and minus one. So imaginary numbers are not imaginary at all - they exist and have an effect even when we don't invoke them, or expect them, at all.

Why does this happen? Well, very basically, remember that each number has a real and imaginary part. With the function \(f(x)=\frac{1}{1-x^2}\) when the REAL part of \(x\) is plus or minus the square root of one (i.e. either positive or negative one), you square it, getting one, which you then subtract from one getting zero on the bottom of the equation which breaks it. With \(g(x)=\frac{1}{1+x^2}\), when the IMAGINARY part of \(x\) is plus or minus the square root of minus one (i.e. plus or minus \(i\)) you then square the square root of minus one getting ... minus one, you cretin. When you add minus one to one and you get ... zero on the bottom of the equation which breaks it just as badly as when the REAL part of \(x\) is zero.

But hang on I hear you cry, the function goes nuts around the REAL numbers plus and minus one. As I was at pains to say this number line is for real numbers only. It does not show imaginary numbers. If the imaginary part of a number is responsible for sending the function off to infinity, then the whole number must square to negative one. If it does so then its real part must be zero. In other words why doesn't the function go daft at the real value zero?

The answer involves the absolute value of numbers and something called the circle of convergence. Which sounds like it should be drawn on a dusty basement floor in pigs blood and surrounded by hooded figures illuminated by large dribbly white candles. Both of these concepts will require pictures. More of which next time.

Monday, 15 August 2011

Real or Imaginary Part 3

Last time we took two infinitely long sums and we worked out general equations which allow us to jump straight to the answer without having to add up an infintely large amount of individual terms. We have expressed our series as a list of \(x\) variables to various powers, and unsurprisingly our formulas are also in terms of the \(x\) variable. Because we are working with formulas we can now call them functions which will be \(f(x)\) and \(g(x)\). This is because there is only one variable in the formula - the \(x\) bit.

Remember that an infinite sum can either add up to some specific number, or it can go nuts and head off to infinity. Now that we have these to functions, if you want to know what will happen with a specific infinite sum is to pick a number, any number, stick it in the function in place of the \(x\). The output of the function will tell you whether or not the infinite sum for that number adds up to any specific number, or disappears off to infinity. When I say "pick a number" this would be the number that would appear in place of the half in the brackets in this description of the sum:

\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\]

What we are interested in, for the purpose of thinking about imaginary numbers, is at what point the infinite sums we are looking at go from a finite to an infinite answer. When I say "what point" I really mean which numbers when plugged in in place of \(x\) give infinite answers and which give finite answers. What we could do to find this out is write down a list of the numbers we are interested in and, next to them, the output from the function we calculated last time. We could then consider the answers. We've already worked out \(f(x)=\frac{1}{1-x^2}\) is four thirds, so let's try numbers around a half to start with.

\[f(0)=1\]
\[f(\tfrac{1}{4})=\tfrac{16}{15}\]
\[f(\tfrac{1}{2})=\tfrac{4}{3}\]
\[f(\tfrac{3}{4})=\tfrac{16}{7}\]
\[f(1)=\]
Oh dear, it is broken. We cannot divide by zero, which is what one minus one squared is. We could consider this to be an infinite answer. And because we square the \(x\) component, we know that whether the \(x\) starts as positive or negative it will square to the same number. In other words we know that the result for \(f(-\tfrac{1}{4})\) is still going to be \(\tfrac{16}{15}\)

That all looks a bit boring though, and it hardly gives us a feeling for what is actually happening with the output of the function as the numbers that we put into it change. Lets make things a bit more dramatic by making them graphic! How do we do that then? Lets draw a line just like when we were making our number line:


Now lets mark the centre of the line as zero:


Now let's mark off the other values for which we have just calculated the function along the line which passes through zero, using the left of zero as negative numbers and the right of zero as positive numbers. Lets make these all proportionate, so the distance between a half and one is the same as negative three quarters and negative one quarter. In other words lets mark these off to scale:


Note that this is just a one dimensional line. It does not have an imaginary vertical axis like our number plain. Any dots that appear above the number line are NOT imaginary numbers. Instead we will mark off the \(f(x)\) values for each of the values on the number line. We will do so by just placing a dot the same distance above the line that the value turned out to be. So for instance, if you stuck a half into the function the output was four thirds. So our dot will be four thirds of a unit above the line. A "unit" here is just the distance from zero to one on the line. This is just going to be a simple graph to give us a visual idea of how the output of the function behaves depending on changes to the input. Let's start with \(f(\tfrac{1}{2})\):


See the dot? That represents our value for \(f(\tfrac{1}{2})\). It is four thirds of a unit directly above the marker for a half along the line. Lets fill in dots for all the other values that we know about:


Hey! We got a smiley face! Can we see what is happening now though? The dots start off high (technically infinite at negative one) and get lower as they get closer to zero. Then they start getting higher again. Of course we have only marked off seven values. Those seven values fall on an invisible line that would appear if we calculated ALL the infinitely many \(f(x)\)'s between negative one and one. We can still draw that line though, by telling the computer to calculate hundreds of different \(f(x)\)'s. We are still drawing dots, but now we are drawing so many that it will just look like a line. That line looks like this:


The black lines at the sides are just the computers way of trying to draw infinity. It just draws that as a line going directly up and down. But, do you see the rest of the curved line going through all the dots that we plotted? That line is called the plot of the function \(f(x)=\frac{1}{1-x^2}\). This gives you a much better idea of what is going on. As we calculate values closer and closer to plus and minus one, the function just takes off towards infinity. To give an example of this, lets calculate two more values of \(x\) - between the two extremes on the outside (plus and minus three quarters) and plus and minus one. If we make them mid point between those, we will end up with plus and minus seven eighths. Which is fine.

What we should see is plus and minus one divided by one minus seven eighths squared. Seven eighths squared is seven times seven (forty nine) divided by eight times eight (sixty four). Take that away from one and you get fifteen sixty fourths. One divided by fifteen sixty fourths is the same as sixty four fifteenths. So the answer at plus and minus seven eighths is sixty four fifteenths. That looks like:


The image is now much taller, to fit in the dots getting higher and higher. See how the gap between three quarters and seven eighths is much bigger than all the other gaps. I also had to make the text at the bottom a bit smaller so it would all fit in.

Just in case we are getting too far away from where we started, lets remember that the right most dot in that picture represents the total that you get if you add up:

\[1+(\tfrac{7}{8})^2+(\tfrac{7}{8})^4+(\tfrac{7}{8})^6+(\tfrac{7}{8})^8+\ldots\]

What we can also do is draw a plot on the graph that represents the first so many terms of the infinite sum. Think back to when we were first checking that we had successfully turned an infinite sum into a function. Remember the bit where we added up the first few terms of the infinite sum by working out what they were:

\[1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}=\frac{64+16+4+1}{64}=\tfrac{85}{64}\]

And then we asked if they were getting close to our prediction of \(\tfrac{4}{3}\). So we asked what \(\tfrac{4}{3}\) was in sixty-fourths. We chose sixty-fourths because they were the smallest fraction that we had reached so far in the infinite sum. We got the answer: \(\frac{85\tfrac{1}{3}}{64}\), so we confirmed that we were moving towards \(\tfrac{4}{3}\) as we added more terms to the infinite sum.

We can now do that using the graph, by plotting functions that gradually have more and more terms of the infinite sum in them, to see if we get close to the prediction. Last time we were doing it with individual numbers, this time it is whole functions. To start, we plot the function \(f(x)=1+x^2\). That looks like this:


I have drawn it in blue so it stands out. As you can see it is really close to the proper curve down by zero, but it gets less accurate quickly, the further you move out. What about adding another term in a different colour? Lets do \(f(x)=1+x^2+x^4\) in Cyan:


As we may have expected the line gets close again to the true total of the infinite sum. Lets add two more powers of \(x\): \(f(x)=1+x^2+x^4+x^6\) and \(f(x)=1+x^2+x^4+x^6+x^8\) in green and red respectively:


Again, much as we expected, the lines are getting progressively closer to the "true" line.

So what does this tell us? Well, the functions we are generating by adding more powers of \(x\) are getting closer and closer to infinity at plus and minus one. We know why. It is because the function for working out the actual answer to the infinite sum goes off to infinity at that very point. This is because you end up dividing by zero at plus and minus one. Because the "true" function goes to infinity, then all our estimates of that function get closer and closer to infinity at that point. All we are doing each time we add a new power of \(x\) to the estimate term is getting one step closer to the real answer, which is demonstrated by the real line.

So what does this have to do with imaginary numbers? To find out we will have to look at what happens when we try to graph our OTHER function: \(g(x)=\frac{1}{1+x^2}\)

Monday, 8 August 2011

Real or Imaginary Part 2

OK, last time we looked at these two formulas:
\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\]
and
\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\cdot-1^n\]
We worked out that the first one adds up to \(\tfrac{4}{3}\) and the second one \(\tfrac{4}{5}\).

Now lets replace the \(\tfrac{1}{2}\) in each one with \(x\). This makes both sums:
\[\sum_{n=0}^\infty x^{2n}\]
and
\[\sum_{n=0}^\infty x^{2n}\cdot-1^n\]
When we do the expansion they are going to look like this:
\[1+x^2+x^4+x^6+\ldots\]
and
\[1-x^2+x^4-x^6+\ldots\]
We can then set both sides equal to a variable. Best give them slightly different names so we do not get too confused doing this simultaneously. I think we can also dispense with the "ands".
\[S_a=1+x^2+x^4+x^6+\ldots\]
\[S_b=1-x^2+x^4-x^6+\ldots\]
OK. Now multiply both sides of the equation by \(x^2\). Hang on though - didn't we divide by four last time? Well, yes, but dividing by four is the same as multiplying by \(\tfrac{1}{4}\) and \(\tfrac{1}{2}^2=\tfrac{1}{4}\), so this step is actually the same as we did last time. It gives us:
\[x^2\cdot S_a=x^2\cdot (1+x^2+x^4+x^6+\ldots)\]
\[x^2\cdot S_b=x^2\cdot (1-x^2+x^4-x^6+\ldots)\]
If we then multiply out the right hand side we get:
\[x^2\cdot S_a=x^2+x^4+x^6+x^8+\ldots\]
and
\[x^2\cdot S_b=x^2-x^4+x^6-x^8+\ldots\]
Now we have defined our long series of fractions we can substitute into \(S_a\) and \(S_b\) above.
\[S_a=1+x^2\cdot S_a\]
\[S_b=1-x^2\cdot S_b\]
We then subtract, or as the case may be add the \(x^2\) multiple of \(S_{a/b}\) to both sides:
\[S_a-x^2\cdot S_a=1\]
\[S_b+x^2\cdot S_b=1\]
We then look at the left hand side of the equation and we spot that the \(S\) term appears twice. We can actually reform the left hand side by working out what we need to multiply by the \(S\) term. Here it looks like this:
\[S_a(1-x^2)=1\]
\[S_b(1+x^2)=1\]
We then divide both sides by the expression in the brackets. (Look carefully and if you multiply the stuff in brackets by the \(S\) term, you get the same left hand side as we had in the last step.
\[S_a=\frac{1}{1-x^2}\]
\[S_b=\frac{1}{1+x^2}\]
What we have now achieved are two functions of \(x\). You can see this because only the right hand side has an \(x\) in it. We have named these things already, but now they are functions, lets give them proper names:
\[f(x)=\frac{1}{1-x^2}\]
\[g(x)=\frac{1}{1+x^2}\]
OK. Lets check that we have done this right by sticking in \(\tfrac{1}{2}\) for \(x^2\) in each equation and seeing if we get the same results as last time:
\[f(\tfrac{1}{2})=\frac{1}{1-\tfrac{1}{2}^2}\]
\[g(\tfrac{1}{2})=\frac{1}{1+\tfrac{1}{2}^2}\]
Then:
\[f(\tfrac{1}{2})=\frac{1}{1-\tfrac{1}{4}}\]
\[g(\tfrac{1}{2})=\frac{1}{1+\tfrac{1}{4}}\]
Then:
\[f(\tfrac{1}{2})=\frac{1}{\tfrac{3}{4}}\]
\[g(\tfrac{1}{2})=\frac{1}{\tfrac{5}{4}}\]
And remember that dividing by a number is the same as multiplying by the reciprocal:
\[f(\tfrac{1}{2})=1\cdot \tfrac{4}{3}\]
\[g(\tfrac{1}{2})=1\cdot \tfrac{4}{5}\]
And finally:
\[f(\tfrac{1}{2})=\tfrac{4}{3}\]
\[g(\tfrac{1}{2})=\tfrac{4}{5}\]
Which is exactly what we worked out last time. So our formulas work just fine. Now that we have a formula for working out the solution to the infinite sum based on one variable, we can make a graph of that function and it will show us at what point our infinite sum goes from a sensible proper answer to an infinite answer. That fun will have to wait for next time. For now, lets sum up (haha) what we have established so far:
\[\sum_{n=0}^\infty x^{2n}=\frac{1}{1-x^2}=f(x)\]
and
\[\sum_{n=0}^\infty x^{2n}\cdot-1^n=\frac{1}{1+x^2}=g(x)\]

Monday, 1 August 2011

Real or Imaginary Part 1

OK, so we just made up a number \(i\) which if you multiplied it by itself you get negative one. That sounds like the laziest way of solving the problem of the square root of negative one - just make shit up. Does it actually exist (if any number can be said to exist)? let's see if I can convince you it does.

First of all remember our infinite sums. We have decided that some of them add up to infinity, and others add up to a finite number, like two. I want to consider two more infinite sums. Lets look at these:
\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\]
and
\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\cdot-1^n\]
Right. Those look a bit odd. First of all they do not have \(x\) in them, it has been replaced with \(n\). Why? Well, we'll come back to that. I want to do a general version of these two in due course, where I will replace \(\tfrac{1}{2}\) with \(x\), so I don't want to confuse things by having \(x\) appear now.

So what do these look like expanded out? Lets work through the first one. For \(n\) equal to zero, we get one, because the exponent is two times zero, which is zero and everything to the power of zero is one. So we have:
\[1+\ldots\]
Good. Now lets go to \(n\) as one. Now we have two times one as the exponent, which is just two. So we need to square a half. Half of a half is a quarter. So we are now up to:
\[1+\tfrac{1}{4}+\ldots\]
Great. OK, with \(n\) as two, we are going to have the exponent equal to two times two, or four. This means that we need to do a half of a half of a half of a half, or a sixteenth.
\[1+\tfrac{1}{4}+\tfrac{1}{16}+\ldots\]
Fantastic. Lets do one more with \(n\) equal to three. We get an exponent equal to six, and I will just tell you that a half to the power of six is a sixty-fourth.
\[1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}+\ldots\]
This looks quite like our previous infinite sum, in that the amounts added are getting smaller very quickly. In fact each term is a quarter of the last term. We can work out what number this is going to approach. We do so in the same way as before. Lets pick a name for the series \(S\):
\[S=1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}+\ldots\]
Now let us divide both sides of the equation by four:
\[\frac{S}{4}=\frac{1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}+\ldots}{4}\]
Again, we can just divide each term on top of the large fraction by four. Just like we saw before what will happen is that the one drops off the end and all the rest of the infinite terms march one place to the left. But an infinitely long list of numbers less one is still an infinitely long list of numbers.
\[\frac{S}{4}=\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}+\tfrac{1}{256}+\ldots\]
Again we can spot that this term \(\frac{S}{4}\) is what we add to one to get \(S\) above. I mean, you look up to the first place where we say what \(S\) is. \(S\) is one plus a whole long list of fractions. If you compare that long list of fractions to the list that we now know is equal to \(\frac{S}{4}\), you should see that they are identical. So we can just replace the long list of fractions with \(\frac{S}{4}\), which tidies things up dramatically.
\[S=1+\frac{S}{4}\]
If that is the case then to get rid of the fraction we can just multiply both sides by four:
\[4\cdot S=4\cdot(1+\frac{S}{4})\]
\[4S=4+S\]
We can then subtract an \(S\) from both sides.
\[3S=4\]
Finally we can divide both sides by three to find out what \(S\) actually is:
\[S=\tfrac{4}{3}\]
Does this make sense? Lets look at the results of adding up the terms that we worked out above:
\[1=1\]
\[1+\tfrac{1}{4}=\frac{4+1}{4}=\tfrac{5}{4}\]
\[1+\tfrac{1}{4}+\tfrac{1}{16}=\frac{16+4+1}{16}=\tfrac{21}{16}\]
\[1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}=\frac{64+16+4+1}{64}=\tfrac{85}{64}\]
What number are those results moving towards? Well let me put it this way. What is \(\tfrac{4}{3}\) in sixty-fourths?
\[\frac{85\tfrac{1}{3}}{64}\]
So, yes we are moving towards \(\tfrac{4}{3}\) as we add more terms. OK, so let's look at the second infinite sum I put up there.
\[\sum_{n=0}^\infty (\tfrac{1}{2})^{2n}\cdot-1^n\]
The only difference is that it multiplies each term by \(-1^n\). What effect does that have on proceedings? Well, remember that the zeroth term (where \(n=0\)) will be multiplied by \(-1^0\) and ANYTHING raised to the power of zero is one. So the term is multiplied by one, so remains the same. But what happens when \(n=1\)? Well negative one to the power one is just negative one. So whatever was our next term will be multiplied by negative one. That means we are going to have to subtract it instead of adding it. The next term will be multiplied by negative one squared, which is one (as we saw before), so it stays the same. The next term will be multiplied by negative one cubed. What will that be? Well, one way to think about it is negative one squared multiplied by negative one. We know what negative one squared is - it is just one. One multiplied by negative one is negative one. So we will end up subtracting this term instead of adding it.

Can you see what is going to happen here? This \(-1^n\) multiple that I have introduced is going to alternate between one and negative one all the way to infinity. The effect is that it is going to flip every other addition sign between the terms in our equation to a subtraction. But that is all. So instead of the term:
\[S=1+\tfrac{1}{4}+\tfrac{1}{16}+\tfrac{1}{64}+\ldots\]
We are going to get:
\[S=1-\tfrac{1}{4}+\tfrac{1}{16}-\tfrac{1}{64}+\ldots\]
We can divide both sides by four again to get this:
\[\frac{S}{4}=\frac{1-\tfrac{1}{4}+\tfrac{1}{16}-\tfrac{1}{64}+\ldots}{4}\]
BUT look what happens when we divide through all the terms. Each term moves to the left BUT IT LEAVES ITS SIGN BEHIND!
\[\frac{S}{4}=\tfrac{1}{4}-\tfrac{1}{16}+\tfrac{1}{64}-\tfrac{1}{256}+\ldots\]
So this time when we look up, we cannot spot a duplicate of our long list of fractions because the signs have switched. What to do?

Well, lets look at what happens when you take a series of additions and subtractions and deduct them all from zero. Lets use letters to stand in for any numbers at all. I am going to use \(a,b,c,d\) to save confusion. Lets start with:
\[a-b+c-d=E\]
Now, lets take away both sides from zero:
\[0-(a-b+c-d)=0-E\]
Now get rid of the brackets:
\[(0-a)+(0--b)+(0-c)+(0--d)=0-E\]
\[-a+b-c+d=-E\]
We know what \(E\) is, so we can write:
\[-a+b-c+d=-(a-b+c-d)\]
So can you see what happens when you negate a whole string of numbers? Each number in the string flips its sign from positive to negative. Just like we saw with our long list of fractions in this case. So we can actually say that:
\[S=1-\frac{S}{4}\]
Remember that the FIRST term in \(\frac{S}{4}\) is \(+\tfrac{1}{4}\) so the NEGATIVE sign between the one and the \(\frac{S}{4}\) turns the \(+\tfrac{1}{4}\) into \(-\tfrac{1}{4}\), and vice versa for all the other entries in that string of fractions. Guess what? All the signs have now switched back again - hooray! So what next? Well lets multiply through by four again:
\[4\cdot S=4\cdot (1-\frac{S}{4})\]
\[4S=4-S\]
This time we have to ADD \(S\) to each side:
\[5S=4\]
And then divide both sides by five:
\[S=\frac{4}{5}\]
Again lets check that makes sense:
\[1=1\]
\[1-\tfrac{1}{4}=\frac{4-1}{4}=\tfrac{3}{4}\]
\[1-\tfrac{1}{4}+\tfrac{1}{16}=\frac{16-4+1}{16}=\tfrac{13}{16}\]
\[1-\tfrac{1}{4}+\tfrac{1}{16}-\tfrac{1}{64}=\frac{64-16+4-1}{64}=\tfrac{51}{64}\]
What number are those results moving towards? Well let me put it this way. What is \(\tfrac{4}{5}\) in sixty-fourths?
\[\frac{51\tfrac{2}{5}}{64}\]
Yay!
OK, next time we'll reintroduce the \(x\) variable in place of the \(\tfrac{1}{2}\) that we used this time.

Monday, 25 July 2011

Making the Imaginary Visible

Last time I promised pictures to illustrate whay I mean by this imaginary number \(i\), and here they are. First of all, let's go all the way back to the ancient Greeks. Let's say all we have to work with are circles and straight edges. How do we represent numbers? Remember I gave an example of how they would deal with adding one to two (or was it two to one?) - they would draw a line and mark off equal sized sections to represent the whole numbers. Let's do that here. First we need a line:


Now, let's start with the very left hand side as zero. Why zero at the left? Well, this page is written in english and we read english left to right. The is no other particularly good reason to have zero at the left rather than the right. So I have just made a choice.

I am not going to bother drawing in the circles that would result if we actually used a circle drawing device to make sure all the numbers are marked off equally. let's just say they are. I want to mark off numbers up to four. Why four? Well, \(\pi\) was between three and four, and \(e\) was between two and three, so if we go all the way to four, we can actually mark on all the numbers that we have talked about so far. The line will now look like this:

What we have marked out there are five "numbers". Or, four if you do not accept zero as a number. Or, actually, three if you do not accept one as a number. But that is really getting pretty semantic at this point. You can actually see what we are talking about. There is a dot marked two, which is twice as far from the zero as the dot marked one is. The dot marked four is four times as far away as the one, and twice as far again as the two. These are our whole, natural, numbers. These are the things that you count cows or apples in.

Our addition operation can also be visualised here. If we wanted to add two to one, we start at one and take two "hops" to the right ending up on three. It's the same thing with two plus two - you would end up at four.

When we looked at the different operations you could apply to these "natural" numbers we uncovered different kinds of numbers. For instance, we found fractions. How do these fit on the line? Easy, they just appear at some point between the natural numbers, like this:


In that picture the mark for a half is exactly half way between zero and one. What about irrational numbers? Can we show them? Yes, of course. Remember the square root of two? We cannot write it down as one whole number divided by another whole number. But it does have a size. If you use the random rooter spreadsheet that I made for the first blog post, you will find that the first five digits of the square root of two are \(1.41421\). We could get more and more precision, but that is fine for our number line:


There you go, between one and two, but not quite halfway. Now, what about our more esoteric numbers represented by the symbols \(e\) and \(\pi\)? We can just slot 'em on there:

We are probably, to be honest, getting a bit beyond what the Greeks could do with their number lines, but bear with me. There's \(e\) just before the three, and \(\pi\) just after the three. Those are the numbers that we are talking about - that's what they "look" like on the number line. This is all perfectly real. You can happily say that \(e\) is smaller than \(\pi\) because it is nearer the zero than \(\pi\).

OK, we have two other types of numbers that we found when looking at the operations you can perform, negative numbers and imaginary numbers. Can we make a mark on this number line to show either of these? Nope. Negative numbers are less than zero, but our line stops at zero. And imaginary numbers are ... something else entirely. Lets fix the negative numbers first. All we have to do is extend our line left beyond the zero:


And then we mark off our negative numbers:

Our operations to get negative numbers now make sense. To deduct three from two, we just start at two, and then take three "hops" left to get negative one. If we wanted to add two to one, we start at one and take two "hops" to the right ending up on three.

So now we come to imaginary numbers. We know already that they are neither positive or negative. How do we know that? Well remember back to when we tried to work out if the square root of negative one was positive or negative. We came to the conclusion that it was neither. This was because both a positive and a negative number square to a positive number. We need something new that squares to a negative. So the number \(i\) cannot be drawn on our line to either the left or right of the zero. So where do we draw it? We draw it ABOVE the zero:


In fact we draw a whole new \(i\) number line perpendicular to our \(1\) number line:


I had to move the zero digit to the left a bit, but it is still supposed to be the points where the lines cross over.

This is all a bit much to take in. It is tempting to ask ones self "how on earth there can be a whole new number line perpendicular to the original one?", or "It doesn't make any sense", or "What does it all mean?". Do not feel bad about asking these questions, but understand that these are exactly the sort of questions people would have asked about adding more number line to the left of the zero to accomodate the negative numbers. From the Egyptians to the century America won independence mathematicians pretended negative solutions to problems did not exist. They would have stared in disbelief at the existence of line to the left of the zero. So don't feel bad if that was also your first reaction to the up and down line.

Incidentally, just as there was no right 'end' to mark as zero, I could just as easily have drawn the line with the positive \(i\)'s underneath the real number line.

So what then does it mean to say that a number has real and imaginary parts? It basically means that instead of living in the one dimensional world of our original number line, actually numbers live in the two dimensional world of the plain delineated by the real number line and the imaginary number line. Say, what?

To find a real number, all you need to have is one piece of information. Where it is positioned on the number line. However, to find an actual number with imaginary and real parts you need two pieces of information. First, where it lies on the real number line (the real part) and second where it lies on the imaginary number line (the imaginary part). If a number has a real part of two and an imaginary part of \(i\) it would be where the black dot is on this picture:


What you do is go along the real line to two, and then go up to \(i\). We write this number as \(2+i\). It has an imaginary part of one and a real part of two. All of the "natural" numbers exist on this plain, it's just that they are all in the form \(x+0i\). In other words their imaginary part is zero. But they still have one!

So how does all this fit into \(i\) being the square root of negative one? Simple. It turns out that multiplying by \(i\) is the same as rotating about the zero point by 90 degrees. Say, what? OK, OK. Lets look at what I mean. Take our number above \(2+i\) and lets multiply it by \(i\). How do we do that? Its just the same as any other time we multiply two equations in brackets. Remember that \(i\) also has a real component, which is just zero. So we just need to follow the standard procedure for multiplying brackets together (blue and red baskets with apples and oranges):

\[(0+i)\cdot(2+i)\]

We need to multiply the first two terms of each bracket together:

\[0\cdot 2=0\]

Then the first from the first bracket and the second from the second bracket:

\[0\cdot i=0\]

Then the second and the first:

\[i\cdot 2=2i\]

And finally the second and the second:

\[i\cdot i=-1\]

Remember that \(i\) is the square root of negative one, so of course if you multiply \(i\) by \(i\) you get negative one. Not let's add all that up:

\[0+0+(2i)+(-1)\]

We need to rearrange that a bit, because tradition has the real part coming first in our number:

\[-1+2i\]

What does that look like on our number plain?


Now we can multiply that number (\(-1+2i\)) by \(0+i\) again to see what happens:

\[(0+i)\cdot (-1+2i)\]
\[(0\cdot -1)+(0\cdot 2i)+(i\cdot -1)+(i\cdot 2i)\]
\[0+0+(-1\cdot i)+(2\cdot i\cdot i)\]
\[0+0-i+(2\cdot -1)\]
\[0+0-i-2\]
\[(-2-i)\]


See, we hve multiplied by \(i\) twice so we have come a total of 180 degrees from the start. We can get our last dot by running the multiplication again.

\[(0+i)\cdot (-2-i)\]
\[(0\cdot -2)+(0\cdot -i)+(i\cdot -2)+(i\cdot -i)\]
\[(0)+(0)+(-2i)+(i\cdot -i)\]
Hang on a minute. What is negative \(i\) multiplied by \(i\)? Well think of it like this. Negative \(i\) is the same as negative one times \(i\). So that sum in brackets that the end of the last line is the same as \(i\cdot -1\cdot i\). Which in turn is the same as \(-1\cdot i \cdot i\). We know what \(i\) multiplied by \(i\) is, so that gives us \(-1 \cdot -1\), which we already know to be the same as one. That gives us the next line:
\[(0)+(0)+(-2i)+(1)\]
\[(1-2i)\]

On our graph that is here:


We are nearly there, and we can check the seemingly inevitable destination by multipling once more. This time we can dispense with multiplying by zero because we know that gets us nowhere. So instead we have: \[\begin{multline}
i\cdot(1-2i)=(i\cdot 1)+(i\cdot -2i)=(i)+(-2\cdot i\cdot i)=\\
i+(-2\cdot -1)=i+2=2+i
\end{multline}\]
And that, of course, is exactly where we started.


Of course, we now know that if you start at \(i\) and multiply that number by \(i\) you rotate through 90 degrees counter clockwise, bringing you to ... drumroll ... negative one. That looks like this:


Right, brilliant, we can now see what it means to multiply something by \(i\), but is any of this actually real? What I mean is, is all this just an invention of mathematicians to fill a gap, or did imaginary numbers exists before mathematicians "found" them? You could ask this question of the whole of maths, and very earnest people with wild hair and ink spots on their shirt pockets often do. I am not going that far, but I am going to try and convince you that imaginary numbers do affect "normal" maths even when you are dealing purely with real numbers and not trying to find the square root of anything negative. To do that we are going to have to dive into some infinite sums and series.

Monday, 18 July 2011

Such an Imagination

OK. Lets have a go at imaginary numbers. These are NOT straightforwards. The name is also very annoying because, they are very real indeed, and I will try to satisfy you that that is the case in due course.

First of all what the hell are they? We have already seen four different types of numbers. We have seen whole numbers such as one, two, three, ten and so on. These are obvious in our every day world. How many pens are on the desk? Three. How many cows are in that field? Twenty. They are used to count separate and distinct objects. Looked at formally, the \(x\) in the following equation is a whole number:

\[x+5=7\]

We can see without too much effort that \(x\) is two. Two is obviously a whole number so we are quite happy with that as a value of \(x\) that makes the equation work.

When we looked at the opposite of addition, we found a different type of number, a negative number. We agreed that saying you had negative five cows in a field did not make sense. The concept was so odd that for a long time mathematicians refused to accept that these numbers really existed. Nowadays we are perfectly happy with the concept (unless your bank account is very, very, negative, in which case you will be perfectly unhappy with the concept).

So what about a slightly different equation which works with a negative value of x?

\[x+5=2\]

To work, we need to set \(x\) equal to negative three. \(x\) cannot be a positive number, because there are no positive numbers that are five smaller than two. Again, we are quite happy with this, but weirdly even just a few hundred years ago the best mathematicians in the world would have said that there was NO ANSWER to that problem.

OK, next we considered fractions. We agreed that while you could have half a cow, it would not be very pleasant to look at. More fundamentally we realised that fractions are ratios between two whole numbers. So if I have five apples, and my friend has ten apples then I have half as many apples as my friend. That is a statement about the ratio of our apple collections to each other. What would this look like stated as an algebra question?

\[3\cdot x=2\]

This is just a little bit trickier because it is saying three what's are two? Or, what is two divided by three? We are quite happy with the answer two thirds. And in general people have always been comfortable with this idea. After all, you are just comparing two whole numbers.

OK, moving on we then learned about irrational numbers. These are numbers that cannot be written as one whole number divided by another whole number. We satisfied ourselves that the number which you multiply by itself to get two is one of these numbers. The equation which has one of these as an answer looks like this:

\[x^2-2=0\]

For the hard of thinking, you add two to both sides and then take the square root of both sides getting \(x\) equal to the square root of two. The ancient greeks really did not like this. They felt that all numbers should be rational, and they were really disturbed to find out that was not the case. it's a bit more abstract today, but we are generally not bothered by the idea that there are some numbers which would just go on for ever if you tried to write them out.

Now then. What is the answer to the following puzzle. What number, if you multiply it by itself, and then add one, gives zero? Or algebraically:

\[x^2+1=0\]

It is very similar to the square root of two equation just above isn't it? So what do we do? We subtract one from each side, getting:

\[x^2=-1\]

And we then take the square root of each side:

\[x=\sqrt{-1}\]

So the answer is the number, that if you multiply it by itself, makes negative one. OK, so what would that be then? One multiplied by itself is one, so is negative one multiplied by itself negative one? We need to think about multiplying negative things to get an answer to that.

We said that multiplying is just a special type of addition. So that three multiplied by four is:

\[3+3+3+3=12\]

Notice that there are four threes there. So what would negative three multiplied by four look like? Well, we would just add together four negative threes. That would look like this:

\[(-3)+(-3)+(-3)+(-3)=-12\]

Remember that adding a negative is the same as subtracting a positive. And also remember that you do stuff in brackets first. So while you have plus signs in between each set of brackets, the fact that there the numbers INSIDE the brackets are negative means that you end up subtracting. Didn't we say though that it doesn't matter which way round you multiply things? So what does four multiplied by negative three look like as addition? Well, sticking with our definitions, it is four added together negative three times. How do you add something a negative amount of times? Remember that a negative something is the same as the something subtracted from zero. So, for positive multiplication you add up a group of things, but for negative multiplication you subtract your number from zero the same amount of times you are supposed to negatively multiply it by. So it looks like this:

\[(0)-(4)-(4)-(4)=-12\]

(The zero looks a bit odd there, and I suppose it could be implied in the same way that positive one is implied to be zero plus one. So we could have written the four threes above as zero plus the four threes.)

As we would expect that is also negative twelve. So we have now looked at a positive multiplied by a positive (where both the number and the sign between the numbers are positive). That gives a positive result. We have looked at a negative multiplied by a positive (the numbers are negative but the sign between them is positive). And we just looked at a positive multiplied by a negative (the numbers are positive but the sign in between them changes to a subtraction instead of addition sign). What about the last option, multiplying a negative number, a negative amount of times? What does that look like as an addition?

Well, you will be multiplying a negative number, so the numbers IN the brackets are going to be negative. And we are going to be doing it a negative amount of times so the numbers BETWEEN the brackets will also be negative. The sum looks like this:

\[(0)-(-3)-(-3)-(-3)-(-3)=12\]

Because we are duplicating a negative number a negative amount of times we end up with two negative signs. Adding a negative is the same as subtracting the number, so subtracting a negative is the same as adding the number. Sound weird? Not really, if I lend you £10, then you owe me £10 (lets call that negative £10). If I then subtract, or cancel, the debt I have effectively gifted you £10. So I turn a negative obligation (you have to give me £10) into a positive benefit (I have given you £10).

So what you actually get when you subtract all those negative numbers is a positive number. In my minds eye, I see the two minus signs combine into a plus sign, with one of them rotating through ninety degrees. So for every two minus signs you create a plus.

So what about our hypothesis that if you multiply negative one by itself negative one times you get negative one? That would mean that you subtract (-) negative (-) one (1) from zero once (1). That would look like this:

\[(0)-(-1)\]

The two minus signs combine to form a plus, and you get positive one. So the square root of negative one cannot be negative one. It cannot be positive one either, because two positive numbers multiplied together always give a positive answer. So if the answer cannot be negative and cannot be positive, then what the hell is it? All the numbers that we know about - all of the numbers above, are either less than zero or greater than zero (or zero itself, I grant you). So how can a number be neither positive or negative?

Oh dear. It appears that we are stumped. And indeed for a long time people treated equations which produced answers that were the square roots of negative numbers in the same way as they treated equations which gave negative numbers themselves as answers. In other words they ignored them.

We do not do that any more though. Instead we say that there IS a number which is the square root of negative one, or a number which if you multiply it by itself gives negative one. We have a symbol for that number, and the symbol is \(i\). What we say, and just work with me on this, is that each number has a 'real' part which is a multiple of one, and an 'imaginary' part which is a multiple of \(i\). The number that is actually the square root of negative one is a number with no real part (or technically a real part multiplied by zero), and an imaginary part which is \(i\) multiplied by one. We say that \(i\) is not positive or negative in the sense of being more or less than zero. Instead we say that it has a whole positive and negative spectrum all to itself. So the following equation makes perfect sense:

\[i-2i=-i\]

This all sounds a bit abstract. What would such a number look like, and how does it relate to the other numbers that we are familiar with? I'll try and make it more visual next time.

Monday, 11 July 2011

Are Infinite Sums Infinite?

So, infinite sums. We covered these. These are an infinitely long list of numbers which you add up. If we want to add up all of the positive whole numbers we would write out:

\[\sum_{x=1}^\infty x\]

If we wanted to add up all the even numbers we would write out:

\[\sum_{x=1}^\infty 2\cdot x\]

Of course, both of these additions is a pointless exercise, because the answers are themselves infinite. There are an infinite amount of whole numbers, and if you add them all up you get infinity. Hell, even if you just added one to itself an infinite amount of times you would also get infinity:

\[\sum_{x=1}^\infty \tfrac{x}{x}\]

(Any number divided by itself is automatically one).

Does this always hold true? Do infinite sums ALWAYS add up to infinity? What about this sum:

\[\sum_{x=0}^\infty \frac{1}{2^x}\]

Looks a bit more complicated doesn't it? First of all notice that I am going to start adding from the zero'th position in the series. So first of all I plug in 0 for \(x\). I get one divided by two to the power of zero. Remember that anything to the power of zero is one. So the first term in this series is one divided by one, or one.

The next term is one divided by two to the power of one. Anything to the power of one is a just one copy of itself. So this is just two. So the term is one divided by two or a half. So far our sum is one plus a half.

The next term is one divided by two squared. Two squared is four, so this is one quarter. The next term is going to be one over two cubed, or an eighth and so on. Basically the series is one plus a whole long list of the inverses of the powers of two. Looks a bit like this:

\[1+\tfrac{1}{2}+\tfrac{1}{4}+\tfrac{1}{8}+\tfrac{1}{16}+\tfrac{1}{32}+\tfrac{1}{64}+\tfrac{1}{128}+\tfrac{1}{256}+\tfrac{1}{512}+\ldots\]

Does that add up to infinity as well? Hmm. Maybe not - look at each term, they all get smaller very very quickly. If they get smaller quickly enough, then adding them all up may not reach infinity.

Lets try some mathematical wizardry. Lets create a variable, which we will call \(x\). Actually, no, lets call it \(S\) for series instead. now let us give make the variable equal to the series that we have created from our sum. To keep things simple we'll cut down the number of terms on display:

\[S=1+\tfrac{1}{2}+\tfrac{1}{4}+\tfrac{1}{8}+\tfrac{1}{16}+\ldots\]

OK, now we will divide each side by two:

\[\frac{S}{2}=\frac{1+\tfrac{1}{2}+\tfrac{1}{4}+\tfrac{1}{8}+\tfrac{1}{16}+\ldots}{2}\]

If we divide a long series of additions by two, that is the same as dividing each individual number in the series by two. Starting with the one at the beginning, that will become a half, and then the half becomes a quarter and the quarter an eighth and so on. Can you see that we are effectively just throwing away the one, and moving every other entry in the series one to the left. Because the series is infinitely long, it is still infinitely long because infinity minus one is still infinity. So once we have done all our divisions by two we get:

\[\frac{S}{2}=\tfrac{1}{2}+\tfrac{1}{4}+\tfrac{1}{8}+\tfrac{1}{16}+\ldots\]

OK. What can we do with that then? Look up two equations to the one where we first defined what \(S\) was going to be. You can see that it is one plus a string of fractions. Now look at the equation above. We have established that one half of \(S\) is a string of fractions. Now consider the string of fractions itself. It looks similar. In fact it looks identical, and it will remain identical no matter how many terms you write down for either one. So far, so good. We can now say that \(S\) is one plus that string of fractions, but we know that the string of fractions is actually \(\tfrac{S}{2}\) so we can actually write:

\[S=1+\frac{S}{2}\]
And if we subtract one half of \(S\) from both sides we get:

\[S-\frac{S}{2}=1\]

\(S\) minus half of \(S\) is obviously just the other half of \(S\), so:

\[\frac{S}{2}=1\]

\[S=1\cdot2\]

\[S=2\]

So we have proved that the whole series up there adds up to two, even though there are an infinite amount of terms in it.