So this book I'm reading has this question:
show that if $(a,n)=(b,n)=1$ the the equation $$ax+by\equiv c(mod( n))$$ has exactly $n$ different solutions.
I was only able to prove it using information that I know from group theory, here's what I did:
since $(a,n)=(b,n)=1$ then the cyclic subgroups of the additive group $\mathbb{Z}_{n} $ $\{a\}$ and $\{b\}$ generated by $a$ and $b$ respectively have order $n$ and thus equal to $\mathbb{Z}_{n} $. Now if we choose $x$ to be any element in $\mathbb{Z}_{n} $ and let $ax=t$ then by the difinition of a group then there must exist a unique $s\in \mathbb{Z}_{n} $ such that $t+s=c$, and $by=s$ and now if we consider the multiplicative group modulo $n$ then there must exist a unique $b$ that satisfies the equation. Now since we can choose $n$ elements to be $x$ we will get $n$ solutions.
Can you prove this with just basic knowledge of congruence?
Would be great if you can also review my proof
Using Bezout's Identity, for two integers $a$ and $b$, we can write:
$$ax + by = \gcd(a, b) = 1$$
Where $x$ and $y$ are some integers.
Now, knowing that $\gcd(a, n) = \gcd(b, n) = 1$, we can safely write:
$$a(1x) + b(1y) \equiv 1 \mod n$$ $$a(2x) + b(2y) \equiv 2 \mod n$$ $$\vdots$$ $$a(nx) + b(ny) \equiv n \equiv 0 \mod n$$