While solving my homework in Math, I just thought of this and I don't know if it's correct. I've never done the simple division in negative number, so it's a little confusing if the remainder in $-25÷2$ must be negative. When we multiply the quotient by $2$ and add back $-1$ , I got $-25$. so I can say that the remainder in $25÷(-2)$ must be $1$. Is this correct?
The remainder in $-25÷2$
algebra-precalculus
Related Solutions
Let's forget the word "division" for a moment.
The claim is that if $f$ and $g$ are polynomials in one variable (i.e., in one indeterminate) with coefficients in a field (e.g., with rational coefficients), and if $g$ is not the zero polynomial, then there exist unique polynomials $q$ and $r$, with $\deg r < \deg g$, such that $$ f = qg + r. $$ The preceding equation expresses equality of polynomials as abstract algebraic entities. If you're working with coefficients in a field of characteristic zero (e.g., rational, real, or complex coefficients), it's safe to reformulate the preceding in terms of values of polynomial functions: $$ f(x) = q(x) g(x) + r(x) \quad\text{for all $x$.} \tag{1} $$ The discussion below uses "function value" language.
Uniqueness is easy: if $$ q_{1}(x) g(x) + r_{1}(x) = f(x) = q_{2}(x) g(x) + r_{2}(x) \quad\text{for all $x$,} $$ then $\bigl(q_{1}(x) - q_{2}(x)\bigr) g(x) = r_{2}(x) - r_{1}(x)$. Since the left-hand side is a polynomial multiple of $g$ (hence is either $0$ for all $x$, or is a polynomial of degree at least $\deg g$) and the right-hand side is a polynomial of degree strictly smaller than $\deg g$, each side must be $0$. That is, $q_{1}(x) = q_{2}(x)$ for all $x$, and $r_{1}(x) = r_{2}(x)$ for all $x$.
One proof of existence proceeds by successive subtraction of (polynomial multiples of) $g$ from $f$: The preceding conclusion may be written $$ f(x) - q(x) g(x) = r(x) \quad\text{for all $x$,} $$ in which case it's clear the goal is "to subtract a polynomial multiple of $g$ from $f$, obtaining a polynomial of degree strictly smaller than $\deg g$".
To illustrate the main idea, consider the example $$ f(x) = x^{3} - 12x^{2} - 42,\quad g(x) = x - 3. $$ The "game" will be to subtract successive monomial multiples of $g$ from $f$ with the goal of reducing the degree of the difference at each step.
To that end, focus on the highest-degree term of each: $f(x) = x^{3} + \cdots$ and $g(x) = x + \cdots$. Since $x^{3} = x^{2} \cdot x$, we're led to consider \begin{align*} f(x) - x^{2}g(x) &= x^{3} - 12x^{2} - 42 - x^{2}(x - 3) \\ &= -9x^{2} - 42. \end{align*} Since $\deg (-9x^{2} - 42) = 2 < 3 = \deg f$, we've succeeded in writing $f$ as a polynomial multiple of $g$ plus a remainder of degree smaller than $\deg f$ [sic., not $\deg g$]. Note that the preceding holds for all $x$.
Continue in this vein. By similar consideration of the highest-degree terms, $-9x^{2} = -9x\cdot x$, we're led to write \begin{align*} \bigl[f(x) - x^{2}g(x)\bigr] - (-9x)\, g(x) &= \bigl[-9x^{2} - 42\bigr] + 9x(x - 3) \\ &= -27x - 42. \end{align*} Combining the two preceding steps, we have $$ f(x) - (x^{2} - 9x)\, g(x) = -27x - 42\quad\text{for all $x$.} $$
The remainder still has degree greater than or equal to the degree of $g$, so we can perform another step, obtaining $$ f(x) - (x^{2} - 9x - 27)\, g(x) = -123\quad\text{for all $x$.} $$
Here the process ends: Since $\deg(-123) = 0 < \deg g$, we cannot reduce the degree of the remainder further by subtracting monomial multiples of $g$. We have established a decomposition of the form (1) in this example: $$ f(x) - \underbrace{(x^{2} - 9x - 27)}_{q(x)}\, g(x) = \underbrace{-123}_{r(x)}\quad\text{for all $x$.} $$
The close analogy with Euclid's algorithm should be clear. The customary "polynomial long division" notation expresses this process more concisely.
Writing out a general proof is straightforward. The key technical step is the following observation: If $f(x) = a_{n}x^{n} + a_{n-1}x^{n-1} + \cdots$ is a polynomial of degree $n$ (i.e., if $a_{n} \neq 0$), if $g(x) = b_{m} x^{m} + b_{m-1}x^{m-1} + \cdots$ has degree $m$ (i.e., if $b_{m} \neq 0$), and if $\deg g = m \leq n = \deg f$ (i.e., if we do not already have a "remainder" of degree smaller than $\deg g$), then $$ f(x) - \frac{a_{n}}{b_{m}} x^{n - m}\, g(x) = \underbrace{\left(a_{n} - \frac{a_{n}}{b_{m}}\, b_{m}\right)}_{= 0} x^{n} + \left(a_{n-1} - \frac{a_{n}}{b_{m}}\, b_{m-1}\right) x^{n-1} + \cdots $$ has degree at most $n - 1$. (The second coefficient in parentheses might be zero, so the degree of this "partial remainder" might be strictly smaller than $n - 1$.)
Now do induction on the following statement $P_{n}$:
If $f$ is a polynomial of degree an most $n$ in one variable, and if $g$ is a polynomial in one variable, there exist polynomials $q$ and $r$ such that $f(x) = q(x) g(x) + r(x)$ and $\deg r < \deg g$.
As base case, the induction starts with constant polynomials, for which the conclusion is obvious.
The "key technical step" above shows that if $\deg f = k + 1$, then $f$ may be written as a monomial multiple of $g$ plus a polynomial of degree at most $k$, to which the inductive hypothesis may be applied.
If you write it as $\frac{x-b}{a-b}P(a) + \frac{x-a}{b-a}P(b)$, it becomes easier to see how to generalize it to higher degrees.
For 3 variables, you would get
$$R(x) = \frac{(x-b)(x-c)}{(a-b)(a-c)}P(a) + \frac{(x-a)(x-c)}{(b-a)(b-c)}P(b) + \frac{(x-a)(x-b)}{(c-a)(c-b)}P(c)$$
All you have to do is note that $R(a) = P(a)$, $R(b) = P(b)$, $R(c) = P(c)$ and, since only one such quadratic can exist, this is the one.
Best Answer
Mathematicians have the convention that for any $n$ (in this case $n=-25$) and a divisor $q$ (in this case $q= 2$) then there is a unique pair of integers $d$ (which may be positive, negative, or $0$) and $r$ (which must be so that $0\le r < q$) so that $n = dq + r$.
In this case those unique integers so that $-25 = d\times 2 + r$ where $0 \le r < 2$ are $-25 = (-13)\times 2 + 1$ so $d = -13$ and $r = 1$.
So the remainder is $r=1$.
(Note: If $n$ is negative then $|md| > n$ which might be counterintuitive as we are multiplying $2$ by negative numbers to do $-2, -4, -6,....., -20,-22,-24,-26$ and we go past $-25$. Mathematicians figure this is okay as we want remainders to be non-negative always. We find that to be more consistent.)
Computer scientists, so for as I can tell, have a different convention that $d$ can be positive or negative. And $|r|< q$ but $r$ is the same sign as $d$
So $-25 = (-12)\times 2 - 1$ so $r = -1$ and to a computer scientist $d = -12$ and the remainder is $r=-1$.
(Note: this way we are multiplying be $-2$ and getting $-2,-4, -6,......, -20, -22, -24$ and we don't go past $-25$. This is okay to them as a remainder can be negative and can be thought of how far past the $-24$ term we need to go.)
Ask you teach which convention you are expected to use. But the conventional mathematician one is remainders are $0$ or positive. Never negative.