2+2 = 1? Patterns in Modular arithmetic

November 20, 2011

When someone is talking about the absolute truth of mathematics and declares that once you have defined 2 and +, then 2+2 must equal 4, there is a slightly glib response:

but 2+2 = 1…Mod 3

Despite this surprise, we actually all use modular arithmetic regularly, quite literally on a daily basis. When we consider six hours after 8am, the answer is not 14, but 2pm. Well you could argue for using a 24 hour clock, but no one would claim that 3am on a Tuesday morning is really 27:00 on Monday (well apparently some do, thanks to kuromagi on reddit for ref) In these cases we are not counting as we usually do, but counting on a circle mod 12 or 24. It is not hard to see that we could do this with other numbers. if we do decide that 2+1 is 0, and not 3 we are now working mod 3. In this case 2+2 is 1, as is 2*2. We can put together a small table:

+ 0 1 2
0 0 1 2
1 1 2 0
2 2 0 1

Showing what happens when the values for the column and row are added together. We can make the same table for multiplication:

x 0 1 2
0 0 0 0
1 0 1 2
2 0 2 1

I have to admit these table are a little boring, we can make things more interesting by replacing the numbers by colours. As we are working with modular arithmetic we know that the range of numbers we will come across, lies between 0 and the value we are using for modulus, so we can map these onto some circle of colours. So work mod 151 we get a new table for addition:

Using the same system of colours we can do the same thing for multiplication:

Which is starting to get interesting. We do not need to stop there, we can produce an image where the row number is taken to the power of the column:

This looks a little jumbled, in fact it seems to have very little structure at all. This is not very useful if our goal is to make pretty images, and on this blog that is normally the goal, but it other areas it turns out to be incredibly useful. The process of modular exponentiation is an essential part of public key cryptography, one of the technologies that allows secure communication over the internet. The jumble and lack of pattern that we can see is a sign that modular exponentiation is a good method to use to jumble things up. if there were structure that could be used to help decrypt the messages!

Returning to images, lets make a big version of the multiplication image, mod 1583 (you need to click it to get the full effect, scaling the image down blurs out a lot of structure):

Another option is to make an animation. what happens as we move the modulus value:

There is plenty to study in these images, for example, the curves that can be seen are approximately hyperbolae as they occur when x*y is some fixed value. The central star point occurs in the middle of the image, and there are further stars at 1/3, 2/3, 1/4, 3/4 etc. Can you work out why?

The appearance of hyperbolae perhaps implies that other curves might be possible. What happens if we consider x^2 + y^2? An obvious guess from this formula would be circles and we indeed get (for 151):

Playing around a little further this image comes from x^2 - y^2 +3 x y:

These images are certainly worth repeating for 1583 (again the details get blurred out, so click the images to see the full detail):

To finish let us consider something even simpler. Taking the value of a square to be \frac{x \mod y}{y} this will always give a value between 0 and 1. We can then colour again, and animate with \frac{x \mod Q y}{y} and Q going from 5 to 0:

I first came across these patterns in the December Issue of notices of the AMS, I have always been surprised how little they have been explored. This post is my attempt to do a little to correct that.


Hyperboloid lighting

November 6, 2011

The hyperboloid of one sheet is a fascinating shape that turns up in many places. It was therefore a great example to take for a test of thearender which I recently purchased. This shows off its double ruled nature:


Don Quixote tilts at Zeta functions

October 11, 2011

A friend of mine, Rohit Gupta (@fadesingh) has been doing some of the most creative mathematics communication out there. Using myths, stories, puzzles and poetry he has been making deep questions of mathematics accessible to others in online workshops and now a newspaper column in India. He is about to start a crazy and fascinating project, taking on possibly the greatest challenge of modern mathematics, the Riemann Hypothesis, which plunges the depths of the mysterious structure of the prime numbers. This would be an ambitious project for a group of mathematicians to take on. Current wisdom is probably that there are not even realistic routes to solve the problem. For a group with little or no mathematical training it is just crazy. That is what I love about the project.

Regular readers of this blog will know that I am a fan of impossible quests, and this one comes damn close. In the classic tradition of Don Quixote (which even mentions prime numbers) the value of a quest lies in the seeking, not the goal. Why should the privilege of failing to prove the Riemann Hypothesis be reserved to mathematicians? At worst a group of people will learn a lot, just getting an idea of the prime number theorem, or a clue about what a zeta function even is, is already an achievement. Can that be bad?

Even better the project emphasises that whatever your philosophy of mathematics, its actual study is a very human process. Baring some fairly extreme situations, if the Riemann Hypothesis is proved it will be by humans. Possible special and weird humans, but humans nonetheless. Just as the problem itself was discovered/dreamt up/found by one. Changing the perception of mathematicians as priests with almost magical abilities, to smart, professionals who have been through a tough training again cannot be a bad thing.

I am therefore proud to be part of this project, and see my role as that of Sancho Panza, sometimes bringing the flights of fancy down to earth, but increasingly fascinated and invested in the quest and where it might lead.

Of course it doesn’t hurt that the first stage of the project is playing with quasi-crystals, which have been a large part of my research life.


Magnetic Klein Quartic

October 2, 2011

The Klein Quartic is a absolutely fascinating object and worthy of a post in its own right, or even a book. It is clear evidence of the explosion of imagination and creativity in geometry that was taking place in the nineteenth century, as it cut its ties to the “real world”. Since then it has turned up all over mathematics.

One way to consider the Klein quartic is as a generalisation of a regular polyhedron. The tetrahedron has three equilateral triangles meeting at each corner, the cube has three squares and the dodecahedron three pentagons. Three hexagons gives a tiling of the plane. Why stop there? What about three regular heptagons? There are important reasons why this does not work in a simple manner. By playing fast and loose with what we mean by “regular heptagon” however we can do something. One object we can make is the Klein quartic. It does not produce something like a sphere, as the tetrahedron, cube and dodecahedron do, instead it is more like a pretzel with three holes.

Combining these ideas with little spherical magnets, we can make a model of the Klein Quartic. To do this we obviously have to start by making a heptagon

You start with a ring of seven balls, then put another ring of 14 balls around it. Note as this happens the heptagon buckles into a saddle shape. This is because the balls naturally create angles of 120˚ at the corners. As we move round the shape therefore we turn through a total of 7*120 = 480˚, this is greater than 360˚. We say the resulting surface has negative Gaussian curvature. We may also consider the length of the second loop. It is roughly distance 2 from the centre of our shape, yet it has length 14. If it were a circle of radius 2 the circumference would be 2*2π, which is less than 14.

Two of these heptagons can fit together on an edge:

For fans of Indra’s pearls and sphere reflections the balls make a pretty pattern.


As the angle at the corner is 120˚ three will fit round a corner:

We could now continue this, bringing three heptagons together at each corner, but we want to create the finite object. Next attach an additional heptagon to each of the outer three:

Now connect the three outside heptagons together. to make a surface with three holes:

You need to repeat this four times, using a total of 24 heptagons. As you make them, be careful of one thing, the magnets line up so that you get  all N poles on one side of the surface and all S on the other. As you connect each surface, therefore, make sure that it agrees with the others:

When you have all four, put one at the center and then connect the others to each of its four holes

To finish, technically we should connect up the remaining six holes so each branch is connected to both the others. The resulting shape has three heptagons meeting at every corner, and a wonderful collection of symmetries many of which cannot be easily seen in this model, or any model in 3d!

Just for kicks, lets finish with the work of one of Klein’s contemporaries a Möbius strip:


Follow

Get every new post delivered to your Inbox.

Join 213 other followers