In this video, I'd like to discuss how mathematical expressions can be built and manipulated algebraically, with I think some rather remarkable and surprising outcomes. I'll begin by relating a childhood experience that really stayed in my long-term memory and stimulated my interest in mathematics. Some people have bad or unpleasant experiences in early childhood that put them off mathematics. I was lucky and had a very fine teacher. One morning, he came into the classroom and said, "I want you all to think of a number between one and 10. It's your own secret number. Don't tell me or your friends. I want you to double it, add four, halve what you see in your head. Remember your secret number, don't tell anyone, take it away. You're now thinking of the number two." We were all in day thinking of the number two. This was quite astonishing to a child and what was even more remarkable was the teacher was able to explain carefully why we're all thinking of the number two. Call the secret unknown quantity x, build up an algebraic expression that corresponds to the instructions, and see that it simplifies in every case to the number two. It was for me quite amazing and powerful. My first experience of mathematical proof. I'd like to show you something surprising about some common everyday objects. Sheets of paper in fact in the A series. Here's A4. This is A5 half as big, A6 half as big again, and A7 half as big yet again. Two A5s make an A4. Two A6s make an A5 and so on. These pages are all rectangles. You can have thin rectangles, thick rectangles, rectangles with perfect symmetry known as squares. But notice that all those sheets of paper in the A series form similar rectangles, by which we mean they have the same proportions. How can we prove that? Well, we can draw lines along the diagonals of each of them. If the diagonals all line up, then the rectangles are similar. See how all the diagonals line up. We can continue creating smaller and smaller similar rectangles forever just by dividing the sheets in half. Now, the diagonal lines in the rectangles have a slope and slopes are really important in Calculus. So what we'll do now, is try to understand this particular slope associated with the A series of sheets of paper. The slope is just the ratio of the side lengths. Here we have a diagram of an A4 sheet of paper, divided exactly in half so the two halves represent A5 sheets of paper. Call the longest side length b and the shortest side length a. So, the shortest side length of the A5 half is b on two, and its longest side length is a. Let X denote the ratio of the longer side length to the shortest side length. So, for the A4 sheet, this is b on a and for the A5 sheet, this a over b on two. Multiply top and bottom by two and divided top and bottom by a. And we get two divided by X. Thus X is equal to two over X. So X squared is equal to two. So X must be the square root of two. Just using algebraic manipulation, we discover that for the A series of paper, the ratio of the longer side to the shorter side is the square root of two. Now, from your calculator, you will see that the square root of two has this decimal expansion and it goes on forever. There is no repeating pattern of digits, because the square root two is irrational. Something we discussed last time. How does the calculator know that this is the correct way to start the decimal expansion? I'll show you a surprising consequence of algebraic manipulation. First, remove the one at the front by subtracting one from the square root of two. And we get this mysterious decimal expansion after the decimal point. Now, in mathematics, it's very important for all sorts of reasons, to be able to reciprocate or invert numbers. Just for fun, let's play around with reciprocal of root two minus one. Who knows where it may lead. We get this awkward looking fraction. Any mixture of symbols involving the square root sign is called a surd expression. How might we simplify it? There is a technique explained in the notes called rationalizing the denominator. I won't go into the details here, but in this case, it involves multiplying the top and the bottom by root two plus one. When we do this, the numerator just becomes one times root two plus one which is root two plus one and the denominator becomes root two minus one times root two plus one, which becomes root two squared minus one squared. This comes from something called the difference of two squares formula. a squared minus b squared is a minus b times a plus b. Which we apply here with a equal to root two and b equal to one. And so because of this neat trick, the fraction simplifies in a couple of steps to root two plus one. Thus, we have shown that the reciprocal of root two minus one is root two plus one. Reciprocating again, that is turning the fraction over, we get root two minus one, is one over root two plus one. Now, there are more neat tricks. We can subtract one and add one in the denominator without altering the overall value of the expression. And then this becomes, one over, root two minus one plus two. Now, in mathematics and computer science, you almost always discover something interesting or useful, if you can set up some kind of self-reference or recursion. We had that here. Now, what do I mean? We'll put Y equal to root two minus one. So Y equals one over Y plus two and it's convenient to swap the two and the Y around this doesn't alter the value of the expression. And we get Y equals one over two plus Y. Now, why should we get excited by this? I remember when I was very young having porridge for breakfast, and the oats came out of a packet with a picture of a man holding a packet, with a picture of a man holding a packet, with the picture of a man holding a packet and so on forever. It was intriguing, mind-boggling, that infinity could sneak its way into the kitchen. And we have that here. Y is our packet of oats with the self-referential property. We can feed Y into itself again and again and again and again going on forever, creating what is called a continued fraction expansion. Remember Y equals root two minus one. So, here's its continued fraction expansion going on forever. Of course, we can't compute with infinite expressions, but we can approximate them. What we do is truncate the expression somewhere say here, and equals becomes approximately equals. And then evaluate this fraction on the right-hand side inside out. We get five on two which becomes two on five, which unravels in a few steps to become 29 on 70. Thus, we have that root two minus one is approximately equal to 29 on 70. So, root two is approximately one plus 29 on 70, which equals 99 on 70. We've just played with simple numbers and come up with this approximation. So, how good is it? If you square 99 on 70, you get 9,801 divided by 4,900, which is almost 9,800 on 4,900 and that's exactly equal to two. The difference here is one, 4,900 so close. If you start dividing 70 into 99 you get a recurring decimal expansion after several steps with repeating digits at infinite. Here's the decimal expansion of root two again. Notice that these decimal expansions agree up to the first four digits past the decimal point. Now, we just took a few layers of the continued fraction and just in a couple of minutes, we produced a rational number approximation, whose expansion gives the first four digits of root two after the decimal point. Now, before mathematicians had calculators, this is how they would get such amazingly accurate approximations of numbers. They'd do some kind of clever algebraic manipulation, to get an approximation involving fractions which in turn involves simple counting numbers. And then it becomes straightforward and possibly tedious, to write out the decimal expansion which eventually repeats, being a recurring decimal. Just for fun, you could go back to that truncated continued fraction, add some more terms and get an even more accurate approximation of the square root of two. We've covered a lot of ground in a few minutes including, developing some techniques of algebraic manipulation, looking at surd expressions involving square roots, including a rather surprising example of reciprocation leading to a recursive formula, and a novel method of approximation using a continued fraction. There's more detail in the notes and I'd like you to read and digest them. When you're ready, please have a go at the exercises which should give you a thorough workout with manipulating fractions in all sorts of combinations including symbols and numbers. And some practice with the technique of rationalizing the denominator of a fractional surd expression. Thank you very much for watching and I look forward to seeing you again soon.