Tuesday, 29 March 2011

Imaginary Numbers

When you first begin studying mathematics you are taught that only positive numbers can be square rooted, and this is true for conventional mathematics and it is not too often that you need to square root a negative number; but what if it does arise? How would that even happen?

Well, usually you never really need to square root a negative number. But when plotting quadratic graphs it is always a possibility that the square root of a negative may come up.

You may remember that if b²-4ac < 0 then the quadratic has no real roots, emphasis on the word no real roots. A quadratic equation will always have roots, just imaginary numbers will be involved if b²-4ac < 0.

But what is an imaginary number? It is denoted by the character i and this is representative of -1. Like all square roots, -1 has two answers, ±i.

So say, for example we had a quadratic equation where b²-4ac < 0. We could, in fact, solve it. If we had a quadratic equation, 3x²+8x+11=0 we could solve this by completing the square or using the formula, I prefer to complete the square but you would get the same outcome regardless:

If you do not understand this, do not panic! Simply submit a
comment and I will respond, explaining how to do this using
other methods.
Okay, it allows you to discover solutions to previously impossible quadratics, big woop? Well, imaginary numbers are in fact incredibly important! The Schrödinger Equation (the fundamental equation in quantum mechanics) using imaginary numbers. 

The Schrodinger Equation

Engineers also using imaginary numbers as a way to view "phase", this is however denoted by 'j' as 'I' is used for current. Potential energy is also necessary to be seen when carrying out these calculations, this creates a complex number in the form, a+bi, where 'a' and 'b' are integers and 'i' (or 'j'!) is an imaginary number.

But how are complex numbers represented? They are represented as numbers on a complex plane, with the x-axis being the real axis and the y-axis being the imaginary axis. It is rare that you would find an imaginary number used on its own, it will often be in partnership with another, regular number, as a complex number.
The representation of a complex
 number on a complex plane.
Imaginary Number Facts:
  • You can in fact do xi, it isn't the easiest thing to do, but it is perfectly possible and you will be able to it after a little bit of practice, for the whole breakdown on why please visit my newer blog post: imaginary exponents.
  • Another noteworthy idea is that an imaginary number can also be square rooted! These are roughly (0.707106+0.707106i) and (-0.707106-0.707106i), or as a fraction (1/√2)(1/i) and (-1/√2)(1/i). Try to square them, you will see it works.
  • Imaginary numbers follow a pattern when put to differing powers, this pattern goes: 1, i, -1, -i. You can find out what ix is simply by checking what the remainder is when x is divided by 4. If the remainder is equal to 0 then it will equal i. If it has a remainder of 1 then the answer will be 1, remainder 2 will equal -1 and finally a remainder of 3 will be -i.

Monday, 28 March 2011

Maths and the Real World

"Go deep down into anything and you will find mathematics" - Dean Schlicter

Often a lot of students who first begin algebra or quadratic equations fail to see how this has any implications on the real world. The aim of secondary school seems less to inform about the uses and necessities of mathematics and more on driving the knowledge into your head.

But maths in all its bewildering complexity and brute simplicity is all around us whether we choose to acknowledge it or not. Science is all compromised from formulas and predictions, all of which is algebra. Some of the greatest and most eloquent works in science are equations.

The basis of quantum mechanics, the Schrödinger Equation,  is a relatively complex form of algebra involving constants and variables to plot possible points at which a particle can be at. Almost the entirety of mechanics relies on inputting numbers to calculate forces and other movements. And engineering is virtually completely maths. The importance of algebra is clear for all to know.
Obviously this is incredibly advanced and I do not want
you to focus too much on the content and meaning of the
equation, more on the algebra behind it and how this can
be used, regardless of the difficulty level
However, my love for maths does not come from number crunching. Altering one number into another via some function, is of course the most obvious way in which maths is related to everything, but it is not the beautiful way.

Bertrand Russell famously said that: "Mathematics, rightly viewed, possesses not only truth, but supreme beauty". And the majesty that maths holds can be represented by the elegance of space. Space is perhaps one of the only ways to think of infinity, the size of which we can currently see is 46 billion years, or around 45,000,000,000,000,000,000,000,000 kilometres in radius. Estimates of planet sizes, dark matter and even black holes; all are only possible with maths and how it is implied to the real world and the universe.

Nature also likes to throw in a little bit of maths occasionally, times of the year when animals hibernate and mate are often prime years as they're harder to predict because of a lack of a pattern. The fibonacci spiral is seen in many natural phenomena, as well as perfect shapes occurring regularly.
The fibonacci spiral is seen in many shells, the stretch that
maths has really has no limit

I will also do a future post discussing the economy, how it works and how maths is applied to that.

Thursday, 24 March 2011

Python: Interaction and Variables

The majority of programs require some form of question and answer based interaction. And in Python it is a must know, it is also very easy to get to grips with too.

All variables have to be defined so they can be called up at a later stage in your program, this itself is not overly useful (other than perhaps when a large variable consistently comes up, like Pi).

This is no different with variables that need interaction. It is used so that whatever value the user inputs can be called up at a later point, makes sense right? There are only two main things you need to remember when setting interactive variables is whether the answer you want will be numerical or text based.
name = raw_input ("What is your name? ")
age = input ("How old are you? ")
The key differences here are 'raw_input' and 'input'. You use 'raw_input' for text based data and 'input' for numerical data, easy. The name is just what you apply to the variable that you use when you call it up, just remember that once the user inputs a name to this interactive variable it will not automatically be displayed, in order to do that you must print their variable, my example should make more sense.
name = raw_input ("What is your name? ")
age = input ("How old are you? ")
print "Hello,", name, age, "is a great age!"
This small program would look like this when ran:
What is your name? Mersenne
How old are you? 16
Hello, Mersenne 16 is a great age!
Remember how that if you want to show the solution to a mathematical problem you separate the problem with a comma? Well that's the same with variables you have defined, if you can remember these few simple rules you can begin to create more complex programs that involve user interaction.

Sunday, 20 March 2011

Python: Mathematical Terminology

This will be my first actual "mini-python" lesson, I'm going to assume you've read my previous post on Python, if you haven't please read it: an introduction to Python. Got everything you need downloaded? Then I'll begin.

Again this is just going to cover the absolute basics, but they are incredibly vital to know. Maths is the core behind the majority of programs, regardless of what you want to program you're bound to come across maths at some point when programming (especially with my posts, seeing as I am mathematical nerd).

Most of the mathematical characters are fairly obvious; "*" meaning times, "+" meaning add, "-" meaning minus, "/" meaning divide and "=" meaning equals. Some of the less obvious ones are to the power of, "**" and to show the remainder when divided is "%". But once you can remember these it's very easy to apply these.

Another important thing to remember is that if you want to 'print' the answer to mathematical you do not use quotes, if you just want to show the expression you do.
print "2 + 2 =", 2+2
Will show:
2 + 2 = 4
Simple right? Just remember to separate the different strings you want to print with a comma. Now let's create a basic program using these concepts.
print "The area of a circle with radius 15 is", 3.142 * 15**2
That would show:
The area of a circle with radius 15 is 706.85834715
Try this out with different numbers, expressions and signs. Only through doing this yourself will you begin learning. In the next lesson I will bring in variables and begin coding a small working program where the user inputs data.

Saturday, 19 March 2011

An introduction to Python

Now, I am by no means adept at python; far from it in fact. I have attempted to learn many programming languages several times, all end within a couple of days and finish up with me not wanting to touch another programming language again. But I got to thinking, I need to regularly update my blog and need ideas on what to do each post on. So I thought, I will update as a go along with mini lessons that should hopefully inspire and help people who are first beginning to code in Python.

Why Python first of all? Well, it is one of the simpler first languages to learn that is actually used by large corporations (one of the most notable are Walt Disney). It isn't exactly too complex to begin with and has a steady difficulty curve. And an added bonus? It's very mathematical!

The first thing you need to do really is download Python. The current version (as of 19th March 2011) is 3.2, but the majority of what I will discuss is from the 2.x versions, however they are not too different and the 3.x versions is basically just cleaned up from 2.x versions. However 2.x has a far greater library support, meaning custom variables that other people have created are much more readily available.

Download Python here. Another download that you may want is Notepad++ the amount of languages it recognises is pretty phenomenal; from HTML to Python and everything in between. If you'd like this brilliant open source software go here.

Once you've downloaded all of these we'll start you off with your first lesson. I will begin by introducing probably the most important command in Python, it's incredibly simple but is used to display any text.

"Hello world!" is the absolute must as it goes for starter programs, so that's what we'll do.
print "Hello world!"
When the program is ran it shows:
Hello world! 
 And that's it. Things to take note of are; the print command and the quotes. Any string of text has to have quotes surrounding it, else it does not make sense. And the print command has to come before any text you want to be "printed". And that's it for now, but the next lesson will be far more technical.

Wednesday, 16 March 2011


Now, undoubtedly you would have heard of Google, in fact there's a high chance you use Google for the majority of your daily activities on the web. They own: Google Mail (duh!), YouTube and Google Documents. These are enough to maintain the average users internet usage in a day.

Google has to deal with upwards of 7 billion hits every, single day and that equates to 20 petabytes of data processed everyday. How big is a petabyte? Over one million gigabytes. 50 petabytes would cover the entire written works of mankind in recorded history, in all languages. That should give you a brief glimpse into the enormity that is Google.

A company that in 2009 made over $6,000,000,000 in profit. A company that allows its employees to have 20% of its working day to be used to work on projects they enjoy. It's proved to be a rather resounding success with newer services such as Google Mail, Google News, Orkut and AdSense originating from the 20% of "free time". The most successful internet business in the world and it's amazing to it's employees, that is surely a business model that all companies should adopt.

But none of this compares to their business plan, it really is amazing. They make around 99% of their revenue from advertising in the many forms that they offer it. So it would obviously make sense to encourage people to visit places where their adverts are present.

Now what businesses have Google recently bought into and began focusing their attentions on? Double Click,  Android, Google Docs, AdMob and Google Chrome OS. This is just a minute portion of the 90+ companies they have acquired in the last ten years and in recent times has increased rapidly, with 4 companies bought this month (just a fortnight in!).

The biggest acquisition to date was that of Double Click, an advertising application. AdMob, advertising. And the rest encourage cloud computing, driving more visitors online and to Google's products and advertising. This creates greater revenue, and means any competition that Google has needs to constantly improve it's product, whatever happens though people are drove onto the internet and thus they gain revenue. Ingenius.

Tuesday, 15 March 2011

Gold, is it really worth it?

Often thought of as one of the most valuable commodities. Banks have reserves of gold bars because "people will always need gold!", and during the depths of recession the prices of gold have never been so high. But why? Gold really does not have many useful uses, well not ones that would warrant almost £900 for a single bar of bullion.

Surely our modern society should be past the novelty of "ooh look at the shiny, shiny", shouldn't it? Well it appears that it hasn't, at all. Other than being a rare element that has a pretty colour it is essentially just that, rare and pretty. That is what we have to fall back on should our resources evaporate? To me that is just ridiculous.

In the headquarters of a large corporate bank who is searching for a get out clause if the worst case scenario should happen; "should we invest in future fuels, buy Uranium? Or even crude oil? No we'll buy a shiny metal.". That's a pretty odd situation, rather than something that will ultimately be a necessity in every day life we stick with our primordial views in what we idolise for its sheer appearance. I do understand that the bullion was not bought recently. The fact we're not then converting this into more useful commodities or even investing it, although given the banks track record in that I'd rather risk walking into the tiger enclosure dressed in one of Lady Gaga's recent numbers.

The rarity of gold is one of the only things that I can see that it has going for it to increase its worth. If we took, every single piece of gold that has ever been discovered during the entirety of the Earth's history would only fill about 15,000m3 and putting that into context, around three regulation Olympic sized swimming pools. That is minuscule. Of all the 92 elements this is however nowhere near the scarcest on Earth, the rarest naturally occurring element is Astatine. With only 30 grams of it the Earth's crust!

However, rarity without a purpose is surely not something that should warrant such a high price? Well, apparently it is I guess. The price we set on it, yes we set it. We often overlook the fact that everything is worth only what we put on it. £50,000,000 for a footballer, £1.30 per litre of petrol, £900 per bar of gold! These are just ridiculous. Okay the other two have their uses (well, sort of), but gold does not. We really need to start prioritising how we price items, a worthless shiny piece of metal that is only used for decorative purposes and that's one of the most valuable commodities? Sort it out people.

Sunday, 13 March 2011


No, my title is not a spelling error of Google. Googol is a number, a big number, a number that was so large and intriguing it inspired two nerdy University Student to create an easily available to everyone search engine to bring all of the internet to anyone. But talking about Google being awesome is a different article for a different time.

In this article I'm going to discuss the number a googol and a googolplex. Firstly what are they? Well a googol is 10100, that is a one followed by one hundred zeros, or the less catchy title, ten duotrigintillion. Just how big is that then? Well, there is estimated to be about 1.33×1050 atoms in the entire Earth. A googol is almost 1050 as much as this number. Nothing like maths to make you feel tiny and insignificant.

If you think that's large, your head may just explode when you're introduce to a googolplex. A googolplex is 10googol, that is enormous. A one followed by a googol zeros. That is so large it is almost impossible to comprehend. I'll try my best to explain just how mammothly big this number is.

Astronomer Carl Sagan estimated that writing a googolplex would be impossible, why? It would require more space than the known universe can provide. Seriously. There is only about 2.5×1089 elementary particles in the known universe, so even if every particle was a digit, it would still need the observable universe to be about one hundred billion times larger.

But, if you could fit the number into the known universe it would take an unbelievable amount of time to write. If you could write 120 digits a minute, it would take around 1.51×1092 years to finish (almost a googolplex years!). This amount of time is 1082 times the age of the universe. So, I wouldn't really start trying to write it out. There's a high chance, that even if it was possible to write for that period of time, that the entire universe will have inevitably died.

A more nerdy way to try and explain the size of a googolplex is to look at Planck time. Planck time (which I won't go into too much detail now), is the time it takes for light to travel one Planck length in a vaccuum, which is roughly 5.4×10-44, this is unbelievably quick. A googol is larger than the estimated amount of Planck times that have past since the start of the universe (8×1060), so a googolplex is much, much larger than even the smallest measurement of time that has past since the dawn of everything.

There is however a larger number that still has a use, it is known as Graham's number. But that's a different article for a different time. I hope this post has given you a small idea into the enormity Maths can hold.

Saturday, 12 March 2011

Best of the internet

I have strayed off the mathematical path in my last few posts, and this is indeed no different. But I do hope that this will be beneficial, some websites you may know but might not know some of the amazing things these websites can do. The lists will be compromised from the best: games, freeware programs, educational resources and miscellaneous so if you're looking for something specific search for it.


Addicting Games - Some of the best online games from around the around the internet have been collected, hours have and inevitably will be lost to this collection of games.

It is very, very good collaboration of games that are well designed and as the title of the website says, addicting. The website design is faultless and easy to navigate, and there are some handy features. You can add your own games to the website and could gain 'internet fame' from that, but the reviewing system is also very good and allows members of the website to submit their comments.

PlayR - Ever wanted to relive some of the fond memories you have from the countless hours you spent button mashing on your old handheld consoles? Well with this website you can! Fancy taking a nostalgia trip and playing some of the older renditions of Pokémon, Harry Potter, Mario or even Madden? This website allows you to do exactly that.

The collection is huge, the games (from all the ones I've tried) are in perfect working order, the controls are customisable, the layout is perfect and the memories of the giddy excitement some of the games connote is just immense. The only thing I can really say about it is, I was never a huge fan of too many of these games, except Pokémon (-nerd). 8.5/10

Robot Unicorn Attack - A flash game that centres around a robotic unicorn galloping around in a fantasy world with purple grass, rainbows and sparkling dolphins. And it still makes you feel as if you are the manliness person on the face of the Earth.

This deserves a special mention, it's not a website packed to the brim with games. It's better than that. It doesn't have a plot with twists and turns that keep you on your seat until the end. It's better than that. You make up your own storyline, in your head. You don't need other games, this one is enough; I don't think I have spent more time on any other online game. As an added bonus, the soundtrack is fucking banging (pardon my language but that's the only way to say it). 9.9/10

CrimeBloc - This is a text-based online mafia game, and there is a lot of them about on the internet nowadays because they are great time wasters where you can communicate with people from anywhere in the world one minute and be killing them the next.

What sets this game aside from the rest? Well, the game is coded to perfection, the administrators are very active in the community and with updates, some of the casinos you can gamble on are actually better than ones I've seen on actual gambling websites. With promised updates to come (including a multiplayer poker system, and having beta tested it is nothing short of phenomenal), a growing number of users and something that can literally have you coming back for more for months and months, you simply must sign up to this game. 9/10

Top 150 Flash Games - Pretty self explanatory, the collection of the 150 best online flash games from around the internet.

Yeah you can't comment on the games or gain achievements because well it is just an article with a list of games. But you can not help but lose yourself in the sheer enormity of these games and the fun that could be had. However because it is just a blog post, I can not rate it as highly as some of the games on that list deserve. 8/10

Special mentions - XGen Studios, Miniclip, Mousebreaker, Ijji and Kongregate

Freeware Programs

Avast - This is one of the most well known freeware out there, but it needs a mention here nevertheless. With the rise in the amount of people who frequently use the internet, the amount of viruses and hackers that are around has increased almost exponentially. So there is a huge market out there for anti-virus software.

There is a huge market, but the kind developers of Avast offer it to you for free. Not only is it the best free anti-virus software available, but is actually better than a fair few anti-software products that you have to pay for. Most notably McAfee, it is head and shoulders above it. For finding viruses, for the stability of the product, for not shoving stupid little adverts down your throat even though it's free! 9/10.

OpenOffice - This is the closest piece of software on the market that rivals Microsoft Office. In the modern times a lot of work now has to be done on a computer, be that a presentation, a report or mathematical calculations you need office software. But not all of us want to pay a lot of money in order to just do work. Well your prayers are now answered.

This software is quite simply, amazing. If you want to create: text documents, spreadsheets, presentations, databases or even small drawings you can do all of that and more. You can save all the documents in a number of different file types, and the best bit? Because it is open you can get numerous extensions for the different programs which can enhance all of your work. 10/10

Linux Mint - The commonly overlooked OS that is Linux. It used to be the case that you had to be a computer genius to be able to run Linux effectively. With the rise in its popularity and with Linux rapidly having programs released specifically for it as well being released alongside Windows and Mac OS X.

There are hundreds and hundreds of free distros that can provide you with Linux in a brilliant form. But I have chosen this version because it comes ready to use. Many distros require you to install a lot of essentials, but with this you are ready to experience Linux first hand within minutes of installation. Once you are more adept with Linux you can venture into some of the more elegant and more difficult distros (such as: Fedora, Ubuntu Studio and openSUSE). But this as a starter package has to get 8/10.

Miro - Simple ideas are rarely executed very well at all. Miro however is a very simple idea that has been executed with such brilliance. A video and audio player that allows you to subscribe to and download podcasts and other online media. It also allows you to view your own videos that are on your computer.

A beautifully designed piece of software is geared more towards watching videos, and with the sidebar you can quickly switch between videos on your computer, and the central pane allows you to search for and view videos. The reason for placing this in above other media players is the ability to download video from torrents and watch them all within Miro and that id you have to exit a video suddenly it allows you to go back to that video at the same place. 8.9/10

Special mentions - Freeware list, Notepad ++, GIMP and Browser list


Wolfram Alpha - Need some help with your homework? Not certain how to answer a certain problem? Want to know how the population of Papa New Guinea ranks in the world? You can find all of that and much, much more here. The amount of data that Wolfram Alpha can show you about almost anything is simply staggering.

I do not think there is a single computational engine that rivals Wolfram Alpha, the speed it can compute what you enter rivals Google for impressiveness. It can: intergrate; differentiate; give pi to over 10,000 digits; give e to over 10,000 digits; multiply matrices; calculate volumes and areas; plot graphs; factorise; show roots and much more. This is one of the greatest technological advances of the past year. 10/10

Ask a Mathematician - A blog where a mathematician and a physicist openly answer any mathematical questions you have, the posts are very informative and interesting. Incredibly advanced topics are explained in a very manageable and clear way.

I've not seen a single mathematical blog that regularly and openly answers any questions you have as good as this one. An easy to look at and simple design doesn't take anything away from the content, which is of an incredibly high calibre. Questions that are emailed are answered incredibly quickly which ensures you always come back to the blog for more. 8.5/10

Special mentions - Wiki Answers, Yahoo Answers and Maths Revision


Grooveshark - A website that allows you to search and listen to music all for free on the internet. You can search for artists, albums and song title. This all adds to an amazing website.

The design is pretty much perfect, everything is clearly laid out and is very easy to get to grips with. It allows you to discover music where you already know the artist or album name, but you can also go into Groovesharks different stations that automatically directs you to a song of that genre. The ability to upload your own music means the database is constantly growing. 8/10

last.fm - Very similar to Grooveshark in that it's a music streaming website that allows you to discover new music that the intelligent system thinks you'd like.

Yet again a faultless design, that is easy on the eye and very easy to navigate. Where these two sites differ is last.fm starts creating a profile of the types of music you like and randomly chooses music it thinks you'll enjoy, if you don't you can skip the song and it then develops more of an understanding for what you like. I'm never without this open because you've set a profile up you really don't have to do much work at all. 9.5/10

StumbleUpon - You're very unlikely to have never seen this website before. If you haven't prepare to lose hours and hours of your life. Seriously, this is like crack. You simply tick boxes of subjects you think would interest you (and there is a lot of them) press stumble and you're on your way to having no life outside your computer.

If you install the recommended StumbleUpon add-on from FireFox then it is simply a button press away from being thrown onto a site it's sure you'll love. If you like the site, press the thumbs up button, if not thumbs down. This helps to develop a personality that StumbleUpon can then use to find more websites it thinks you'll like. A resounding 10/10, that really doesn't justify the awesomeness of stumble upon.

Special mentions - io9Keyboard Shortcuts and YouTube