I was reading the solution to IMO 2005 problem 4, in which it had the following statement: \begin{equation} 2^{-1} + 3^{-1} + 6^{-1} -1 \equiv \frac{1}{2} + \frac{1}{3} + \frac{1}{6} - 1 \equiv 0 \pmod{p} \end{equation} Where $p$ is a prime greater than $3$. How come it is possible to add modular inverses like fractions when fractions don’t exist in modular equations?
-
I just had solved it a few days ago. – Krave37 Feb 07 '24 at 12:17
2 Answers
This works because the integers module a prime $p$ form a field, which means that you can work with fractions in the same way as you do in the real or the rational numbers. The way $\frac{a}{b}$ is defined in the real numbers is $\frac{a}{b}=a\times b^{-1}$ where $b^{-1}$ is the multiplicative inverse of $b$. The definition is the same for the field of integers modulo $p$, so the usual rules for adding, subtracting, multiplying and dividing apply in that case. There's a little difference and one needs to be careful because while in the real numbers $0$ is the only one without multiplicative inverse (so we can't divide by $0$), when working with the integers modulo $p$ the numbers without multiplicative inverse are those congruent to $0$ modulo $p$.

- 18,214
-
1On the face of it, there is no natural homomorphism of rational numbers to integers mod $p$, so an identity that holds in the rational numbers does not truly-instantly imply the corresponding identity in $\mathbb Z/p$. But, yes, for certain classes of identities, one can prove something similar... – paul garrett Feb 07 '24 at 00:04
I agree that's a strange notation, and I'm not sure about the implied reasoning. I would just prove this as
$$ 2^{-1} + 3^{-1} + 6^{-1} - 1 \equiv 6^{-1} \cdot 6 \cdot (2^{-1} + 3^{-1} + 6^{-1} - 1) \\ \mbox{} \equiv 6^{-1} (3 + 2 + 1 - 6) \equiv 0 \pmod{p} $$

- 9,449
-
Indeed. Adding fractions in the rational numbers does not immediately imply the same identity in $\mathbb Z/p$, although some things are true. I'd say that the supposed argument is "glib". :) aschepler's argument is easy, and air-tight. :) Maybe @aschepler's argument proves some form of the asserted "magical" identity... :) – paul garrett Feb 06 '24 at 23:54
-
Somewhat more generally, if $a_i$ and $b_i$ are integers with $b_i \not \equiv 0 \pmod p$ for $1 \le i \le n$, and $\sum_{i=1}^n a_i/b_i = 0$, then $\sum_{i=1}^n a_i b_i^{-1} \equiv 0 \pmod p$. Prove by multiplying by $\prod_{i=1}^n b_i$ ... – Robert Israel Feb 07 '24 at 00:18
-
@paulgarrett But even though it's an abuse notation, it's perfectly true that, for instance, $\frac27 + \frac37 \equiv \frac57 \pmod{11}$, as we can multiply the whole equivalence by $7$ to get an obviously true statement. And this will hold true for any "fraction addition" modulo $p$, for the same reason. – Eric Snyder Feb 07 '24 at 00:38
-
@paulgarrett That's a bit misleading since it does remain true if it makes any sense, i.e. any equality of fractions remains true in every ring where the denominators remain invertible, e.g. the OP persists in any ring of characteristic coprime to $6$. This follows immediately by the universal property of localization., i.e. $\Bbb Z[1/6],$ is the universal ring inverting $6$, i.e. any other ring where $6$ is invertible contains a unique image of $\Bbb Z[1/6].\ \ $ – Bill Dubuque Feb 07 '24 at 02:06
-
@BillDubuque, true, but if I encountered this in writing by an absolute beginner in "modular arithmetic", who'd be thinking of those fractions as rational numbers, I'd want to point out that there is proof required ... and, of course, invoking universal properties of localization is probably not right for that context. :) – paul garrett Feb 07 '24 at 16:12