# Math Help - Simple problem. Did I get it right?

1. ## Simple problem. Did I get it right?

If $a|b$ and $b|a$, is $a=b$?

I did as follows: If $a|b$, there is a number $r$ in $\mathbb{Z}$ such that $b=r\cdot a$.
Likewise, if $b|a$, there is a number $s$ in $\mathbb{Z}$ such that $a=s\cdot b$.

This shows us that $a=r\cdot s \cdot b$ and $b=r\cdot s \cdot a$. Because of this, $r=s^{-1}$.
$r$ and $s$ er both in $\mathbb{Z}$, therefore $r=s=1$ and $\underline{\underline{a=b}}$

Was my reasoning here correct, and did I get the right answer?

2. No, $a = |b|$.

3. Originally Posted by ThePerfectHacker
No, $a = |b|$.
No, |a| = |b|