If $\gcd(a,n) = 1$ and $\gcd(b,n) = 1$, then $\gcd(ab,n) = 1$. [duplicate]

If $\gcd(a,n) = 1$ and $\gcd(b,n) = 1$, then $\gcd(ab,n) = 1$.
Also... $a,b$ and $n$ are natural numbers. I feel I should begin with EEA to multiply out the gcd's, but I don't know where to go from there...


Because $n$ is coprime to $a$ and $b$, we know there are linear combinations that equal one. Let the coefficients be $x,y,z,w$ such that $ax + ny = 1$ and $bz + nw = 1$. Multiply these together: $$abxz + axnw + bzny + n^2yw = 1 \cdot 1$$ $$ab(xz) + n(axw + bzy + nyw) = 1$$

So there's a linear combination of $ab$ and $n$ that is equal to $1$. Thus they are coprime.


Hint: Suppose that $p$ is a prime divisor of $ab$ and of $n$; since $p$ is prime, it's necessarily true that $p \mid a$ or $p \mid b$. Can you take it from here?


In general gcd(a,n)=1 means there is no common divisor of a and n.. That is the composition multiples of a and n are different from each Other.. And gcd(b,n)=1 also gives the same result.. So now on multiplying a and b, there composition multiples will remain different from that of n. So gcd(ab,n)=1.. This is the simplest way to think about.