Simple problem. Did I get it right?

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

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

Likewise, if $\displaystyle b|a$, there is a number $\displaystyle s$ in $\displaystyle \mathbb{Z}$ such that $\displaystyle a=s\cdot b$.

This shows us that $\displaystyle a=r\cdot s \cdot b$ and $\displaystyle b=r\cdot s \cdot a$. Because of this, $\displaystyle r=s^{-1}$.

$\displaystyle r$ and $\displaystyle s$ er both in $\displaystyle \mathbb{Z}$, therefore $\displaystyle r=s=1$ and $\displaystyle \underline{\underline{a=b}}$

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