2
$\begingroup$

Modular reduction is a widely used arithmetic operation. I found many "mod" related words such as

  • modulo

  • modulus

  • modular

Can anyone explains the difference among these words? Please give examples or idioms.

$\endgroup$
  • 3
    $\begingroup$ Note that when used in an equation we see both things like "3 ≡ 7 (mod 4)" and things like "3 = 7 mod 4". The former can be read as "3 is congruent to 7 modulo 4". This is not an equal sign. In the latter the word "mod" is used as an infix operator. This statement is like C pseudocode (7 % 4) == 3 for unsigned ints. I very rarely see the second form used in the context of cryptography. $\endgroup$ – Future Security Jun 20 at 18:53
  • $\begingroup$ To extend Future Security's comment above, I have occasionally seen cases where their given C pseudocode is subtly incorrect. In crypto, many operations use modular arithmetic, which effectively means both sides of the congruency are subject to the modulus: (7 % 4) == (3 % 4). Most often, however, we know that one side is defined to be less than the modulus, so implementations can skip that operation. $\endgroup$ – Phlarx Jun 20 at 19:04
  • $\begingroup$ Can we just call it getting the remainder? $\endgroup$ – Paul Uszak Jun 20 at 21:45
12
$\begingroup$

A modular operation is an operation done modulo some modulus.

  • "modular" is an adjective: modular inverse, modular operation, modular reduction, ...
  • "modulo" is indeed the Latin ablative of modulus, and that makes it an adverb: I walk modulo $n$, just like I walk fast.
  • "modulus" is a noun: the number $n$ is the modulus that you would use in some system.
$\endgroup$
  • $\begingroup$ I guess modulo is a preposition. $\endgroup$ – Zachary Jun 20 at 17:26
  • $\begingroup$ Prepositions [...] are a class of words used to express spatial or temporal relations (in, under, towards, before) [...] en.wikipedia.org/wiki/Preposition_and_postposition, so I guess not. Prepositions don't seem to exist in my native language, so I'm not sure. $\endgroup$ – Ruben De Smet Jun 20 at 20:10
1
$\begingroup$

If you use the word "mod" by itself, it should be used as an abbreviation of "modulo" rather than as an abbreviation of either of the other two words. Something like "n mod p" as an abbreviation for "n modulo p" is common but "the mod is p" rather than "the modulus is p" is awkward.

$\endgroup$
0
$\begingroup$

I often find it used as e.g.

It can plainly be seen that 6 = 9 (mod 3).

Talking about the remainder itself is not often done.

$\endgroup$
  • $\begingroup$ It's the quotient that is elided in a statement like that: what it means is there exists some quotient $q$ such that $6 = 9 + 3q$. The sides of the equivalence sign are themselves possible remainders (though in this case they are not the least remainders). $\endgroup$ – Squeamish Ossifrage Jun 20 at 19:14
-1
$\begingroup$

"The word modulo...is the Latin ablative of modulus " -- Wikipedia

$\endgroup$
  • $\begingroup$ I don't think the link does answer the question. And although it doesn't clear the other issues with link-only answers, you can use Wikipedia's permanent link feature to instead link to an archived version of an article. (Which, again, isn't a fix here.) $\endgroup$ – Future Security Jun 20 at 18:27
  • $\begingroup$ @FutureSecurity The OP asked Can anyone explains [sic] the difference among [modulo, modulus, and modular]? So, I believe the quoted text covers the first two. $\endgroup$ – learning Jun 25 at 13:54
  • $\begingroup$ Whomever I was responding to deleted their comment. I still don't agree with you though. $\endgroup$ – Future Security Jun 26 at 15:16
  • $\begingroup$ @FutureSecurity I don't understand your rationale. Are you arguing that I haven't explained the difference between modulo and modulus, because I have only defined modulo in terms of modulus? $\endgroup$ – learning Jun 27 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.