# Show that if $\gcd(a,b) = 1$ and $a|n$, $b|n$ then $ab|n$ [duplicate]

Show that if $$\gcd(a,b) = 1$$ and $$a|n$$, $$b|n$$ then $$ab|n$$

What I have is as follows:

If $$\gcd(a,b) = 1$$ and $$a|n$$ and $$a|n$$ we know that:

$$a=mn$$ and $$b=sn$$ were $$m,s \in \mathbb{Z}$$

$$ab|n = (mn)(sn)|n = n(ms)|n = \frac{(n)(ms)}{n} = ms$$

This is were I am stuck. Im I done here or am I missing something?

• In the body, you wrote $a|n$ twice where I think you meant $b|n$. Also, $a|n$ means $n=ka$, not $a=mn$ Feb 26, 2020 at 4:00
• $a\mid n$ implies $n=am$, Feb 26, 2020 at 4:10

Since $$gcd(a,b)=1$$ we have that $$ar+bs=1$$ for some integers $$r,s$$ (Bézout's identity)
Also, $$a|n\implies ak=n$$ for some $$k\in\mathbb{Z}$$and $$b|n\implies bc=n$$ for some $$c\in\mathbb{Z}.$$
If we multiply $$ar+bs=1$$ by $$n$$, we have $$arn+bsn=n$$, which looks complicated until we realize we can use $$ak=bc=n$$ to substitute into that equation, and rearrange into something that makes a tad more sense: $$arn+bsn=n$$ $$ar(bc)+bs(ak)=n$$ $$ab(rc)+ab(sk)=n$$ $$(ab)(rc+sk)=n$$ $$(ab)C=n$$ And the last line implies that $$ab|n$$, where $$C=rc+sk\in\mathbb{Z}$$.
• More relevantly, $rc + sk \in \mathbb Z$. Feb 26, 2020 at 4:57