# If $x$ divides $z$, $y$ divides $z$ and $x$ and $y$ are relatively prime, then $xy$ divides $z$.

I've been stuck on this for far too long, but it isn't proved in my lecture notes so it's supposed to be elementary...

Let $x, y, z$ be integers such that $x$ divides $z$, $y$ divides $z$ and $x$ and $y$ are relatively prime, then $xy$ divides $z$.

Thanks a lot !

$\gcd(x,y)=1$ $\implies$ there are integers $s,t$ such that $sx+ty=1$.

Let $z=ax=by$. Then $sx+ty=1$ $\implies$ $sxz+tyz=z$, i.e. $(sb+ta)xy=z$. Thus $xy\mid z$.

• Clear and quick, thanks a lot ! Commented Jan 11, 2017 at 7:25

This also appears from Euclid's Elements: If two numbers divide a third, their lcm also divides it [VII, 35]. If two numbers are relatively prime, their product is their lcm [VII, 34]. Therefore, if two relatively prime numbers divide a third number, their product also divides it.

• Yes, I understood this today ! Guilio's proof used [VII, 35] and I didn't get why at first but it is pretty clear when decomposing with prime factors, thanks. Commented Jan 11, 2017 at 7:30

Suppose $x,y,z \in \mathbb Z$, $gcd(x,y) = 1$ and $\exists a,b \in \mathbb Z : ax = z = by$.

As $ax = by$ and $a,b,x,y \in \mathbb Z$, we have $x$ divides $by$, which I'll write as $x|by$.

$x|by, y|by \Rightarrow lcm(x,y)|by = z$, where $lcm(x,y) = \frac {xy}{gcd(x,y)}$, a.k.a. Least Common Multiple.

But $gcd(x,y) = 1\Rightarrow xy = lcm(x,y)|by=z$.

The Fundamental Theorem of Aritmetic: If $x\;|\;yw$ and $\gcd (x,y)=1$ then $x\;|\;w.$

So if $x|z$ and $y|z$ and $\gcd(x,y)=1,$ let $w=z/y.$ Then $x|z=yw$ and $\gcd (x,y)=1$ so $x|w.$ That is, $x|(z/y).$ So $z/xy=(z/y)/x\in \mathbb Z$.