Inverse: Since gcd( a , n )=1 for every a ∈ Z*n from Extended-Euclid ( a , n ) we obtain x and y such that ax + ny =1 ⇒ ax ≡ 1 mod n ⇒ x is the inverse of a .
Clearly both +n and *n are associative and commutative. Thus we have established the following theorem:
Theorem 1: Both ( Z n , +n ) and (Z*n , *n ) form finite Abelian groups.
|Z*n ,| = Φ( n ) where Φ( n ) is the Euler phi function .
From unique factorization theorem n can be expressed in terms of prime factors as follows:
n = p1e1 p2e2... pkek
In our example n =15
15 =3*5
Φ(15)=15(1-1/3)(1-1/5) =8
For n = 45 = 32 *5 we have Φ(45) = 45 (1-1/3)(1-1/5)=24. Thus the group ( Z*45 , *45 ) contains |Z*45 | =24 elements.