# The generators of the group $\langle\mathbb{Z}_n,\oplus\rangle$ are all $g \in \mathbb{Z}_n$ for which $\gcd(g,n)=1$ [duplicate]

I'm trying to find a proof of this:

The group $\langle\mathbb{Z}_n,\oplus\rangle$ is cyclic for every $n$, where $1$ is a generator. The generators of the group $\langle\mathbb{Z}_n,\oplus\rangle$ are all $g \in \mathbb{Z}_n$ for which $\gcd(g,n)=1$, as the reader can prove as an exercise.

It is perfectly clear that $1$ generates all $\mathbb{Z}_n$, but I can't get myself to understand the second part or find a way to prove it. Thanks.

## marked as duplicate by Dietrich Burde, Zev Chonoles abstract-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jun 19 '15 at 13:08

• It is proved in the answer of user134824 here. – Dietrich Burde Jun 19 '15 at 13:02
• thanks a lot for the referral! now also the role of the bezout identity in the proof is clear! – f1sh3r0 Jun 19 '15 at 13:13

Use Bézout's identity to prove that if $\,\gcd(g,n)=1$, $1$ can be obtained as a multiple of $g$ (in $\mathbf Z_n$).