## Modular Mathematics, Permuting the Units

### Permuting the Units

The concepts of prime and composite don't make much sense in modular mathematics,
but we still retain the notion of a unit.
Let x be a unit mod m if there is some y such that xy = 1 mod m.
In other words, y is the inverse of x.
Stepping back to the integers,
we are asking whether yx - km = 1 has any solutions.
In fact it has an entire lattice of solutions in y and k,
iff x and m are relatively prime.
Each value of y advances by m,
hence all values of y are the same mod m,
and the inverse of x is unique.
If u has inverse v and x has inverse y, ux has inverse vy.
Thus the product of units is another unit.
Multiplication by u maps units to units,
and the map can be reversed by multiplying by v.
The map is one to one and onto, permuting the units about.