# Math Help - if a|b and b|a, then a=b

1. ## if a|b and b|a, then a=b

if a|b and b|a, then a=b

am=b and bn=a but how do I show a=b?

2. a/b=m and a/b=n, then...

3. Originally Posted by Moo
a/b=m and a/b=n, then...

Shouldn't it be \frac{b}{a}=m \ \mbox{and} \ \frac{a}{b}=n but I don't see how that helps.

Does Latex not work?

4. am = b and bn = a implies a = (am)n = a(mn). What does mn have to be?

5. Originally Posted by Ackbeet
am = b and bn = a implies a = (am)n = a(mn). What does mn have to be?
An integer.

6. I think you can know more than that: a = a(mn) implies a (mn-1) = 0. Since a is not zero, mn - 1 = 0, which implies...

7. I'm assuming a and b are positive integers? Otherwise consider

a = 2
b = -2

If a and b are positive integers, then a|b implies a \le b and b|a implies b \le a, therefore a = b.

8. Originally Posted by dwsmith
if a|b and b|a, then a=b

am=b and bn=a but how do I show a=b?

Modifying your question: Let $a$ and $b$ be integers. If $a|b$ and $b|a$, then $a=\pm b$ ( $b$ or $-b$).

$a=bn$ and $b=am$, where $n$ and $m$ are integers , then substitute for $b$ to get $a=(am)n$ or $a=a(mn)$. Divide both sides by $a(\neq0)$, and so both $m$ and $n$ equal $1$ or both equal $-1$.

9. Hmm, I'm not sure if this will display properly, I keep getting LaTeX errors on my previews.

Another way to get melese's result above is

$a|b \Rightarrow |a| \le |b|$

$b|a \Rightarrow |b| \le |a|$

$|a| = |b|$

$a = \pm b$

Since this isn't rendering properly, here is an image I got using this site:

10. Originally Posted by undefined
Hmm, I'm not sure if this will display properly, I keep getting LaTeX errors on my previews.

Another way to get melese's result above is

$a|b \Rightarrow |a| \le |b|$

$b|a \Rightarrow |b| \le |a|$

$|a| = |b|$

$a = \pm b$

Since this isn't rendering properly, here is an image I got using this site:

This works, but it makes use of the total order on $\mathbb{Z}$, which you don't really need. Ackbeet's proof works if $\mathbb{Z}$ is replaced by the polynomial ring $\mathbb{Z}[x]$, for instance.