I understand that if $\gcd{(b,c)}=1$ then we can find $\frac{a}b\mod{c}$ by writing $$x\equiv \frac{a}b\mod{c}$$ $$bx\equiv a\mod{c}$$ then reducing $a$ and solving the modular equation by finding the multiplicative inverse of $b\mod{c}$. But when $\gcd{(b,c)}\ne1$, in particular if $b=c$ then how can one find a value for $$\frac{a}b\mod{c}$$ For example, the number $$\frac{146}7\equiv\frac{48}7\mod{7}$$ according to Wolfram: Alpha. How is this defined?
2026-03-25 09:26:34.1774430794
On
How to find $\frac{146}7 \mod{7}$?
174 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
1
On
By abusing notation on can define the modulus $x \pmod n$ by looking for the real number $y$ in the range $[0,n)$ so that the difference $x-y$ is an integer multiple of $n$. In this case exactly this happens: $$\frac{146}{7}\pmod 7=\frac{140}{7}+\frac67\pmod 7=20+\frac67 \pmod 7=6+\frac67\pmod 7$$
For another example where the denominator is not the modulus, we see that
$$\frac{158}{7}\pmod{9}=\frac{154}{7}+\frac{4}{7}\pmod 9=22+\frac{4}{7}\pmod 9=4+\frac{4}{7}\pmod 9.$$
The real function that defines such operation (``$\pmod n$'') is thus $$f(x)=x-\left(\lfloor{\frac{x}n\rfloor}\cdot n\right)$$
So in the case of $\dfrac{146}{7}$ mod 7, wolfram alpha reduced the numerator by multiplying the mod by the denominator to get 146 mod 49. The reason being for you able to do this is $\dfrac{146}{7}$ mod 7 can be written as $\dfrac{146}{7}$ $\pm$ $\dfrac{7x}{1}$ which then can be written as $\dfrac{146}{7}$ $\pm$ $\dfrac{49x}{7}$. From here on, you can just mod down the top number to get $\dfrac{48}{7}$ mod 7 as the smallest positive solution.