6÷2(1+2)=?
stevenclontz.com
stevenclontz.com
Well, yes, I thought so. Most mathematical expressions are pretty standard and I'm surprising that there is no a definitive answer to this question.
The way I see it is:
6/2(1+2)
6/2(3)
6/2*3
3*3
9
If I wanted to apply 23 first, I'd write: 6/(23). Maybe I thought like that because that's how all calculators I've used work. 6
__
2x
You've explicitly put spaces around it.However, if you look at it like:
6/2*x
Does 3x seems that unlikely?Different systems of axioms lead to very different mathematical objects (compare Euclidean and non-Euclidean geometries). Different conventions lead to the exact same thing written slightly differently - if we say that clockwise rotation corresponds to positive change in angle (the opposite of current convention), we'll exchange plus and minus signs in a bunch of formulas, and nothing else.
> What is 6÷2(1+2)?
without establishing the axioms of arithmetic is as impossible as answering
> Does CH hold in ZF?
without establishing some axioms of set theory.
Put another way, asking 6÷2(1+2) on the SAT is as ill-advised as asking an Introduction to Proofs course to tackle the Continuum Hypothesis with just some naive set theory.
You seem to think that this question has something to do with the "axioms of arithmetic" - no, it doesn't, it's a matter of how you write things by convention. Operator precedence is not and has never been an "axiom". We can define plus to have the highest precedence, and get the exact same arithmetic we have now, written differently.
On the other hand, deciding the Continuum Hypothesis is "impossible" in a very fundamental way - Kurt Godel and Paul Cohen, two of the greatest mathematical logicians in history, proved that the Continuum Hypothesis is undecidable by mathematical reasoning as we can best formulate it, i.e. it is independent of the ZFC axioms. That's not a matter of choosing a notation for it.
The point was that without a precise foundation for mathematics we cannot proceed - anything further is overanalysis for an article I wrote mainly for folks without our mathematical background. :-)
The answer is 1.
(* (/ 6 2) (+ 1 2)) would give nine but c'mon...that multiplication way over on the left came outta nowhere.
6/2(1+2)=6/2*(1+2)=6/2*3=(6/2)*3=(3)*3=9
This is pretty well defined, I feel:- Expand implicit multiplication to explicit multiplication (e.g. 2(1+2) becomes 2*(1+2))
- Left-to-right precedence for operators of equal-precedence (divide and multiply)
The 2 is no more bound to the parenthesis than it is to the division operator.
Am I missing something?
Ultimitly, this is why we tend to use notation which uses placement to resolve these issues unambiguasly, without alot of parentheses.
In my experience, it is pretty well defined:
0. Evaluate (the inside of!) parenthesis, then
1. Evaluate exponentials, then
2. Evaluate division and multiplication operators, left to right
e.g. 1 / 2 * 3 / 4 = (1/2) * 3/4 = ((1/2)*3)/4
3. Evaluate addition and subtraction operators, left to rightYour issue seems to stem from the left-to-right concept (in order in which operators are encountered as you read, left-to-right).
Your example of 6/2x to me is clearly (6/2)x. What is 1/2x ? In my experience, textbook authors/professors/math teachers tend to be disambiguous and either use the horizontal line for clarity or use parenthesis.
I attended public schools in Ontario, Canada if it makes any difference.
Edit: Oh yeah, also I have never felt that implicit operators would take precedence. Interesting!
In mathematics allowing your audience to make assumptions is very very bad...people are terrible at making and applying assumptions - just look at any studies into eye witness testimony.
Machines are just as bad, as they are loaded with assumptions of their programmers.
As a Computer Scientist, I absolutely hate coming across badly expressed formulas. Abstraction is key - why are there parentheses around the 1+2, what makes those separate...why not just write 3?? - In fact there are no variables in this problem, it is constant, just give me the constant...or tell me why you have defined it this way.
Implicit operations and ordering may save you a couple of characters but generate essays worth of confusion.
note: I had to use an x instead of the asterisk to represent multiplication, since I don't know how to escape the asterisk in Markdown.
I don't think this analogy holds very well--a curious student could reasonably and earnestly ask about the continuum hypothesis, since it's not at all obvious from first principles that the answer depends so heavily on obscure set axioms. On the other hand, the order of operations question seems to have been designed to confuse people and stir up meaningless, unresolvable arguments over PEMDAS.
Now us humans will get 9 as they will do the 6/2 and then multiply the result with the (1+2) for 3x3.
Now given the multiply is implied and computers like to have that symbol in many languages and the divide sign as again a form not overly used in programming languages, then it is clearly expressed in a form for human consumption. With that we imply the 6 divided by 2 is in its own bracket and will think it is 9, then we will think again if we know computers and then think 1.
Moral being whilst lots of brackets and braces can look untidy, they do clarify beyond doubt.
6 / 2 (1 + 2)
6 / 2 * 3
3 * 3
9
float x = 6 / 2 * (2 + 1); // x == 9
I agree with your interpretation FTA:
> DON'T DO THIS!
> It's ambiguous, and should not be written like this because it leads to problems.
Put another way, does it fall into the Parentheses section or the Multiplication section of the PEMDAS order of operations? (Or whatever mnemonic your country uses.)
http://www.wolframalpha.com/input/?i=6%C3%B72%281%2B2%29
Of course, this is because it's evaluated left to right and the implied multiplication doesn't get put "under" the division.
But that's just how WolframAlpha does it. The article is about the ambiguity in the mnemonic we're taught in school. I thought the correct answer was going to be '1'.
as google, wolfram alpha (a mathematica "frontend") interprets it as (6/2)*(1+2).
https://www.wolframalpha.com/input/?i=6÷2(1+2)&dataset=
(and even with a variable juxtapositioned it's interpreted like that.)
but right, that's no real metric for mathematical use. (i still think the result is 1.)
6 / 2(3) <== Parenthesis still there
6 / 6
1
--
It's 9, you've added some invisible brackets in there.
6 / 2 * (1 + 2)
6 / 2 * 3
3 * 3
9
It's like how programming works:
6 / 2 * add(1, 2)
This would obviously evaluate to 9, because the "add" function would simply return a value and the rest of the statement would be evaluated from left to right. In this case, the first 2 is not related to the "add" function in any way.