How does Modular Arithmetic work?

The latest question from Tom Rocks Maths and I Love Mathematics sent in and voted for by YOU.

To vote for the next question that you want answered remember to ‘like’ my Facebook page here.

Featured post

Equations Stripped: Maxwell’s Equations

Stripping back some of the most important equations in maths layer-by-layer so that everyone can understand… This time it’s the turn of Maxwell’s Equations of Electromagnetism – they gave us the electromagnetic spectrum and showed once and for all that light is a wave.

Featured post

BBC News – Maryam Mirzakhani’s Legacy

Live interview on BBC News about the legacy of Iranian Mathematician Maryam Mirzakhani who tragically passed away today (July 15th 2017). She was the first female winner of the Field’s Medal – the mathematical equivalent of the Nobel Prize.

Featured post

Naked Maths Trailer

Naked Maths is finally here!

Here’s the trailer for the new video series I’m making with the Naked Scientists taking a look at the maths that’s all around us.


Featured post

Funbers 13, 14 and 15

I’m looking at numbers more closely than anyone really should to tell you the fun facts that you didn’t realise you’ve always wanted to know…


The unluckiest number on the planet? Friday 13th, buildings without floor 13, airplanes without row 13, sports teams with no number 13… The Far East may have something to say about that. In many languages the number 4 sounds like ‘death’ – a little scarier I’d say – which is why there’s no gate 4 or gate 44 at Inchon Airport in Seoul, South Korea. Thirteen does, however, have an entire psychological condition named after it: triskaidekaphobia – the fear of the number 13. Apparently the condition costs the US economy millions of dollars each year from absenteeism and cancellations.

So why is the number 13 unlucky then? It makes sense to fear the number 4 if it sounds like ‘death’, but thirteen sounds more like ‘curtain’ if you say it over and over again (or at least it does to me) and I think it’s fair to say curtains are possibly one of the least scary things on the planet. Unless of course there’s a masked murdered hiding behind them…

There is of course no scientific evidence behind the fear of 13, but there are a few sort-of-possibly-maybe believable explanations. Some of my favourites include: there were 13 people at the Last Supper, traditionally there were 13 steps to the gallows and 13 is roughly the age children start to misbehave as they hit puberty. It’d be easier to believe it if just sounded like something a little scarier than ‘curtain’…


A very popular number in the Bible, whether its 14 rains, 14 lambs, 14 plagues, 14 rams, 14 cubits or my personal favourite 14 wives, the Holy Book loves a reference to the number 14. These days it’s mostly associated with love thanks to good old St. Valentine. He was a Roman saint from back in the 3rd century and we don’t know much else about him. True to sucking-the-fun-out-everything form, the Catholic Church even removed him from the General Roman Calendar in 1969, though they at least do continue to recognise him as a saint. In my head he was some kind of Casanova meets Gene Simmons womaniser – though I dread to think what that would mean he would have looked like…

KISS perform live at Allphones Arena Casanova_ritratto.jpg


Fifteen seems to have more fun facts associated with it than most other double digit numbers – why is anyone’s guess. It is particularly popular amongst the more philosophical members of society and can be found in all of the following quotes:

“After 15 minutes nobody looks at a rainbow” Johann Wolfgang von Goethe, Playwright

“I have drunk since I was 15 and nothing gives me more pleasure” Ernest Hemingway

“In the future everyone will be world-famous for 15 minutes” Andy Warhol

“A revolution only lasts 15 years, a period which coincides with the effectiveness of a generation” Jose Ortega y Gasset, Philosopher

“15 men on a dead man’s chest, yo-ho-ho and a bottle of rum” Jack Sparrow (amongst others)

Fifteen is also a big deal in the world of maths, specifically for magic squares. A magic square is a table of numbers where each row, column and diagonal add up to the same total. The simplest example is the 3×3 magic square with each row, column and the two diagonals all adding up to 15. There are a few different ways that you can arrange the numbers 1-9 to make such a magic square, anyone want to hazard a guess as to how many exactly?


Sorry it was a trick, there are only 8 (assuming you thought I meant 15). There is only one pattern that will allow all of the rows, columns and diagonals to add up to 15 and then you make the other 7 by reflecting and rotating the original. Here’s how it works:

  1. To start with put 5 in the centre.
  2. Next put the even numbers in the four corners. You have four choices for the first corner (2, 4, 6 and 8) and once selected this then fixes the opposite corner in order to make the diagonal add up to 15.
  3. This leaves two even numbers for each of the two remaining corners. Once you select one then the other is filled automatically.
  4. Finally, the odd numbers are placed in the four remaining spaces to make each row and column add up to 15. There is only one way to do this.

Looking back, we see that there are four choices initially for the first corner (b), and then two more for the third corner (c) which gives a total of 4 x 2 = 8 choices altogether. You can also take the example square shown above and then rotate it 4 times by 90 degrees, as well as doing a reflection of each one to get the 8 different possibilities. Give it a try and see how you get on!

And just to leave you all with a sobering thought, 15 seconds is believed to be the average time that an employer will spend looking at an applicant’s CV… now where’s that rum?

Our Hairy Insides

How hairy are you? Whether you have hairs growing in all kinds of weird and wonderful places or prefer the smooth and supple look of a Greek statue, I can tell you now that you are hairier than you might think… Live interview with BBC Radio Cambridgeshire.

Navier-Stokes: one equation to rule them all

Interview by Tom for the Naked Scientists on the Navier-Stokes equations – one of the remaining six unsolved Millennium Problems. You can listen to the audio here.

A leading Millenium Prize Problem is the Navier-Stokes equation, which, if solved, could model the flow of any fluid – that means how airplanes navigate the skies, how  water meanders in a river and how the flow of blood courses through your blood vessels… Understanding these equations in more detail will lead to scientific advances in all of these fields: better aircraft design, improved flood defences, and better drug delivery in the body. Fluids expert and mathematician Keith Moffatt took Tom Crawford down to the deep dark depths of Cambridge’s maths lab…

Tom – We’ve just gone underground and we’re stood outside a lab called the Goldstein Lab. It kind of reminds of a secret lair of either a superhero or maybe a super-villain. There are all kinds of complicated looking devices, cameras everywhere, all kinds of equipment and wires coming out of things. So these equations, the Navier-Stokes equations, they are a set of mathematical equations that model the flow of any fluid. That could be air, water, even blood in the body perhaps?

Keith – Yes, that is correct. For the vast majority of fluids particularly air and water, the equations are based on Newton’s Laws, so they’re very classical. They were first written down in the 19th century and they’re highly mathematical in structure.

Tom – So, if we have these equations that model the flow of all of these different kinds of fluids then why is this a millennium problem?

Keith – It is an unsolved problem although many people have tried. There’s question of whether solutions of the famous Navier-Stokes equations can or cannot become infinite. You might say it’s a problem that you might throw the computer at. We’ve got extremely powerful computers nowadays, but a computer can never tell you whether a solution actually is going to infinity. A computer programme will always break down before the singularity is reached.

Tom – When I think of singularities, I’m thinking of the Big Bang or a black hole in space. What exactly do you mean by singularity here?

Keith – Well, singularity in general means that you have a system of equations in which one of the variables, any one, may go to infinity.

Tom – Do we have any examples with fluids that exhibit this singularity behaviour?

Keith – The singularity may occur most simply through a consideration of the problem of two tornado-like vortices. If these are forced together, then they go through a process of what’s called “Vortex Reconnection”. It’s a very complex process because each vortex tries to wind around the other. The spatial structure becomes very complex. So the question is, can it become infinitely complex.

Tom – How close are we to actually understanding this problem? How far away is the solution?

Keith – 30 years.

Tom – I’ll hold you to that.

You can read more about the Navier-Stokes equations and all of the Millennium Problems here.

Pokémaths: how many daily calories does a Charizard need?

If you’re like me and you’ve always wished that Pokémon were real, no doubt you’ve dreamt of having one of your very own as a pet. I don’t really like pets, they look like a lot of effort and stop you doing fun things like going on holiday, but if I could have a Charizard living in my backyard, well now that’s a whole new ball game…

Let’s suppose that is exactly the case – you have a pet Charizard living in your garden. For those of you unfamiliar with Charizard, think fire-breathing dragon and you’ve pretty much nailed it. As with all pets (I assume) you have to think about how much food to feed them, or more specifically how many calories does your pet need in order to survive. An average sized dog needs around 800 calories per day, whilst cats are a little smaller and so only need about 300. So as with most things in life, size matters, which brings us back to our fire-breathing dragon…


Game of Thrones fans a word of warning: dragons aren’t all as big as the ones belonging to Daenerys. The main one Drogon is often pictured as being at least ten metres tall and weighing as much as a small house, but that is not the case with Charizard. Pokémon tend to be much smaller than you might think and according to the official Pokédex an average Charizard stands at 1.7 metres tall and weighs in at 90 kilograms. I don’t know if this was on purpose but that is almost exactly the same as the average height and weight for a male human. The recommended daily intake of calories for such a male is 2500 per day, which gives us a good starting point for our pet Charizard. But, we also need to think about fire.


A fire needs three key ingredients to burn successfully: fuel, heat and oxygen (see fire triangle above). If any of the three are missing, then the fire will go out (this is why it’s called the ‘fire triangle’, as without one of its sides a triangle is no longer a shape). Charizard has a flame burning on its tail that is said to grow hotter with increased battle experience. We can safely assume that the tail flame is getting its supply of oxygen from the atmosphere, which contains 21% of the gas. The majority (78%) of the air is nitrogen plus a few other bits and pieces such as unreactive argon (0.93%) and the big baddie carbon dioxide at what seems a measly 0.04%, but is still enough to heat up our planet.

That’s the oxygen taken care of, now what about the heat? Well Charizard is probably quite a warm creature, especially with all of this fire-breathing going on, so it’s probably safe to say that the heat comes from its body. That just leaves the fuel – it has to burn something to be able to produce fire. The most likely culprit is to burn its food, i.e. calories. A calorie by definition is approximately the amount of energy required to raise the temperature of one gram of water by one degree Celsius at a pressure of one atmosphere. Just to be super confusing, the calories we talk about with food are actually kilogram calories and are equal to 1000 of the little ones. This is why calorie content on food labels is often given in both units of kcal and cal, though not always (again just to be super confusing).

If we assume that the flame on Charizard’s tail burns similar to a lab Bunsen burner (a reasonable assumption I feel), then it will generate a power of around 1 kilowatt. Therefore, in order to burn for 24 hours, it requires 24 kilowatt hours of energy – a kilowatt hour is just the amount of power in kilowatts times the length of time it is produced for in hours. We know that 1 food calorie is equal to 0.00162 kilowatt hours (thanks Wikipedia) and so the number of calories required to power the flame on the tail of a Charizard is


Just to clarify this is the big food-based calorie, which means a LOT of food for your fire-breathing pet dragon. Even with a conservative estimate, a Charizard is going to need to eat as much food as 6 fully grown men to be able to keep it active for just one day. Maybe I was right and pets aren’t such a good idea after all – especially the ones that breathe fire…



Perelman and the Poincaré Conjecture

Interview with maths communicator Katie Steckles for the Naked Scientists. You can listen to the audio here.

Grigori Perelman is a quiet unassuming mathematician from Russia, who took the world of maths by storm in 2010 when he not only solved the Poincare problem but then refused the $1 million reward! Tom Crawford went along to the Millennium Bridge in London to meet mathematician Katie Steckles to shed some light on Perelman’s story and to find out why the Millennium Bridge was in fact its own millennium maths problem…

Katie – Turns out when this first opened, you might remember that there was some issues with it being wobbly. They’d forgotten to take into account something called resonance, resonant frequencies, and each object has its own resonant frequency and it just happened that the frequency that the bridge like to resonate at best was about the same as the frequency of people walking. So they had to close the bridge and they put in some kind of dampening supports to stop it from doing that, but it’s still a little bit wobbly. I think most suspension bridges are anyway, so it’s fine.

Tom – It’s quite windy today, but I’m feeling quite safe underfoot. Which of the Millennium Problems are we looking at today?

Katie – The Poincare Conjecture which is the first of the Millennium Prize Problems to actually get solved and I’m especially excited because it’s in the area of maths that I studied which is topology.

Tom – The main thing I remember about the very minimal topology I’ve done is that a donut and a teacup are the same thing mathematically.

Katie – That’s true. So, there’s basically a concept in topology where you can consider things to be equivalent if you can get from one to the other by doing a smooth change. So, if you have something made out of blue tack or something you can squidge around, if you can take one and deform it into the other one, but in a kind of very gradual way, you will consider those two things to be equivalent. And you can take a donut made out of plasticine and then squidge it around into a cup made out of plasticine. That’s why there is this joke about, you call a topologist when you can’t tell the difference between his donut and his cup of tea. It’s interesting how the typology view of things interacts what the real world view sometimes, things that you wouldn’t expect to be able to do, you can do. So, I can be wearing a waistcoat, take the waistcoat off, turn it inside out and put it back on the other way around while my hands are handcuffed together.

Tom – So, Katie has got her waistcoat on and now, she’s attaching the handcuffs, voluntarily, I’d like to add. Handcuffs are on, waistcoat is on, let’s see what you can do. And it’s beautiful. It’s all inside out. It looks great as well. It’s covered in stars. We’ve got someone clapping as they walk past us.

What Katie’s handcuff waistcoat trick has shown us is how simplifying shapes down to their basic structure allows us to see them in a different light and perhaps do new things with them that we previously would’ve thought impossible. In some sense, this is what the Poincare Conjecture is all about. The conjecture states that any shape satisfying a set of three conditions can be deformed into a sphere. I know this sounds a little abstract but just bear with me. Any shape that is smooth, finite, and without any holes can be deformed into a sphere. For example, Maths says I can squash a banana into an orange. This not only holds true in 3-dimensions, but in higher dimensions as well. Like there are other dimensions that we can’t see such as time, in maths there are in fact an infinite number of dimensions. The Poincare Conjecture had been shown to be true in every dimension except the fourth and proving this was the Millennium Problem. I say ‘was’ because as Katie mentioned earlier, it has now been solved by a man called Grigori Perelman.

Katie – Perelman was from Russia. He was a fantastic mathematician and he started working on this particular problem in about 1995. So, before it even became a Millennium Prize problem and it was in 2002, he basically put up what he’d done on the internet. Perelman didn’t even publish it. He didn’t even submit it to a journal. He just put it on the internet. It was kind of a bit out of nowhere so it was a really exciting time. It became a really, really big story.

Tom – So, I guess the big question is, what did he do with his prize money?

Katie – Well, that’s the interesting thing because Perelman didn’t actually want a million dollars and it’s one of those things that kind of the official line is that he didn’t want the publicity, didn’t want a massive change in his lifestyle. But it turns out, the best way to get loads of media attention is to refuse a million dollar prize. So, that kind of backfired for him. It’s one of those weird stories because he’s so reluctant to do any press about it, talk to people, but he is such a giant of mathematics and I’m really glad he’s proved it because that means typology has almost won the Millennium Prize race. I guess we got the first one in.

Up ↑