Friday, March 27, 2009

My Favourite Function

People have their favourite colours, football teams (go dogs !) and beaches. Why not your favourite function ?

For me there are many attractive candidates for "my favourite function". For example, I enjoy the simplicity of mx + c, the up and down of x2, the surprising plateauing of x3, the lovely endless symmetry of the sinx and cosx and even the quirkiness of complex polynominals (x4 + x3 + x2 + x). One of my associates is very fond of the hyperbolic functions but personally find their curviness rather artificial (they are just a compound of two other functions). I must admitt that I find the limited domain of most inverse functions a little off putting. Why choose a function with a limited range when you can have the whole number line !

I think looking for a favourite in any area involves the formation of various vanities and snobberies, which is what makes competitions like "the top ten albums of all time" alot of fun. It is an opportunity to laugh at your own prejudices whilst studying the quirky choices of others.
So what is my favourite ?

ex is definitely my favourite function. Why ?

Certainly, the exponential function forms a pleasing curve but it is more its amazing characteristics that draws me to ex. I love the fact the function is based on an irrational number but calculates something commonly observed in nature (e.g. radioactive decay, rates of chemical reactions, etc.). I find the idea that the slope of any point of the line is the value at that point (dy/dx = ex) amazing and totally fascinating. For me, ex is number one ! (which is only true when x = 0)

What is your favourite function ?

Thursday, March 19, 2009

The End of Elegance


I think there are three breakthroughs in mathematics that have really shook the foundations of the field, the first is the discovery of irrational numbers (formerly accredited to Hippaus, a member of Pythagoras's school around 500 BC but Indian mathematicans are now thought to have been earlier), the second, relates to the work of Cantor in the 19th Century in showing that infinity comes in different sizes, and, thirdly, Godel's incompleteness theorem in the first part of the 20th century, which demonstrated that attempts to form systems of axioms that are entirely logically consistent are doomed. These amazing feats of insight, intellectual rigour and imagination, initially triggered rejection and a strong counter reaction from their peers. In the case of Hippaus, legend has it, that this discovery cost him his life, as Pythagoras's followers incensed with his proof that the square root of 2 is irrational threw him into the sea ! After time, these ideas were accepted, incoporated into the mathematical mainstream and built on by thinkers who followed in the wake of these tidal waves.

Lets address the first intellectual tsunami; the discovery of irrational numbers. Why was this so important ? This discovery was important because it challenged a central notion of the type of mathematics that Pythagoras and his followers were seeking to establish. Pythagoras viewed mathematics as sacred and capable of explaining the deepest ideas and describing the natural world around them. For the school of Pythagoras, shapes and numbers were elegant expressions of profound ideas. In this intellectual climate, they assumed that numbers could always be expressed in terms of simple ratios of integers (e.g. 1/7), which they understood in geometric terms - a feature of Greek mathematics that makes it hard for modern reader to appreciate their arguments directly.

What did Happaus show ? We don't have access to the original proof but we can assume that his proof followed this type of argument:

If the SQRT (2) is rational, than is follows:

SQRT (2) = a/b where a and b are integers.

It also follows:

2 = a2/b2, which can easily be turned around to 2b2 = a2

We know that 2 times any number will result in an even number and that square root of any even number results in an even number, therefore, "a" must be an even number. If "a" is an even number than we can express it as 2r, where r is another integer, and we can re-arrange the equation above to:

2b2 = 4r2, which can be simplified to b2 = 2r2.

Using exactly the same argument as the one above, we can say that "b" must also be even. Now, we have a contradiction, because any ratio of two even integers can be reduced to a ratio involving an even and a odd number (e.g. 2/8 = 1/4). Therefore, it is not possible for the square root of 2 to be expressed as a ratio of two integers. In fact, this intriguing qauntity can not be directly calculated but only approximated.

This is still a somewhat shocking result. A physical representation of the square root of 2 can be easily visualised by constructing a right angle triangle with two sides the length of 1 m. The hypotenuse of the triangle must be the square root of 2 (using Pythagoras's famous theorem) .... we can see it, we can easily esimate the length using a ruler, how can it be that we can not calculate it ? This is exactly the intellectual dilemna that haunted Pythagoras, disturbed many mathematicians since the Greeks (notably Newton) and still causes one to shake your head and muse that God must be playing some elaborate joke on us. The later discovery of the irrational nature of pi and e, and Cantor's discovery that that there are many more irrational numbers than rational on the number line, just serves to deepen the shock. The type of elegance visualised by the early Greeks was over. No wonder they metaphorically shot the messenger by throwing him into the sea.

Sum of Geometric Series


In our proof that repeating numbers are rational, we used the following relationship:

S = Sum of the geometric series arn-1
= a + ar1 + ar2 + ar3 + ar4......
= a/(1-r)

Where does this rather elegant and surprising relationship come from ? Certainly, this simple realtionship is rather unexpected .... why would an infinite series converge on this simple ratio ?

Like many relationships in mathematics, the proof is beautifully simple. Firstly, form the equation S - Sr = a + ar1 + ar2 + ar3 ..... - ar1 + ar2 + ar3 .... = a

Therefore, rearranging we arrive at S = a/(1-r).


QED

Monday, March 16, 2009

Are repeating numbers irrational ?


The question of the nature of repeating numbers comes up when we convert fractions into binary, as even apparently simple fractions in decimal becomes an infinitely long string in binary, for example:

0.110 = 0.0001100110011 ....2 = 0.000112.

On first appearances, we seem to have "changed" the type of number we are representing, just through the change of base. Have we in effect converted a rational number into an irrational number ?

No, we haven't ! This new representation of the number is still rational. The proof is as follows:

A rational number is defined as a number that can expressed as the quotient of two integers (e.g. 0.1 = 1/10).

We can express an repeating number as a geometric series:
e.g. 0.997997997997 ..... = 0.997 + 0.997 (1/1000)1 + 0.110(1/1000)2 + ...... etc.

where a = 0.997 and r = (1/1000)

It is well know that the sum of geometric series of this type = a/(1 -r), which will result in a ratio of integers (in this example 997/999).

This, because an infinitely repeating numbers sequence can be represented as a geometric series and the sum of a geometric series can expressed as a ratio of integers, such numbers must be rational.

QED (Quite easily done for non Latin speakers)

Note: Thank you to associate Sergey Suslov for his thoughts on this topic.

Sunday, March 15, 2009

Floating Points

How do computers deal with decimal points ? This question was asked by a student during a recent class on binary calculations.

Computer by in large use a "floating point" system which converts a number into a string multiplied by a given base to a power; mathematically,

x= f x be where f is a real number and e is an integer

Using this system, 110.5 in decimal becomes 1.0105 x 102. If the base is predicided and we express the real number part (called the "mantissa") as less than 1 than we can represent the number as a string of digits with the last number being the integer. Thus, 110.5 becomes 11053 in this system. Of course, computers operate in binary but the logic of the nomenclature is the same. This type of "floating point" system (and many variations) facilitate the very fast calculations performed by modern computers. Fixed point systems, which operate on a predetermined setting of the decimal or binary point are far less common. This floating point system does present problems with rounding errors and representation of irrational numbers (which have to be approximated as real numbers in this system) but still is a powerful method of storing and handling large sets of numbers.



Thursday, March 12, 2009

Binary - Mathematics Made Simple


Binary is counting in two. Instead of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10, we simple count 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001 and 1010. This reduction of counting to the use of two symbols is both imagative and very powerful because it greatly faciltates the mechanisation of countng. For example imagine we have four egg cups sitting in a row on a bench. We can represent any number from 0 to 15 simple by deciding that an upside down egg cup represents "1"; so if the first two egg cups are upside down and the two remain right side, this translates to "1100" in binary and "12" in base 10.

Other mathematical operations are also simple in binary, for example, adding in binary is quite elegant, for example think of 5 + 7 perfomed in binary :

101+ 111 = 1100

This whole procedure can be reduced to a simple recipe. To get the idea, line up two rows of four egg cups (assuming your family like boiled eggs alot or you have a big family!!) and see whether you can devise a set of rules for add two numbers together. Try to do the same with eight egg cups and adding decimal numbers together .... now you can start to appreciate the power of binary.

The binary number system combined with Boolean logic (another great feat of mathematical imagination) is central to the workings of the modern computer. Counting, number manipulation and storage, can be performed with amazing speed and accuracy based on very similiar procedures to your egg cup algorithm.

Tuesday, March 10, 2009

Counting in tens ?



Why do we count in groups of tens ? Is counting in tens the best way to count ?

Very interesting questions to consider ! Clearly, the presense of ten digits on our hands must largely explain why human count in tens because there are some clear dis-advantages with the decimal system. For example, it is difficult to count in tens using mechnical and/or electronic devices, and, in fact, computers work largely using binary (counting in twos); octal (eights) and hexadecimal (sixteens) counting systems are also used by computers and machines. "Ten" is also not as useful as duodecimal ("counting in twelves") for dividing quantities (i.e. 12 can be divided by 1, 2, 3, 4, 6 and 12, whilst 10 can only be divided by 1, 2, 5 and10). Old timers in the civilised world, and citizens of the the USA, will tell you the foot/inches are more useful than meters/centimeters for practical measurements because of this ease of division associated with duodecimal. I don't think there is any desire to move from a 24 hour clock to a 20 hour clock -I woudn't like to lose four hours of sleep ! - because of the very practical nature of the current system.

Thus, in part, we count in tens because of an accident of evolution (or the will of a god according to some). It is fun to imagine a world where we have eight fingers and thumbs and not ten. My dream of an eight finger universe can found in an earlier blog (2/1/09) entry for though inclined to entertain wild thoughts or interested in counting systems.

Note: Some societies count in fives (one handed) and others don't consider numbers past two ...... one, two and many. I'm not aware of any societies that count in 20s, which is a logical extension of counting with all available digits, but imagine how difficult remembering your times tables would be in such a society !