# Find inverse of $[-2] \bmod 5$

Given the equation: $$42x\equiv 1\pmod 5$$ I have determined the class $[-2]_{5}$ as $x$ solution of the given equation. Now I have to find the inverse of $x$ (i.e. $x^{-1}=[-2]_5^{-1}$ ). As far as I know, the $x=[-2]_5$ first found is just $[42]_5^{-1}$, and so the inverse of inverse (i.e. $([42]_5^{-1})^{-1}$) is just $42$ again, so $[42]_5=[-2]_5=[x]_5^{-1}$

Am I wrong=

• $-2 \equiv 3$, so you're just looking for the multiplicative inverse of $3$? It's $2$, since $3 \cdot 2 = 6 \equiv 1(mod 5)$ – The Chaz 2.0 Mar 8 '12 at 15:43
• That $42 \cdot (-2) \equiv 1 \bmod 5$ implies that $[42]_5 = [2]_5$ is the inverse of $[-2]_5$. – Dylan Moreland Mar 8 '12 at 15:46
• @TheChaz : If you write 3\cdot2=6\equiv1\pmod 5 in $\TeX$, it looks like this: $3\cdot2=6\equiv1\pmod 5$. – Michael Hardy Mar 8 '12 at 16:05
• @MichaelHardy: Noted! – The Chaz 2.0 Mar 8 '12 at 16:08

You wrong in saying that $[42]_5=[-2]_5$.
You found $x$ correctly, since $[42]_5[-2]_5=[2]_5[3]_5=[6]_5=[1]_5$ , although since we are working mod 5 it is traditional to choose the representative between $0$ and $4$ so instead of $[-2]_5$ you might write $[3]_5$. Thus $[42]_5$ (i.e. $[2]_5$) and $[3]_5$ are inverses of each other in $\mathbb{Z}/5$
Write down the powers of $2$ modulo $5$. They are $2^0=1$, $2^1=2$, $2^2=4\equiv-1$, $2^3=8\equiv3$, and $2^4=16\equiv1$. Now all is clear.