Monday, 25 April 2011

How do Fractional Operations work?

With division came fractions, in the form of an inverse to a number, and simply one number divided by another. It sounds really simple, but it is worth saying that one divided by three is a third. The mathematical notation version of that can look very similar:

\[1/3=\tfrac{1}{3}\]

Right, so how do we add together two fractions, say a half and a third? Well, to start with you need to be talking about the same type of things. Thirds and halves are not the same type of thing, apart from the fact they are both fractions. It is easy to add a third to a third, you get two thirds!

You can't directly add a half to a third though - what would you get? A hird? Or a Thralf? So we need to first of all make them the same thing. This may NOT be either halves or thirds, and it is going to change the numbers on top in each case.

A half is the same as two quarters, or six twelfths and so on. A third is also the same as two sixths or seven twenty-firsts, and so on. The game is to find the first type of thing (quarters, sixths, twenty firsts or whatever), that we can make both a half and a third fit into exactly.

So, first question, how many thirds in a half? One and a bit, because one third is less than a half, and two thirds is more than a half, so that is no good. What about quarters? How many quarters in a half - exactly two. Good. How many in a third? Again one and a bit for the same reason as halves. Fifths are also no good; there isn't an exact number of them in a half or a third.

So what about sixths? Well, there are two sixths in a third so good. And there are exactly three sixths in a half. Bingo. So our problem is now to add three sixths (a half) to two sixths (a third) and the answer is exactly five sixths.

So for addition, all you do is add the number of the type of thing you have together if it is all the same type of thing. If it isn't you need to make the type of things the same (which automatically changes the number of them you have) and then just add.

It is no coincidence that a sixth is half of a third by the way. The easiest way (although not necessarily the neatest) of converting two different types of things into the same type is just to multiply the types together. So two times three is six in our example.

For subtraction, you just do all that in reverse. Easy.

Multiplication seems a bit trickier, but is actually easier once we work out a shortcut. Lets say you have so many somethings or other and you want to multiply them by another amount of something else. Let's represent the 'so many' with the letter 'a' (just a placeholder, could be a picture of a pony or a guitar). Let's represent the somethings with 'b', the 'another amount' with 'c' and the 'something else's with 'd'. So what we get looks like this:

\[\frac{a}{b}\cdot\frac{c}{d}\]

So we are trying to multiply a number of b'ths by c number of d'ths. If that makes sense. This looks a bit daunting, so lets make it easier and say we are only going to find what one b'th of the second fraction is. Once we have worked out what one b'th is, we can just multiply that by a, and we will get the full answer we want. That would look like this:

\[\frac{1}{b}\cdot\frac{c}{d}\]

Now we are really just taking two numbers the 'c' and the 'b' and dividing 'c' by 'b'. Why are we doing that? Lets use some numbers to see what happens:

\[\frac{1}{2}\cdot\frac{4}{7}\]

So we are asking what is half of four sevenths? The obvious answer is two sevenths. Two sevenths plus another two sevenths is equal to four sevenths. So all we did was divide four by two and we got the answer. (Or you could say we multiplied four by a half or by the inverse of two ... it is all the same thing).

The problem is what happens if you cannot divide the 'c' number cleanly by the 'b' number. What about:

\[\frac{1}{2}\cdot\frac{5}{7}\]

That's going to leave two and a half on top of the right hand side fraction, which is a mess. How do we solve this? Just as with addition, we need to convert the top of the right hand number into something that the bottom of the left hand number can divide into. But, if we change either the top or bottom of a fraction, the other bit of it automatically changes as well. With addition the easiest way to get the numbers to fit together was to multiply them together. Same thing happens here. We need to multiply the 'c' number by the 'b' number. To maintain the ratio between the 'c' number and the 'd' number we also need to multiply the 'd' number by the 'b' number. So we get this in our example:

\[\frac{1}{2}\cdot\frac{5\cdot2}{7\cdot2}\]

\[\frac{1}{2}\cdot\frac{10}{14}\]

We can now happily divide ten by two to get five:

\[\frac{5}{14}\]

But hang on - the five is exactly the same as we started with. Why is that? Well remember that these are rational numbers. So if you double the number on the bottom without doubling the number on the top, the ratio is now half of what it used to be. If you triple the number on the bottom without changing the number on the top the ratio is now a third of the size it used to be. Remember I said that if you change either the top or bottom then the other part has to change automatically to remain the same? Well, here we do not WANT it to remain the same. So we can just multiply the bottom of the second fraction by the bottom of the first fraction and it will give us one b'th of the second fraction automatically.

Now we have one b'th of the second fraction, but we actually want 'a' number of b'th of the second fraction. Remember we simplified what we were going to do by ignoring the 'a'. Well that's easy to bring back in now. We know how big one b'th of the second fraction is, we just need 'a' number of them. So we just multiply the answer we got by 'a'. If you have one eighth and you multiply it by three you get three eighths. If you have two sevenths and you multiply it by two you get four sevenths. The eighth or seventh bit does not change, just the number of them. So all we do now is multiply the top number of the second fraction by 'a'. Remember the top number has not changed - we found out we could leave it as 'c'.

In summary then what we do is multiply the bottom of the second fraction by the bottom of the first, and then multiply the top of the second by the top of the first:

\[\frac{a}{b}\cdot\frac{c}{d}=a\cdot\frac{c}{b\cdot d}=\frac{a\cdot c}{b\cdot d}\]

What about division of fractions? This could be painful, really really painful. Think about this:

\[\frac{a}{b}/\frac{c}{d}=\frac{\frac{a}{b}}{\frac{c}{d}}\]

Eeeewwww. That looks messy. Remember our alternate rule about division? It is just multiplication by the inverse of the number you want to divide by? We know that the inverse of three is a third. Well the inverse of a third is three. So what is the inverse of two thirds? Do we (following what we did with fractions above) ask what is the inverse of one third (three) and then multiply that answer by two (getting six)? No, because we know what the inverse of six is (a sixth) and it isn't two thirds.

Remember that we said than an inverse was what happened when you asked a question like "how big is each piece if one is split up into so many equal pieces". That got us from three to the inverse of three being a third. We can also go in the other way. Starting with a third, we can get its inverse if we ask "what is one a third of?" The answer is obviously three, because there are three ones in three. How does this help with two thirds? The question we ask is "what number is one two thirds of?". The answer is one and a half, because there are three halves in one and a half, and two halves in one.

The question may be a little bit more tricky, like "what is the inverse of five eighths". So we ask "what number is one five eighths of?". Now just take one, and split it into five equal pieces. Each one will be a fifth in size. One is now the same as five fifths. The question is now "what number is (five fifths) five eighths of?" The answer has to be eight fifths. Five fifths is five eighths of eight fifths. Sounds confusing? Work backwards. Eight fifths are eight things. Five of them will be five eighths of the whole. But each one of the things is one fifth in size. Five fifths is also one. So the inverse of five eighths is eight fifths.

Hey there is a symmetry there! What about two thirds and one and a half? Well remember that one and a half is three halves. So the inverse of two thirds is three halves. That's symmetrical as well. The rule we have found is that the inverse of a fraction is just the fraction turned upside down. That fits with our earlier, simpler, inverse of whole numbers, because three is equal to three ones, flip the one and the three, and you get one third.

So, our horrendous expression:

\[\frac{a}{b}/\frac{c}{d}=\frac{\frac{a}{b}}{\frac{c}{d}}\]

can actually be written as:

\[\frac{a}{b}/\frac{c}{d}=\frac{a}{b}\cdot\frac{d}{c}\]

because dividing by c number of d'ths is the same as multiplying by the inverse of c number of d'ths, which as we have just seen is d number of c'ths. Simple.

You can also do things with fractions as exponents, but I will leave that until next time.

Monday, 18 April 2011

The Opposite of Multiplication

Following in from addition and subtraction, the opposite of multiplication is division. This is the process of taking a group of things and asking, if I have to separate these things into a certain number of equally sized groups, how many will be in each group. So if you have six apples and three hungry people, you would want to know how many apples each hungry person could have if they all had to get the same amount. This is the process of dividing six by thee. Each hungry person will get two apples.

Like subtraction and addition, we can treat the act of division as a special type of multiplication. But my feeling is that this gets hopelessly circular very quickly. The logic goes that if you divide a number by another number that is the same as multiplying the first number by the inverse of the second number.

Well, what the hell is an inverse? Good question. An inverse is the size of the individual pieces you get if you split the unit number (for us the number one remember) up into the same number of equal pieces as the original number. If you consider the apples and hungry people example, we are dividing six by three. The inverse of three is a third, because if you split the number one up into three equal pieces, each piece is a third in size. So instead of asking how many ones are in three, you ask the INVERSE of the question, which is how big is each piece if one is split up into three equal pieces.

What you then do, according to the multiplication theory of division, is multiply six by one third. Remember that multiplication is replicating one collection of things so that you end up with a second number of those collections. I did not say that you had to use WHOLE numbers.

So what is a whole number, and more importantly, what is NOT a whole number? As with negative numbers and addition, multiplying by an inverse forces us to consider another new type of number. A whole number is a number that is made up of ones and ones alone. It could have one one in it, or two, or three or fifteen billion, or negative twenty two, but it is only made up of ones. Another name for this type of number is an integer. If it is a positive integer (more than zero) then it is a natural number (but still an integer).

A number which is NOT a whole number is made up of PARTS OF ones. It may be made of some whole ones as well, but it will have parts of one in there too. So, the quantity two and a half is made up of two ones, and a half of one. The time a quarter past three is three hours (past midnight or midday) and a quarter part of an hour. The question is are these quantities or times really numbers? We quickly find ourselves back at the same kind of philosophical problem as we met at the negative number stage. Is it meaningless to take about half a kilogram of flour? No. Is it meaningless to talk about half an egg? Maybe - after all you would never go into a shop and try to buy three and a half eggs.

Well the answer, as you may have expected, is that we are quite comfortable now with the idea of these parts of one being numbers in their own right. They are just not whole numbers. They are also much less abstract than negative numbers. If you have half a cow, you can at least see and smell it, albeit the experience may not be a pleasant one.

So this part, or fraction, of one is a number is its own right. You can then multiply another number by that number. What does it mean to multiply a number by a fraction? Well remember that multiplying a group of things by a number means you end up with that number of groups of things. So all that happens if you multiply by a fraction is that you end up with a fraction of the original group. So if you have a group of twenty things, and you multiply that by a half, you end up with ten things. It still does not matter what order you do this in, so if you gather up twenty halves, and put them all together, each one finds a friend and you end up with ten whole things. In that example, of course, one half is the INVERSE of two, because there are two equal halves in one, rather than two ones in two.

So why is all this circular? Because we represent fractions as one number divided by another. So we show a half as one divided by two. So we are back to division already. Brilliant. So to be able to multiply by an inverse instead of dividing the first thing you have to do is divide to get the value of the inverse. Seemingly pointless. However it will be surprisingly useful when we come to try to multiply fractions together. Lets have a look at that kind of thing before we look at our last opposite operation.

Monday, 11 April 2011

The Opposite of Addition

Last time we looked at three mathematical operations, addition (combining two groups of things into one big thing and counting how many things you have in the big thing), multiplication (a special type of addition where you add together a certain number of equal groups of things) and raising to the power (a special type of multiplication where you multiply a number by itself a certain number of times).

Each of these operations has its opposite, and I want to say a few words about those. These do not arise in the formula that we are looking at, but they do crop up in some of the explanations of the individual components of the formula.

Firstly the opposite of addition is subtraction. You start with some number of things, remove a certain amount of them, and count how many are left. You have subtracted the certain amount from the number of things.

What you can also do is just consider this to be a special type of addition where you add a negative number to your starting number. At this point we encounter our first real philosophical problem. What is a negative number? We have been imagining lots of "things" in our discussions of addition, subtraction, and raising to the power. These things could have been anything - carrots, tractors, stamps, people, bacteria - it doesn't really matter. But you could picture the thing in your minds eye - you could touch it, look at it - it was real. We call these numbers of things, NATURAL numbers. But what can it possibly mean to talk about a negative tractor? What colour would it be?

Well, this is a thorny problem that ancient mathematicians dealt with by ignoring it and hoping it would go away. For instance the ancient Egyptian mathematicians said there was no sensible answer to the question "what number, if you multiply it by four and then add twenty, equals zero". Today we would say that the answer is negative five, because four lots of negative five make negative twenty, and twenty added to negative twenty makes zero. In the middle ages, Hindu and Muslim mathematicians worked out how to use negative numbers, primarily as a reflection of a debt. Meanwhile the western world was trying to work out how to stop the barbarians from clubbing them over the head and being eaten. As recently as the Eighteenth century (when America got its independence) mathematicians would ignore negative answers to problems because they were meaningless.

Nowadays we are relatively comfortable with the idea of negative numbers. If you gift me your only tractor for my birthday, then you have zero tractors. If, however, I borrow your only tractor you have a negative tractor because I am due to return your tractor to you.

So if you have five of something, and you add negative three somethings to it you end up with two of the somethings left.

There is an important difference between ACTUAL subtraction and adding a negative number. Remember that with addition, it does not matter which way round you do it. So, if you have four and you add negative three to that you get one. If you have negative three and add four to it you get one again. Just as we would have expected. BUT if you have four and SUBTRACT three you get one, WHILE if you have three and SUBTRACT four you get negative one. So watch with this - if subtracting you need to get the numbers in the right order, but if you just add using negative numbers it does not matter.

We use the symbol \(-\) to show the action of subtracting, and we put the same symbol to the left of a number to show that it is negative: \(-5\).

Monday, 4 April 2011

Order of Operations, Part One

OK, before we go any further we need to think about the order that the operations we looked at are done in. What do we mean? Well one plus two can only be done two ways. You can add one to two, or you can add two to one. Either way it makes no difference.

Think about it, if you have a table with one apple towards the left hand side of the table and two to the right hand side, then you have three apples on the table. If you do not touch the apples, but instead walk around to the other side of the table, you still have three apples on the table, despite the fact that now you are looking at two on the left and one on the right. Changing your perspective doesn't change the number of apples on the table.

OK, so what about three multiplied by two plus one. Lets look at that. It sounds simple. Surely the answer is seven, because three multiplied by two is six, which if you add one is seven. But hang on. What if you metaphorically walk around to the other side of the table. Then you are looking at one plus two multiplied by three. That is surely nine, because one plus two is three, and three multiplied by three is nine.

Hmm. We have already seen it doesn't matter what order you multiply things in, or what order you add things in, but apparently it DOES matter what order you do both in. We had better agree on what we mean when we say "three multiplied by two plus one". Do we mean three groups of two objects, the total of which we add one to? Or do we mean two added to one three times?

Well, by convention we mean the first option. We do multiplications first. So you first look at which numbers need multiplied together, do that, and then do any additions. I say, by convention but it turns out if you accept a certain set of axioms (stuff you just accept to be true to get on with the argument, like Hitler was a bad guy, or Jar Jar Binks is an idiot), then you can actually prove that it has to be multiplication first. Once can read about this here, but when one understands that this was only proven 150 years ago, and for the two millennia before that mathematicians just had to get by with "its convention", then one can be quite comfortable not bothering with this proof.

What about the third operation - exponents? Now we are talking about what three to the power of two plus one amounts to. Is that three to the power of two (nine) plus one (ten)? Or is it one plus two (three), to which power you then raise three (twenty seven)? Conventionally we do the exponential bit first. So the answer is ten not twenty seven. Actually it is a bit easier with exponents than addition or multiplication, because the symbols give you the clues. With the superscript notation you would write \(3^2+1\) for the first example and \(3^{2+1}\) for the second. So the actual notation is different which was not the case with addition and multiplication. A final issue which will be important is what and exponent to an exponent is. Huh? Well, what about \(2^{2^{2}}\)? Actually thats quite easy if you just think it through. THe first \(2^2\) is just \(2\cdot 2\). And then the second, tiny, power of two multplies that by itself as well. So you get \((2\cdot 2)\cdot(2\cdot 2)\). And that is just \(2\cdot 2\cdot 2\cdot 2\). Which is just \(2^4\). THat's a general rule that works quite well. All it says is that if you have a number to an exponent, then you end up with the exponent number of the numbers multiplied together. If you then duplicate that group by however many times as the second, smaller, exponent, then you are really just adding more and more of the number being multiplied. This means that you can just multiply the two exponents together to get one big exponent.

If you really want to do something out of order then you put brackets round it. So if we said three added to one multiplied by two, and we actually meant take three things, add one to them to make four and then double it, then you would say (three plus one) multiplied by two. That would look like \((3+1)\cdot 2\). Anything in brackets we do first. Even before exponents. So the system goes brackets -> exponents -> multiplication -> addition.

One more thing about brackets. Some of the stuff we are going to look at has stuff in a bracket multiplied by stuff in ANOTHER bracket. We may not want that, and we need a way to get rid of the brackets. How do we do that? Back to the fruit. Let's say that you have baskets of apples and oranges. You have the same number of apples and the same number of oranges in each basket. We are saying that you are a greengrocer with OCD, but just run with it. Let's also say that you have red baskets and blue baskets. It doesn't matter what colour the baskets are, they still have the same number of apples and the same number of oranges in them.

So how do we work out how many pieces of fruit you have in total? Firstly, you could just tip all the fruit out into a big pile and count them. Sensible enough approach, because it is going to get you the answer eventually. Lets call that the brute force approach. It may not be wise though because, having OCD, you are going to have to put all the fruit back into the baskets afterwards. A more efficient approach would be to count up how many apples and oranges you have in each basket. You then count up how many red baskets, and how many blue baskets you have. You can then ask, how many apples in blue baskets do I have, how many oranges in blue baskets do I have, how many apples in red baskets do I have and how many oranges in red baskets do I have? You would write that down like this:

\[\begin{multline}
blue baskets\cdot apples + blue baskets\cdot oranges \\
+ red baskets\cdot apples + red baskets\cdot oranges
\end{multline}
\]

That is four multiplications and three additions, which is quite a lot. If you think about it, we are just interested in the total numbers of bits of fruit, we are not bothered about the differences between apples and oranges. So we could just say, how many bits of fruit in the blue baskets and how many in the red baskets? The total number of bits of fruit in each basket is just the number of apples plus the number of oranges:

\[(apples + oranges)\]

So we could replace our previous question with this:

\[blue baskets\cdot (apples + oranges) + red baskets\cdot (apples + oranges)\]

That is still going to give us the same answer, which is the total number of bits of fruit. In fact, going further we could say, we don't need to know about how many bits of fruit are in red baskets and how many are in blue baskets - we just want the total number of bits of fruit in ALL the baskets. To do that we would need to work out the total number of baskets we have, which is:

\[(blue baskets + red baskets)\]

You would then just multiply that with the statement of the total number of bits of fruit in each basket:

\[(blue baskets + red baskets)\cdot (apples + oranges)\]

All you have to do now is two additions and one multiplication, which is much easier. The baskets you have and the total number of bits of fruit in them have not changed at all in this process. We have actually gone through this process in reverse. What we wanted to find out was how to multiply two brackets together. What we have done though is end up with two brackets. The good news is that to get the answer we wanted, we just run that process in reverse. So if you ever have two items in one bracket, and two in another bracket, and the brackets have to be multiplied, you can see that you just need to take the first item in the first bracket and multiply it by each of the items in the second bracket and add the answers. Then you take the second item in the first bracket and multiply it by each of the items in the second backet, and add the answers. Then you add both sets of answers, and hey presto, the brackets have gone.