Sunday 5 January 2014

Some math-y weirdness, part 1.

So yeah, I love maths. It's actually one of the reasons I started this whole thing: because I wanted to talk about maths. I've actually got a post in the works explaining my love for maths, but I'm starting to realise it's a bit too much for one post. I thought I might try to work my way through there by making a series of posts, each showing a different thing about maths, walking my way up in complexity (but trying to remain as pedagogic as possible) and to give as wide a picture of the reality of what maths are as possible.

One thing to realise is that maths works through logic, by which I mean that it's the science of inferring from the properties of the stuff you're given. So obviously these posts will be a bit dry, and filled with definitions, because if you don't know WHAT you're talking about, how can you deduce anything about it ?


So, here we go. I thought I'd begin with the crudest things: sets. This might get technical at times, there will be strange words with even stranger definitions, just breathe, take your time to read, and don't hesitate to ask for any clarification.


A set is just a thing filled with stuff, and nothing more really. You don't know how those stuff interact (by which I mean you don't have anything like an addition, you have NOTHING, just your stuff). 


For instance, you can have numbers, like 1, 2, and 3, and if you take them collectively, you get the set containing the objects "1, 2, 3". What we will usually note {1,2,3} : the brackets denote a set. You forget any properties those elements might have. I used numbers, but we can totally imagine a set containing letters, like {a,b,c,d}. The objects inside do not really matter for the purpose of what a set is.


It follows that if you have two sets you want to compare, there aren't a lot of things you can do: you can see if one contains more objects than the others. It's what we call the cardinality, the size of a set.


If I give you these two sets for instance: {1,2,3} and {1,2}, you can easily tell that the first one have more elements than the second one... But what if they contained an infinity of elements ? How would you know if one is bigger ?


Or, more accurately, what does "bigger" even MEAN when we're talking infinity ?


The answer comes with a cool-looking word that will make you look smart if you manage to use it correctly: isomorph, "iso" comes from greek, and means "same", while "morph" also comes from greek, and means shape, or form. An isomorphism is a function something that tells us that two things are isomorph, which means they're basically the same, or at least indistinguishable when considering their properties.


So, for two sets, being "the same thing", would mean having the same properties. The only property a set have is its cardinality, so for two sets to be considered equivalent, they need only to have the same cardinality. 


To compare the cardinality of two things, we actually have a pretty nice way: we create a function between these two things, and we try to give it certain properties.


A function at its core is a pretty simple thing: it takes something from set X, and associate it something else from set Y. You can see it as an arrow, pointing out from each element of X and arriving on elements on Y.


The first property is that we want to try and make it injective, this means that two distinct elements from set X are associated to two distinct elements of set Y.


The second property is that we want it to be surjective, it means that EVERY elements of set Y is reached by an element of set X.


If a function qualify for these two properties, it will be called bijective. Which basically means that every point of Y is reached, and that no two points of X are connected to the same point in Y. Or said differentely, that we have a one-to-one correspondance.


And because a drawing is worth a hundred words, here's a cool image I found on wikipedia:







The first one is surjective because every element of set Y is reached, but not injective because the first two elements of set X reach the element of Y.


The second one is injective (every element of X is connected to a different element of Y), but not surjective, because some elements of Y aren't reached.


The last one is indeed bijective: each element of Y is reached, and no two elements of X are associated to the same thing.


Already we can see that when it comes to finite set, having the same cardinality is indeed the same as being able to link each element of X to an element of Y in a manner that no two elements are linked to the same thing.


So for sets, being isomorph actually mean having a bijection between the two sets.


Now let's just expand that to our infinite sets and see how that works... And we'll (FINALLY) get some funny results !


Let X be the set of all positive integers.

Let Y be the set of all even positive integers.

Take your bets now, will one be bigger ? If so, which ? Will they be the same size ? The suspense is killer.


Well, to see that let's try and make a function that goes from X to Y, and be subjective.


The answer is actually pretty easy: the function f will be the function that, for each element of X, associate two times this element... So :

0 will give 0
1 will give 2
2 will give 4
3 will give 6
and so on...

Our function is indeed injective: if you take two integers and multiply each by two, the only way you get the same result is if the two integers were equals to begin with.

It is also surjective: if you take an element y from the set Y, you can find an element x in X such as f(x) = y. Namely, x = y/2.
So it is injective and surjective, thus bijective, these two sets are actually of the same size. Which means there are as many *even* integers than there are positive integers.



But that doesn't really answer my original question: can there be an infinity "bigger" than the other one ? Right now we've managed to split an infinity in two, and still have the same infinity... And yet, the answer is yes, it's not that easy to prove though. But what we're actually able to prove is that there exists an infinity of infinities. Try and wrap your brain around that. If someone's interested, I could try making a small post about it, but that might get really technical.


Basically, the set of all integers is the smallest infinity there is, it's what we call countable. So if you have an infinite set containing only integers, you already know its cardinality: it will be a countable set, and will have the same cardinality as the set of all integers. Strange, isn't ? You have an infinity of integers, you take an infinity away (in our example, all odds numbers), and yet you can be left with the same infinity you started with. How is that not wonderful ?


Still, an example of set of a "bigger infinity" would simply be what we call the set of real numbers, which is basically any number you can think of, and where you'll find strange numbers such as pi.



And if it makes you feel better, one of the biggest name in this kind of thing was Georg Cantor, and he died crazy, so don't feel bad if you don't get it all on first read. Some of these concepts aren't necessarily easy to grasp.


My point with this post was to show that maths aren't about numbers, we've barely used them here, and really about a vision of the mind. You begin by visualising a simple thing (a thing containing stuff), and then you just kick it up a notch by giving it a name, properties, a definition, and working out from there: how can you compare two items, what are their properties, and so on... 


I am very familiar with each of these concepts because, well, that's kind of what I do, but it's totally normal to feel overwhelmed the first time, and to mix everything up. Just take it slow, one step at the time, and I hope you'll be all right !


Anyway, this was my first attempt at talking things maths, so tell me how that worked out for you ! Was it too technical ? Too superficial ? Too explain-y ?

No comments:

Post a Comment