# Solving linear equivalence mod $26$

I am looking to solve for $$x$$ in this modular arithmetic problem. We haven't learned anything remotely as complex as this in my class so not exactly sure where to start.

$$y \equiv 5x + 25 \pmod{26}$$

Here's what I know so far.

The additive inverse of 25 in mod 26 is 1 since: $$1 + 25 \equiv 0 \pmod{26}$$. So, I added 1 to both sides of the congruence.

The multiplicative inverse of 5 in mod 26 is −5 since: $$5(−5) \equiv −25 \equiv 1 \pmod{26}$$. So, I multiplied by -5 on both sides of the congruence.

After doing those steps this is what I have come up with

$$-5 - 5y \equiv ( -25x - 130) \pmod{26} \tag 1$$

Then I add the 5 over to the other side of the equation to get

$$-5y \equiv -25x - 125 \pmod{26} \tag 2$$

Then I divided by a factor of 5 to each of the numbers

$$-y \equiv -5x - 25 \pmod{26} \tag 3$$

Now I feel stuck and like I'm just back at the start... hmm is this even correct? Let me know where I went wrong or what I need to continue doing! Thanks in advance

• at step (2) you should immediately substitute $-25 \equiv 1 \pmod {26}$ to get $-5y\equiv x-125 \pmod{26}$ – Will Jagy Mar 27 at 2:15
• Adding $\,-25\equiv 1\,$ yields $\,5x\equiv y+1,\,$ times $\,1/5\equiv -25/5\equiv -5\,$ yields $\,x\equiv -5(y+1)\equiv 21(y+1)\$ – Bill Dubuque Mar 27 at 2:25

$$-5 \cdot 5 = -25 \equiv 1 \pmod{26}$$ so that the inverse of $$5$$ is $$-5$$ modulo $$26$$.
So if $$y\equiv 5x+25 \pmod{26}$$ and I want to express $$x$$ in terms of $$y$$:
$$y+1 \equiv 5x+26 \pmod{26} \equiv 5x \pmod{26}$$ so
$$-5(y+1) = -5 \cdot 5 x \pmod{26} \equiv x \pmod{26}$$ or rewritten:
$$x \equiv -5y -5 \pmod{26} \equiv 21y + 21 \pmod{26}$$