Post
Topic
Board Development & Technical Discussion
Re: Blockchain Basic: Understanding Modulo Operation
by
NotATether
on 28/04/2020, 11:40:46 UTC
Thanks for the guide. So in other words when you multiply two numbers in a set of integers, or group as they are called formally, you just take their product normally and take the modulus of it, order n, assuming the group is Zn.

And when you make a multiplication table of this the modulus of the product should also be taken. And then the resulting table is symmetrical which is what allows division to be possible. because a property of division is a / b = c; a / c = b. And so if you construct a multiplication table you can easily define division in a group as the inverse of multiplication, so since In Z3  2 ∙ 2 = 1, then 1 / 2 = 2 in Z3, and we also have 1 ∙ 1 = 1 in Z3 (since it's just multiplication and the product was too low to take the remainder of), then we also have 1 / 1 = 1 in Z3.

You mentioned:

3. 1 / 2(multiplicative inverse of 2; or 2-1) = 2 ==> refer to the table above in order to get the modulo involving fractions

Is there a way to perform the division using the subtraction operation? This subtraction didn't make sense to me since 2 and 1 are both in Z3 so subtracting 2 - 1 would've given 1. But the table, which I know gives the correct answer, would give 2.

Correct me if I'm wrong but in a % b, the modulo refers to a, while the denominator refers to b?

Also, what would be the result of 2 / 2 in Z4? Do we have a name for this kind of result where there's more than one possible value?

Now I see the importance of using only prime numbers as orders of n, to avoid making the multiplication table degenerate as in some divisions do not exist or have ambiguous (two or more) answers.