TITLE: Is $1/3$ and/or $-17$ in the set of integers modulo $7$?
QUESTION [5 upvotes]: Is $1/3$ and/or $-17$ in the set of integers modulo $7$?
So I say that $1/3$ is in the set of integers modulo $7$ because $3 \cdot 1/3 = 1$, so $3x \bmod 7 = 1$. For $x = 5$, this works, so $1/3$ is congruent to $5 \bmod 7$. So I say that by congruence, $1/3$ should exist.
For $-17$, it is congruent to $4 \bmod 7$. So does that mean $-17$ also exists? Is my idea for $1/3$ correct or flawed?

REPLY [3 votes]: The answer is a bit more subtle than that.
The set of integers mod $7$ is by definition the set of equivalence classes of $\mathbb Z$ modulo the equivalence relation “$x-y$ is a multiple of $7$”.
The number $-17$ unequivocally belongs to $\mathbb Z$ and therefore is represented in exactly one equivalence class.  We conventionally use $0,1,2,3,4,5,6$ as representatives of the equivalence classes, but those are by no means set in stone.  In some contexts it is more convenient to use $-3,-2,-1,0,1,2,3$ instead.  And there is nothing in the definition that forbids us from using $-17,-16,-15,0,1,2,10$.
But the same is not true of $1/3$, which doesn’t even belong to $\mathbb Z$ in the first place.  Precision is very important in math: it would not be accurate to say that $1/3$ belongs to the set of integers modulo $7$.
But most working mathematicians would understand your intent.  That’s because the set of integers modulo $7$ overlaps substantially with another mathematical object, the field of integers modulo $7$, often denoted $\mathbb F_7$ or $\mathbb Z/7\mathbb Z$.  The elements of $\mathbb F_7$ are exactly the same as the set of integers modulo $7$, but the field additionally endows these with the ability to add, subtract, multiply and divide elements (except for $0$).  In the field setting, it is perfectly normal to write $1/3 = 5$.

REPLY [2 votes]: This is more of an extended comment.
Well, this question actually hints at a much larger point, at least one that I had as a freshman: Why does everyone talk about [say] $\mathbb{Z}/7\mathbb{Z}$, but not say the set of rational numbers mod $7$ i.e., say, $\mathbb{Q} \cap [0,7)$. Wouldn't the latter system make sense? What happens is that the laws of addition and multiplication collapse the latter system to $\mathbb{Z}/7\mathbb{Z}$.
For example, $5 \times 3 \equiv_7 1$. Well but what about the fraction $\frac{1}{3}$ and why can't we take $\frac{1}{3}$ to be distinct from $5$. Well but then as $5 \times 3$ and $\frac{1}{3} \times 3$ are both $1$ in this system, it follows that $\left(5-\frac{1}{3}\right)\times 3$ has to be $1-1=0$ by the distributive law. So then $\left(5-\frac{1}{3}\right)\times 3 \times \frac{1}{3}$ must also be $0$. But then the associative law gives $\left(5-\frac{1}{3}\right)\times \left(3 \times \frac{1}{3}\right)$ $=$ $\left(5-\frac{1}{3}\right)\times 1 =0$. So either $5$ and $\frac{1}{3}$ are the same after all, or either the associative law of multiplication or the distributive law of addition and multiplication does not hold.
You can use this above line of reasoning to show that if one were to try to define [say] the ring $\mathbb{Q} \cap [0,7)$, then each rational number $\frac{m}{n}$; has to collapse to $(m \times n') \mod 7$, where $n'$ is the integer in
$\{0,1,2,3,4,5,6\}$ that satisfies $n \times n' \equiv_7 1$. And so indeed, if one were to try to define $\mathbb{Q} \cap [0,7)$, the laws of addition and multiplication collapse everything to $\mathbb{Z}/7\mathbb{Z}$.