3

I have been given the following lemma in a online lecture on universal hashing:

Lemma: Let m be a prime. For any $a \in \{ 1, \dots, m-1 \} $ there exists a unique inverse $a^{-1}$ such that

$a^{-1} \cdot a \equiv 1 \text{ mod } m$

($\mathbb{Z}_{m}$ is a field)

Example. m = 7

a 1 2 3 4 5 6
$a^{-1}$ 1 4 5 2 3 6

So to understand this question, I have found out that the $a^{-1}$ is actually what we call the Modular Multiplicative Inverse. So i went to some online calculator of that and inserted for example 2 and 7 as modulu. But what i don't understand is, if we replace the modular muliplicative inverse in this equation we get for example: $$ 4 * 2 \equiv 1 \text{ mod } 7$$ $$ 5 * 3 \equiv 1 \text{ mod } 7$$ $$ 6 * 6 \equiv 1 \text{ mod } 7$$

Which is not true. The only way this is true is that $$ (4 * 2) \text{ mod } 7 \equiv 1 \text{ mod } 7 $$

But I am not sure if that's what they mean and why they wouldn't write that out?

user21820
  • 57,693
  • 9
  • 98
  • 256
  • 3
    The notation $x \equiv y \mod p$ means $x \bmod p = y \bmod p$ – Stefan Octavian Feb 06 '21 at 14:43
  • 2
    Also notice that (if your lecture is digital), there is probably a space before the word mod. The latex code for this mod is \mod, placed in parantheses is \pmod and binary operator mod is \bmod – Stefan Octavian Feb 06 '21 at 14:51
  • Yeah there is a space, i was actually looking at that space thinking it was suspicious, just didn't have a way of deciphering it like you – DenLilleMand Feb 06 '21 at 14:53
  • It appears you are making the common oversight of ocnfusing mod the congruence vs. mod the operator - see here – Bill Dubuque Feb 06 '21 at 20:52
  • 1
    Hi Bill, thanks for the link, I can definitely see some overlap in your answer and the answer I accepted here, but the question is not really the same. The whole point was that I didn't understand how this $a * b = 1 mod p$ could be true. If there had been a parenthesis around $mod p$ originally I think I would've known that something special was going on. Obviously it's not a good idea to keep questions around just based on a misunderstanding when it comes to notation, so i don't know what to do with it now, but it did help me. Now the question is modified though, so not sure if that change. – DenLilleMand Feb 07 '21 at 14:04
  • I have rolled back to your original version, because it is important context (as you noted in your last comment). I agree with you that it is a very bad idea to use the "a·b = 1 mod p" notation without the brackets. Even if there is extra space, it may not be so clear to the reader unless the space is really big like a tab. – user21820 Feb 21 '21 at 12:49

1 Answers1

4

When we write $4 \cdot 2 \equiv 1 \mod 7$ the $\mod 7$ (usually placed in parentheses) is telling us what equivalence is used. The statement is true as written because $4 \cdot 2$ and $1$ belong to the same equivalence class $\mod 7$

If I start by saying I am working in the field $\Bbb {Z/7Z}$ it becomes correct to write $4 \cdot 2 = 1$

Ross Millikan
  • 374,822
  • Alright, I'll accept your answer, thanks! I think if he had put it in parenthesis I would've known from the beginning that I was dealing with some special behaviour I am not used to. I will try to search for an explanation of equivalence classes when it comes to modulu then. – DenLilleMand Feb 06 '21 at 15:03