Modular arithmetic and functions

Question: find numbers x such that ax=1 (modulo 11) for a=1,2,3,4,5,6,7,8,9,10.

This is an interesting question. The letters have been chosen to suggest that you are solving an equation for x: ax=1.

In normal arithmetic you would instantly say x=1/a, but of course if x has to be an integer then there is no solution.

The Greeks were very enthusiastic about integers, but realised that integers couldn't solve everything and that's how they came across the rationals. However, in modulo arithmetic this equation can have an integer solution, and that is what you find when you answer this question.

Modulo arithmetic features a lot in questions about functions and relations because it is an example of a function which maps from Z, the set of all integers, into a finite set S={0,1,2 .. n-1}.

The interesting thing about the map is that it preserves addition and multiplication, so that you can define these operations on S and they remain consistent. If we call the function m,

m(a) x m(b) = m(ab)

If you want to prove things about numbers mod n one way which will always work is to go back to the domain of normal integers.

If a number is b mod n then it is kn+b for some integer k.

You can also look at the "times table" modulo n. As S is a finite set you can enumerate every possible multiplication. For example, the times table mod 11 is as follows:

012345678910
000000000000
1012345678910
2024681013579
3036914710258
4048159261037
5051049382716
6061728394105
7073106295184
8085210741963
9097531108642
10010987654321

In this table every number has a 1 somewhere in a row and column, and so every number has a multiplicative inverse. These are the numbers that the question is asking you to find. This is not always the case, it depends if the number has a common factor with n.

Another way of thinking about modular arithmetic is as arithmetic in base n (11 in this case) where you keep the units value and throw away the rest.

So for example, in base 11, 9x5=41. The 1 is what appears in the table above. The 4 is the k when we say that the number is of the form 11k+a, but we don't need it for modulo arithmetic.

Every column is actually a permutation of the numbers {0 .. N-1}. Some computer random number generators use this - they just pick a pair of mutually prime large numbers a and b, and each new random number is created by multiplying the last one by a mod b.