# Prove that if ab=1 then a=b $\forall a,b \in \mathbb Z$

how could I prove for integers $$a\neq b$$ then $$ab \neq 1$$.

Attempt.Proof by contrapositive. Assume $$ab=1$$ Then the only cases are $$(1)(1)=1$$ and $$(-1)(-1)=1$$ Thus $$a=b$$ I have a feeling this is not right. Any ideas?

• Do you think that $1$ has integer factors other than $\pm1$? – Lord Shark the Unknown Dec 2 '19 at 4:27
• For $a,b \in \mathbb R$ ? – Zera Dec 2 '19 at 4:29
• for a,b $\in \mathbb{Z}$ – user707991 Dec 2 '19 at 4:29
• Is there any way I should use the division algorithm to approach this? I was thinking a proof by contradiction but could make no progress – user707991 Dec 2 '19 at 4:30
• @lordsharktheunknown So should I say since the only integer factors are $1$ and $-1$ thus $(1)(1)=(-1)(-1)=1$ so $a=b$? – user707991 Dec 2 '19 at 4:32

Assume $$ab=1$$ for $$a,b\in\mathbb{Z}$$. Since $$1$$ is the multiplicative identity of $$\mathbb{Z}$$, we find that $$a=b^{-1}$$. If $$a=1$$, then $$b=1$$ as well. If $$a=-1$$, then we also have that $$b=-1$$. What are the multiplicative inverses of other elements of $$\mathbb{Z}$$? Particularly, are they integers? Conclude that $$ab=1$$ implies that $$a=b=\pm1$$ for $$a,b\in\mathbb{Z}$$.