Does $3-4+1$ equal $0$ or $-2$.. or maybe $2$?
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-$.)
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.
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.