this question may seem stupid, but the way a question was phrased by my lecturer has made me a tad confused.
So just to check my understanding first;
$\Bbb Z_p=\{0,1,2,3,....,p-1\}$ is the cyclic group of integers modulo p. the fact that it is prime just means that the only subgroups are the trivial subgroup and the group itself.
if it were not prime it would still have the same structure eg. $\Bbb Z_6=\{0,1,2,3,4,5\}$.
now my question;
1) How do you find the group of units for some arbitrary group
2) What is the structure of $\Bbb Z_n=\{ kmod(p)|(n,p)=1\}$ ? I feel that it will not simply be {0,1,2,3,...n-1}
Suppose that $u\in \mathbb Z_n$ is a unit. Then there exists $x\in\mathbb Z_n$ such that $ux=1$ in $\mathbb Z_n$, or $$ux\equiv 1\bmod n$$ in $\mathbb Z$. That is, there exists $y\in\mathbb Z$ such that $ux+ny=1$. By Bézout's Identity, this occurs if and only if $\gcd(u,n)=1$. Thus, the unit group of $\mathbb Z_n$ is the set of nonnegative integers less than and coprime to $n$: $$U_n=\{u\in\mathbb Z: \gcd(u,n)=1\}$$
The structure of $U_n$ is very different from that of $\mathbb Z_n$. The most important difference is that it is not closed under addition and has no well-defined addition operation.