So here's the question: Suppose that $a$ is co-prime to $n$. Prove that there exists $z ∈ Z$ such that $az \equiv 1 \pmod n$
So, what I was thinking was that by Bezout's Lemma, we have hcf$(a,n)=1$ and so $az=n-1$ but the I can't turn that to a plus one. I don't see how to do this?
You know there is a $z$ such that $az \equiv -1 \pmod n$. What happens if you multiply both sides by $-1?$