0

Why does $-14 \bmod 12 = 10$? I would be grateful if someone could explain this to me step by step, for I am but a novice in the field of modular arithmetic. [edit] I obtained this equation by playing around with values for (x,y,z) in: x mod y = z on the Google calculator. Thank you!

Edit: I would like to hit myself on the head- I see it now. Thanks to everyone who responded! Unless there is a discussion going on in this post right now, it can be marked as resolved.

lєαf
  • 19
  • I think it's the latter, but that wouldn't make much sense here. I was playing around with the google calculator when I came up with this equation. – lєαf Jan 30 '19 at 23:27
  • @GunnarSveinsson : I would downvote your comment if I could. There is one and only one sane definition of $a \mod n$ (where $n>0$). It is the unique value in $[0,n)$ which can be obtained by adding an integral multiple of $n$ to $a$. – MPW Jan 30 '19 at 23:29
  • @MPW It is true that the first definition / notation is wrong, but it is not true that there is only one definition of operational mod, e.g. it might denote the canonical residue in a system of least magnitude reps, e.g. $, -1,0,1\pmod{3}.\ $ Its definition is relative to the complete system of reps employed. – Bill Dubuque Jan 30 '19 at 23:33
  • @MPW: Taking the latter definition gives you a function that isn't additive (i.e., $\text{mod}(a+b, n) \not= \text{mod}(a, n) + \text{mod}(b, n)$ in general, isn't multiplicative, may have strange behavior with negative arguments, and doesn't easily generalize outside the integers. It's convenient in some settings (e.g., programming) to recast $\text{mod}$ a function rather than an equivalence relation by taking a single representative of the equivalence class under it, but it's often the far less sane choice. – anomaly Jan 31 '19 at 00:05
  • 1
    @MPW: ...that having been said, I'd be much happier if the definition were that $a\equiv b\pmod{n}$ if $n| (b - a)$, rather than writing it as function-like thing "$a, \text{mod}, n$". – anomaly Jan 31 '19 at 00:09
  • 1
    @anomaly : I think of ‘mod’ as giving the representative in the base coset – MPW Jan 31 '19 at 00:51
  • @MPW: Sure: My point was just that that representative doesn't behave well under arithmetic operations, and it doesn't generalizes to other subgroups or ideals when there isn't a canonical representative of each coset. – anomaly Jan 31 '19 at 01:57

7 Answers7

12

14 hours before midnight, it's 10 o'clock.

orion
  • 16,154
  • 1
  • 34
  • 45
4

$-14\equiv10\pmod{12}\,$ because $\,{-}14=10-12\cdot 2$. In other words, $-14$ and $10$ leaves the same remainder after dividing $12.$

MPW
  • 44,860
  • 2
  • 36
  • 83
abc...
  • 5,010
  • 1
    The notation means not only they are congruent but, further that $10$ is the canonical rep from the equivalence class $,-14+12\Bbb Z,$ wrt the complete system of residues $\bmod 12,$ that one is using. – Bill Dubuque Jan 31 '19 at 00:14
2

Because $10 -(-14) = 24$ which is a multiple of 12. In general, $ a\equiv b \pmod m $ means that $m$ divides $a-b$.

Bill Dubuque
  • 282,220
NickD
  • 2,147
1

I know it's tempting to think of mod as an operation, but most often in modular arithmetic, it's a modifier of $\equiv$, specifying exactly what "congruence" means. Really, if the notation had been $-14\equiv_{12}10$ instead, this would've been so much clearer.

So with this interpretation in mind, $-14\mod 12$ doesn't mean anything. On the other hand, $-14\equiv10\mod12$ is a statement. We can check whether it's true by using the definition: $$ a\equiv b\mod c\iff c\mid a-b $$ In this case, we get $12\mid -14-10$, which is true. This means that $-14\equiv 10\mod 12$ is true.

Arthur
  • 204,511
  • 1
    I disagree that $-14 \mod 12$ doesn't mean anything. I have seen this been treated as the image of $-14$ under the function $\mod 12 : \mathbb{Z}\to \mathbb{Z}$ or even of the canonical function $ \mathbb{Z}\to \mathbb{Z}/12\mathbb{Z}$. In a computer science course I took this expression was treated as a number. – Gunnar Sveinsson Jan 30 '19 at 23:09
  • Although if "modular aritmetic" is more well defined than I think, you may be right that it doesnt really mean anything in that "field". – Gunnar Sveinsson Jan 30 '19 at 23:17
  • 3
    The operation $\bmod$ is certainly in wide use in mathematics, computer science, etc. So it is incorrect and misleading to claim the it "doesn't mean anything". – Bill Dubuque Jan 30 '19 at 23:17
  • @BillDubuque I tried to make it clear that I'm talking in the context of modular arithmetic. – Arthur Jan 31 '19 at 00:20
  • 1
    @Arthur And so am I. – Bill Dubuque Jan 31 '19 at 00:23
  • @BillDubuque I still disagree. But I've qualified my statement the way it should've been from the start. – Arthur Jan 31 '19 at 06:33
  • It is certainly your prerogative to ignore or denigrate the mod operation. but that doesn't imply that it "doesn't mean anything" to the rest of the world. – Bill Dubuque Jan 31 '19 at 15:14
  • There are plenty of contexts where the operational form proves more convenient than the relational form, e.g. when performing CRT calculations using the mod Distributive Law, e.g. see here and here for numbers, and here and here for polynomials. More generally when working in quotient structures it often proves convenient to have operationa that coerce to normal forms. – Bill Dubuque Jan 31 '19 at 15:14
  • @BillDubuque You're right; having normal forms (or "distinguished representatives" or whatever one wants to call it) does make it more operator-like. I hadn't considered that. – Arthur Jan 31 '19 at 15:28
1

If you have $a\text{ mod }b = c$ then there exists $k\in\mathbb Z$ such that $a=kb+c$. In your case, you have $a=-14$, $b=12$ and $c=10$ while $k=-2$: $$ -14 = -2\cdot 12+10. $$

1

-24 is the largest number less than -14 which is congruent to 0 mod 12. -24 + 10 = -14 so -14 = 10 mod 12.

1

Whenever you get a positive number, you remove $12$ until you get a number between $0$ And $11$ to get the modulo.

Example: $\ 37\bmod{12}\equiv 37-12\equiv 25\equiv 25-12\equiv 13\equiv 13-12\equiv 1\pmod{12}$

For a negative number, in the same way just add $12$ until you get something positive.

Example: $\ {-}14\bmod{12}\equiv -14+12\equiv -2\equiv -2+12\equiv 10\pmod{12}$

Bill Dubuque
  • 282,220
zwim
  • 29,833