# Finding remainder of negative number

Recently my colleague ask one mathematical question which is,

What is the quotient and remainder of $(-29)/7$?

and my answer was that quotient is $4$ and remainder is $-1$ and he told me I'm completely wrong. He said that the reminder will be $6$, and I'm really get stuck here how will the remainder be $6$.

EDIT:

Sorry for my great mistake, the question will be $(-29)/7$ and his result was quotient is $-5$ and remainder is $6$

• To clarify: the question concerns $\frac{-29}{7}$, yes? Even so, I can't see where -10 might come into it. – lulu Jul 7 '15 at 16:38
• I'm pretending the question was about $-29/7$ and that somewhere in the transcription the order has been lost. – davidlowryduda Jul 7 '15 at 16:40
• And that "quotient is 4" should read "quotient is -4". – lulu Jul 7 '15 at 16:42
• Saying "the quotient is -4 with a remainder of -1" is, at least, consistent with my reading of the problem. Some writers prefer to insist that remainders be non-negative. In that case, one could say that "the quotient is -5 with a remainder of 6". Nothing I can think of gives me a -10 which makes me think I am not seeing the original problem properly. – lulu Jul 7 '15 at 16:46
• @mixedmath, Yes the question is (-29)/7. I'm sorry for my mistake – maruf Jul 7 '15 at 16:50

## 1 Answer

You should ask him exactly what he means when he says remainder. It is common for us to mean the following:

For any two integers $a,b$, with $a \neq 0$, there exist unique integers $q,r$ such that $$b = aq + r$$ where $0 \leq r < |a|$. Then we call $q$ the "quotient" and $r$ the "remainder." This fact is sometimes called the division algorithm, but it implicitly contains our definitions of quotient and remainder. In particular, we are demanding that the remainder be positive.

With $-29$ and $7$, we have that $$-29 = 7\cdot(-5) + 6,$$ so that according to my definition of remainder we would get $6$.

As an aside, there is no reasonable way to get $-10$ as a remainder, regardless of definition.

• I'm sorry my asked question was wrong. Thanks for explanation, now I'm understand this. – maruf Jul 8 '15 at 4:00
• There are cases (error free arithmetic for example) where it convenient to have $|a|/2 \lt r \le |a|/2$, in which case $r = -1$ is the appropriate answer. – steven gregory Jul 30 '15 at 3:10