0

I have this equation:

$y=ax+b \quad \pmod{26}$

where a, b are two parameters. I would like to calculate the inverse of this equation, but I don't know which algebra rules I have to apply. Can you help me?

Bernard
  • 175,478
Jhdoe
  • 215
  • 1
    By "the inverse," do you mean $x=cy+d\pmod{26}$? If so, it may not be doable. It depends on $a$. Is there anything else you can tell us about $a$? – Cameron Buie Mar 18 '19 at 11:51
  • 1
    The usual rules: subtract $b$ from both sides, and multiply both sides by the multiplicative inverse of $a$. Here, the multiplicative inverse of $a$ is the element $c$ such that $ac$ is the multiplicative identity. And the multiplicative identity is the element $1\bmod{26}$. – Gerry Myerson Mar 18 '19 at 11:55
  • As @Gerry points out, it isn't much different from what you're used to. The big difference is that $a$ may not have a multiplicative inverse modulo 26. – Cameron Buie Mar 18 '19 at 12:02

1 Answers1

1

You can find an inverse equation only if $\gcd(a,26)=1$, then $a$ has an inverse $a^{-1}$ such that$$a\cdot a^{-1}\equiv 1\mod{26}$$therefore$$y\equiv ax+b\mod{26}\iff a^{-1}y\equiv x+a^{-1}b\mod 26\\\iff\\ x\equiv a^{-1}y-a^{-1}b\mod 26$$

Mostafa Ayaz
  • 31,924
  • If i find an $a^{-1}$ such as $a^{-1}a\equiv 1 \quad (mod26)$, what assures me that $a^{-1}ax\equiv x\quad (mod26)$ ? – Jhdoe Mar 18 '19 at 14:21
  • 1
    Two things: (1) the definition of inverse $$a\cdot a^{-1}\equiv 1$$and (2) the neutrality of $1$ $$1\cdot x\equiv x$$ – Mostafa Ayaz Mar 18 '19 at 14:45