# Prove divisibility: If $j_1\mid j_2$ and $j_2\mid j_1$, then $j_1 = \pm j_2$

I have this math question. I'm not 100% sure how to answer it.

If $j_1\mid j_2$ and $j_2\mid j_1$, then $j_1 = \pm j_2$

I know that by definition $j_1\mid j_2\implies j_2 = j_1\cdot n$ for some $n\in \mathbb{Z}$. Also that $j_2\mid j_1\implies j_1 = j_2\cdot k$ for some $k\in \mathbb{Z}$. However, I'm not sure how to use this fact to prove that $j_1 = \pm j_2$. Thanks

• Replace,for instance, $j_2$ by $nj_1$ in $j_1=kj_2$. Nov 22 '15 at 19:01
• So combine them? $j_1=nkj_1$?
– KFC
Nov 22 '15 at 19:02
• Yes, that's one possibility. Now consider $j_1=0\lor j_1\neq0$. Nov 22 '15 at 19:04

## 1 Answer

$j_1\mid j_2\implies$ either $j_2=0$ or $|j_1|\le |j_2|$.

$j_2\mid j_1\implies$ either $j_1=0$ or $|j_2|\le |j_1|$.

If $j_2=0$, then $0\mid j_1$, so $j_1=0$, so $j_1=j_2$.

If $j_1=0$, then $0\mid j_2$, so $j_2=0$, so $j_1=j_2$.

If $j_1j_2\neq 0$, then $|j_1|\le |j_2|$ and $|j_2|\le |j_1|$, so $|j_1|=|j_2|$, so $j_1=\pm j_2$.

$j_1\mid j_2\iff j_2=kj_1$ for some $k\in\Bbb Z$.

$j_2\mid j_1\iff j_1=nj_2$ for some $n\in\Bbb Z$.

$j_1=nkj_1$. If $j_1=0$, then $0\mid j_2$, so $j_2=0$, so $j_1=j_2$.

If $j_1\neq 0$, then $1=nk$, so $n,k\in\{-1,1\}$.