# What, like arithmetic in modules?

Not exactly. The "modular" part comes from the word *modulo* (from the Latin meaning "with the measure"). That doesn't explain much, does it? OK, the idea is that we do normal arithmetic with the integers (..., -1, 0, 1, 2, ...) but instead of having a "number line" that stretches to infinity in both directions, we let it wrap around in a circle. It's because of this that modular arithmetic is sometimes called clock arithmetic. So 6 + 7 isn't 13 on a clock, it's 1. Similarly, modulo 5, 4 + 3 = 2.

# Alright, so what's it good for?

Well, part of the joy is, most things you can do to a normal equation, you can do to a modular equation. You can add, subtract, multiply and raise to powers. You can even divide, as long as the modulus is prime (see Noether's writeup here for a proof, etc.). However, many quantities simplify greatly in modular form, and this lets us prove many rather nifty things. For example, we can tell that no two square numbers differ by, say 102. How, you say? Well, any number can be written as either 2n or 2n + 1 (it's either even or odd). So let's square these and look at them modulo 4.

(2n)^{2} = 4n^{2} = 0 (mod 4)

(2n + 1)^{2} = 4n^{2} + 4n + 1 = 1 (mod 4)

So we now see that any square is equal to either 0 or 1 modulo 4. So the difference between two of them must be -1, 0 or 1 modulo 4. But 102 = 4 x 25 + 2 = 2 (mod 4). So 102 can't be the difference of two squares.

# This sounds like mathematician "useful", not *real* useful

Yes, sorry, it does. However, modular arithmetic is a starting point for a huge branch of mathematics called number theory. This is the branch of maths with all those weird problems like Fermat's Last Theorem, the Goldbach Conjecture and the Riemann Hypothesis. However, in recent years, it's become very important in cryptography. Systems like RSA are based on modular arithmetic. In fact, this is the canonical example of a "useful" bit of pure maths. So there you go.

This has been part of the Maths for the masses project