6

I'm currently taking Calculus I, so I'm new with mathematical notation. I always thought $x \bmod 3$ means the remainder when you divide $x$ by $3$. Am I wrong in thinking this is the remainder?

What is the difference between $x \pmod y$ and $\quad x \bmod y \quad$ in that sense?

1 Answers1

15

In my experience, the expression $x\bmod y$ is a binary operation which returns the remainder when you divide $y$ into $x$.

By contrast, the parenthesized $\pmod y$ is used to qualify an equivalence. Thus one might write "$x_1\equiv x_2 \pmod y$". Usually the parenthesized $\pmod y$ goes at the right of the line, right-justified. So it is a qualifier which tells you which equivalence relation is intended. Therefore I think they have a different meaning.

  • As an addendum to that, I should mention that $x_1\equiv x_2(\bmod y)$ if and only if $(x_1-x_2)\bmod y=0$. – Alan U. Kennington Jul 04 '15 at 10:00
  • 1
    You can format the parenthetical expression a bit more cleanly in TeX with the command $$\texttt{x_1 \equiv x_2 \pmod y}.$$ This produces the output $$x_1 \equiv x_2 \pmod y.$$ There's also $$\texttt{x_1 \equiv x_2 \bmod y},$$ which produces $$x_1 \equiv x_2 \bmod y.$$ – Travis Willse Jul 04 '15 at 10:07
  • Many thanks for the TeX tip. I knew there was some such macro for it, but it's a long time since I did modulo arithmetic. It slipped my mind somehow. I did remember the bmod macro though. That's easy because "b" stands for "binary". – Alan U. Kennington Jul 04 '15 at 10:23
  • Cheers, I only learned about the commands myself after I joined math.se. LaTeX also has a $\texttt{\Mod}$, which is like $\texttt{\pmod}$ but has less space before the left parenthesis, but MathJax doesn't seem to support it by default. – Travis Willse Jul 04 '15 at 10:42
  • @AlanU.Kennington \pmod stands for parenthesized mod, not all that difficult to remember either if you take in consideration that $\TeX$ is all about formatting :) Note that "remainder" and "modulus" often have a different meaning when negative values are considered. – Maarten Bodewes May 05 '19 at 13:49