# Problem in modular arithmetic using group theory

This problem is from Herstein's Topics in Algebra.

I have to use the property that if a finite set is closed under an associative product and that both cancellation laws hold in $G$, then $G$ is a group to prove the following:

1. Non-zero integers modulo $p$, a prime number, form a group under multiplication $\mod p$

2. Non zero integers relatively prime to $n$, form a group under multiplication $\mod n$.

I am very new to modular arithmetic and group theory, and stuck badly. I am trying to do the above, by assuming some numbers $a= pq + r$, where $q$ is an integer, so $a=r (mod\, p)$ but I don't know how to incorporate the facts prime and relatively prime, to solve the problem.

-

## 1 Answer

Hint: If $a$ and $b$ are relatively prime and $a$ divides $bc$, then $a$ divides $c$.

-
 :Sorry, This is not helping. I have proved closure, and associativity. But I am getting that the above theorem is true wrt the mod of any number, not necessarily prime or relatively prime. I show it below. Let $\bar{a}$ be the congruence class of a modulo p ($a \lt p$). TPT: $\bar{a}\bar{b}=\bar{a}\bar{c}$ implies $\bar{b}=\bar{c}$. I write $\bar{a}=pn_1+a$, and similarly for others, with labels of the n different. I substitute into the given statement, and get $$(pn_1+a)(pn_3+c)=(pn_1+a)(pn_2+b)$$. Rearranging I get $$(c-b)(pn_1+a)=p(n_2-n_3)(pn_1+a)$$Which proves b congruent to c mod p – ramanujan_dirac Jan 11 at 12:24 @ramanujan_dirac Here is a counterexample: Let $p = 4$, $c = 3$, $b = 1$ and $a = 2$. So there must be something wrong with your argument. – Serkan Jan 11 at 15:44