# What is the meaning of modular fractions?

What is the meaning of $$\\\frac{m}{n}\equiv k\pmod l$$ and $$\\\frac{m}{n} \mod l$$ $$m, n, k, l \in\mathbb N$$ and $$\gcd(m, n)=1$$.

Recall $$b$$ is invertible mod $$n\iff b$$ is coprime to $$n\$$ [by Bezout's identity for $$\,\gcd(b,n)=1$$]

When so we define $$\ a/b := ab^{-1},\,$$ which is the unique solution of $$\,bx\equiv a\pmod{\!n}$$

Hence $$\ a/b = ab^{-1}\equiv c \iff a\equiv bc\pmod{\!n}.\$$ Operationally $$\,\ a/b\bmod n\, :=\, ab^{-1}\bmod n$$

We can do modular fraction arithmetic on all rationals writable with denominator coprime to $$n$$ (which comprise a subring of the rationals, i.e. are closed under addition and multiplication). The well-known formulas for fraction addition and multiplication remain true for modular fractions, e.g. the addition law $$\,a/b+c/d = (ad+bc)/(bd)\,$$ holds true because $$\,(ad+bc)\color{#0a0}{(bd)^{-1}}\!\equiv ad\,\color{#0a0}{d^{-1}b^{-1}}+ \color{#0a0}{d^{-1}b^{-1}}bc\equiv ab^{-1}+d^{-1}b$$

See here for many examples of modular fraction arithmetic.

Beware $$\$$ Modular fraction arithmetic is well-defined only for fractions with denominator coprime to the modulus. See here for further discussion.

Remark  You may already be familiar with this idea from calculus. For example, consider polynomials with real coefficients. Every real $$r\neq 0$$ is invertible so we can work with fractional expressions $$f(x)/r := r^{-1} f(x)\,$$ just as above. Then $$\,f/r+g/s = (sf\!+\!rg)/(rs),\,$$ and $$\,(f/r)(g/s) = fg/(rs).\,$$ More generally the same idea works for invertible elements in any commutative domain (e.g. we can work with "compound fractions" of rationals, reals, or elements of any field). These ideas are algebraically reified in university algebra when one studies fraction fields and localizations of rings and modules which - unlike the degenerate cases above - typically enlarge the domain by adjoining inverses of non-invertible elements.

• +1 for the careful explicit connection to "ordinary" arithmetic with fractions. But is the reference to fraction fields right? In $\mathbb{Z}_n$ whatever fractions exist are already present. – Ethan Bolker Nov 17 '18 at 12:16
• @Ethan Yes, it is a degenerate case of the fraction field / localization construction: if the denominators are all units (invertibles) then we get nothing new, i.e. the construction yields an isomorphic ring, e.g if we apply the fraction field construction to a fraction field then it yields an isomorphic ring of "compound fractions". But such universality often proves very handy, e.g. $\,1/2 - 1/3 = 1/6\,$ can be mapped into any ring (or $\Bbb Z$-module) where $6$ is invertible (e.g. in a group if $b$ is a square-root of $a$ and $c$ is a cube-root then $b/c$ is a sixth-root). – Bill Dubuque Nov 17 '18 at 14:33

The first one means $$kn \equiv m \pmod{l} .$$ The second is a name for the solution to the congruence $$n \times ? \equiv m \pmod{l} .$$ That congruence has a unique solution when $$l$$ and $$n$$ are relatively prime.

I am guessing the meaning of your poorly worded question. The first one is some kind of equality (in congruences) between two objects. The second one simply refers to an object (of some congruence calculation).

The following two things give another example of similar nature: $$A=5+3$$, and $$5+3$$