4

Does $3 - 4 + 1 = 0$ or $3 - 4 + 1 = -2$?

Makes sense that $(3 - 4) + 1 = 0$ and $3 - (4 + 1) = -2$, but what if there are no parenthesis?

Also, if I have $4$ apples and I add $1$ more apple, then I have $5$ apples, but if I eat $3$ apples, then I have $2$ left.

Any ideas?

Aryan
  • 442
  • Nothing would suggest that you should read it any way other than $3+(-4)+1=0$...distributing the minus sign over to include the $1$ seems arbitrary. One thing I sometimes do if I am unsure how operations will be ordered is to type them into Excel or WA (or whatever). In this case, you'll always get $0$. – lulu Sep 29 '18 at 22:45
  • 1
    I like this thinking approach 3+(−4)+1=0 – Patrioticcow Sep 29 '18 at 22:47
  • 2
    That certainly removes all doubt, no? If I am coding complex expressions, I try to isolate every term and every operation as clearly as possible...just to avoid ambiguities. Doesn't always keep the bugs out, alas. – lulu Sep 29 '18 at 22:50
  • Without parantheses , you calculate simply from the left since $+$ and $-$ have equal priority. – Peter Sep 26 '22 at 16:06
  • Every mathematician (and I hope all common software tools) consider this to be $0$. – Peter Sep 26 '22 at 16:07

7 Answers7

7

To be clear, this is purely a matter of notational convention. There is no intrinsic meaning to the expression $3-4+1$, and in particular there is no intrinsic reason it should mean $(3-4)+1$ or $3-(4+1)$.

The standard convention in this case is that addition and subtraction group together "from the left", so that $3-4+1$ means $(3-4)+1$. Similarly, $3-2+4+5-1-2$ means $((((3-2)+4)+5)-1)-2$. The point of having such a convention is that if we want to express the meaning $(3-4)+1$ (or $((((3-2)+4)+5)-1)-2$), we can do so more briefly by omitting the parentheses. (If we didn't have any such convention, then $3-4+1$ would simply be a meaningless malformed expression, like $3-+4-$.)

Eric Wofsey
  • 330,363
3

If you are writing this in a programming language then based on the precedence of operators the output will be $0.$ That is how at least the computer handles arithmetic expressions.

Student
  • 9,196
  • 8
  • 35
  • 81
3

There is sometimes a difference between what someone intended and what everyone else understands it to mean. If we can't ask the author, we might never be able to know the former, but we can always know the latter. Hence, $$3 - 4 + 1 = 0$$ is what almost everyone understands since there are no parentheses to override normal operator precedence and left-to-right associativity. If the author instead meant $$3 - (4 + 1) = -2,$$ we can only hope that he remembers to add the parentheses, but we probably shouldn't assume that he intended to, unless there is something in the context to indicate this.

Also, if I have 4 apples and I add 1 more apple, then I have 5 apples, but if I eat 3 apples, then I have 2 left.

This would be $$4 + 1 - 3 = 2.$$ Now suppose that a friend gives you two dozen apples. $$4 + 1 - 3 + 2 \times 12 = 26$$ And then you give another friend three half dozen apples. $$4 + 1 - 3 + 2 \times 12 - \frac{3}{2} \times 12 = 8$$

If you're using Windows 10 or Mac OS X, I want you to open up your operating system calculator. From your Web browser, copy 5 - 7 * 2 and paste it into the calculator (don't worry about spaces, they'll be ignored). The answer should be -9, not -4. Now try 3 - 4 + 1, the answer should be 0.

Also go to Wolfram Alpha. You won't even have to press Enter for the "preview" to show you the answer. In general, as long as you don't invoke imaginary numbers, the preview should work.

Robert Soupe
  • 14,663
1

Since there are no parentheses, you work from left to right, since + and - are of equal precedence and these operations associate from left to right.

$$ 3 - 4 + 1 = -1 + 1 = 0.$$

ncmathsadist
  • 49,383
1

Without parenthesis, the equation would remain as your first case:

$$ (3 − 4) + 1 = 3 - 4 + 1 $$

According to the MDAS rules, from the methods of addition and subtraction, the equation will start off with any of the beginning methods. Afterwards, the equation will do all those methods (depending if subtraction or addition goes first from the equation). Then it will go to the next operation if its there.

So it is still in fact $ 0 $ without groupings.

0

Add positives together, and you will have $3+1=4$

The only negative that you have is $-4$

The sum is then $4-4=0$

If you do not have parenthesis you add positives and keep the result.

Then you add negatives and keep the result. Then find the total result by the algebraic sum of those two. For example $$1-5-3+12-23=?$$ We have $1+12=13$ positives. We also have $-5-3-23=-31$ negatives.

Thus the result is $13-31 = -18$

0

If you want to find the answer to 3 - 4 + 1, you have to use PEMDAS. Since there's no parenthesis, exponents, multiplication, or division, we go to the A and S; addition and subtraction. To do this, you do it left to right. You do 3 - 4 first, which is -1, then you add 1 to that, so you get 0. So, there you go. Using simple PEMDAS, we can say that the answer is 0. Remember: If you have a problem with multiple operations, but no parenthesis, use the MDAS rules, which states that in multiplication and division/addition and subtraction, solve left to right. Thus, 3 - 4 + 1 is 0.