If $n>1$ is integer and $1\le a \le n$ is integer such that $(a,n)\neq 1$ then prove there exist integer $1 \le b <n $ such that $ab \equiv 0(mod \; n)$
I have tried everything from going to definitions,constructing the the wanted integer from g.c.d .I do not know how to solve this.Hints would be useful as much as full solutions.
Problem comes from Dummit and Foote book on Abstract Algebra,in the exercises after chapers on integers modulo n,exercise 11
I thank you in advance.
Take a look at the circularity of modular arithmetic:
$$ x * n \equiv x * 0 = 0 \mod{n} $$
Since $d = gcd(a,n) \neq 1$, there exists at least this one common divisor $d$.
Now write $a = x * d$ and $n = b * d$, so
$$ a * b = (x * d) * b = x * (d * b) = x * n \equiv x * 0 = 0 \mod{n} $$
Since there is a common divisor, there must also be $b$.