What is the proper answer to this math problem (from youtube).

Whoa … how did Facebook bleed onto SDMB?

I agree. The way it shows up in the video is unambiguous.

You’d think that people would have had enough of silly math problems,
But I look around me and I see it isn’t so.
Some people want to fill the world with silly math problems.
And what’s wrong with that, I’d like to know?

The proper answer is to rewrite the equation until it’s no longer ambiguous. Notation is for communication, and any notation which is ambiguous is incorrect.

Therefore, the problem is incorrect as stated.

Having looked at the video, I agree. It’s pretty clear 1/3 is a fraction, and correct answer is 9 - 3 ÷ (1/3) + 1 = 1.

If it was intended to express 9 - (3 ÷ 1)/3 + 1, it should be written as



        3 ÷ 1
    9 + ----- + 1
          3


Yeah, I’m normally on the “math can be ambiguous” side of things in these debates, but the expression in the video is very unambiguous, and doesn’t throw any of the usual ambiguous notation curveballs (weird spacing, variables, multiplication by juxtaposition, etc).

When I was working directing programmers for mainframe computers, that’s what we did.

The computer compilers had specific & detailed rules on this, so they would always do it correctly and the same way. But it was confusing for humans, like programmers who would have to maintain it in the future. If it came up in code reviews, I wouldn’t even permit discussion of the ‘order of operations’ – just immediately instructed the programmer change it to use parenthesis or brackets to make it unambiguous, and went on to the next item. I even told beginning programmers not to bother even learning the order of operations – just always use parenthesis & brackets and you don’t need to know that.

Excellent plan! I learned very early on, that FORTRAN compilers didn’t all agree on the order of operations, in particular, .AND. and .OR. – So I learned never to count on operator precedence, except possibly for simple addition and multiplication in very simple expressions.

Then C came along. OMG, what a hodge-podge of operators. I had a C textbook once that was obsessed with teaching the order. It had a whole page of exercises consisting of lengthy incomprehensible C expressions, asking the student to insert explicit parentheses.

Pascal, OTOH, sometimes forced the issue in ways that could only have been a blatantly stupid language design error. Boolean operators had greater precedence than relational operators, so an expression like:
a > b and c > d
would be interpreted as:
a > (b and c) > d
which of course produced a compile-time data-type error. WTF was Wirth thinking?

There is no proper order of operation. If the rules aren’t agreed upon ahead of time then there’s no single answer to the question.

PEMDAS. Please excuse my dear Aunt Sally. It’s plastered on the walls of middle schools throughout the country. It was taught when I was a kid, it’s still taught.

But the PEMDAS convention is subordinated to the grouping convention mentioned by Senegoid. Which, obivously, the OP didn’t know, and neither did Leaffan.

So, some people are working off different conventions in this area than others. And since none of the conventions has an intrinsic validity - they are arbitrary conventions - we can’t say there’s a “proper” order of operations . There’s just the order of operations which is agreed upon by all people who agree on that particular order of operations.

The proper answer is that the poser is an idiot. No mathematician would ever pose such a question without parentheses to clarify. Notice that no ambiguity is possible if you used RPN.

Just so we’re all on the same page, in the video it’s written as



            1 
    9 + 3 ÷ - + 1
            3


In this context, the / and ÷ are not used as equivalent operators with the same order of operation. The horizontal bar denotes a fraction, i.e. 1/3 is a number, not an operation.

The correct answer is not 999. it is 9^9^9

This is correct as I learned it, even if you interpret 1 over 3 (with horizontal bar) as a division operation because the horizontal bar does double-duty as a division symbol and as a grouping symbol.

I never heard of the PEMDAS mnemonic (nor any of its several variations) until I saw them mentioned in the various SDMB threads like this one. It wasn’t taught in my grammar school! But I did learn in first-semester algebra (circa 1966) about the horizontal fraction bar serving as a grouping symbol as well.

Yeah, this. Some people seem to want to make a fundamental distinction between “a fraction” and “a division operation”, but that is wrong. A fraction ***is ***a division operation. The only distinction between the two is that the use of fractional notation contains an implied set of parentheses, which means it take precedence over the other division operator.

Conceptually, this can’t be entirely right. And Math is all about concepts, so let’s get the concepts right.

The symbol, say, 3/7 (preferably written with a truly horizontal bar) does have two distinct meanings that are so closely related that many people (e.g., Horatius) don’t see the difference.

First, it indicates a division operation. As such, “3/7” consists of three separate symbols: “3”, “/”, and “7”, all together forming an arithmetic expression indicating some arithmetic to be done. This, of course, results in some number as its value. This really is a particular, specific number, and you can find a point for it on a number line, somewhere between 0 and 1.

But how shall we write that number? In ancient Egypt, they used a symbol something like a tick mark for one-half and another symbol something like two tick marks for one-quarter. (I think.) But they had no general system for writing all sorts of fractions in general.

We can create all kinds of fractions by writing all kinds of arithmetic expressions, like 4/23 and 73/98 and 18/1241. But what symbols should we devise to indicate the actual numbers the result from these arithmetics? We have settled upon using a single symbol that looks a whole lot like the division expression. Thus, the single symbol “3/7” is the “name” (that is, the symbol) we write to represent the number and results from the three-symbol arithmetic expression “3” “/” “7”. Likewise for other fractions.

Thus, 3/7 truly does have two conceptually distinct meanings: It is a three-symbol expression indicating some arithmetic to be done; and it is also a one-symbol mark that we use to name the resulting number.

When we bring algebraic variables into the picture, it’s a bit different. Something like

a + b

c + d

can only be interpreted as an algebraic expression, and not as the name of any particular number.

The above discussion comes up on some other contexts too.

Take the simpler case: The use of the “-” symbol to indicate the negative (“additive inverse”) of a number.

Applied to a variable, as in: -a
or to an expression, as in: -(a+b)
it is clearly a unary operator. It tells us to do a particular operation: Take a number (the operand) and negate it. Even if the operand happens to be a negative number to begin with, it still means that. (Thus producing a positive number in that case.)

So what does “-” followed by a specific number mean? As in, for example: -3

Here too, we can read it as an arithmetic expression having two symbols: “-” and “3” that tells us to take the number 3 and negate it, giving us a different number.

Now, we need a name, or symbol, for that resulting number so we will have a way to write the actual number that we got. As with fractions, we have agreed to write “-3” as a single symbol representing that number. So, -3 is at the same time an arithmetic expression telling us to do some arithmetic, and also a single symbol representing the resulting number.

But note: It just might, sometimes, make a difference which of these interpretations we take, so we need to pay attention. Unlike the case with fractions, there is no implied grouping symbol here. We can’t be sure that -3 necessarily means (-3). In fact, it’s not always so:

Consider the expression -3[sup]2[/sup]. It is understood that this means -(3[sup]2[/sup])
and not (-3)[sup]2[/sup]. Thus, the -3 in -3[sup]2[/sup] is understood to be a two-symbol expression rather than the name of a number, and the exponent only applies to the 3 and not the whole -3 expression.

There is yet another case where we have a symbol for building an expression that results in numbers that we don’t have a better way to write, so we use the whole expression as a single symbol for the resulting number: That is in writing square roots. We write √2 as an expression meaning: Start with 2 and take the square root of that. But, for lack of any better way to write the resulting number, we also take the entire expression √2 as a single symbol for the number thus produced.

Following algebraic order of operations I’d say 9. But then you get those who can argue the earth is flat convincingly talking about implied this and that taking some informal precedence. Octopus says 9 and wolfram alpha says 9. That’s good enough for me.

Okay, part of the issue is that on a computer, it’s a lot easier to type 1/3 than to find ⅓ on the character map and 1 over a 3 takes an extra line and then there’s the spacing to get the 3 under the 1. So, on one hand, a “/” can indicate the division operation or a fraction. On the other hand, " ÷ " NEVER indicates a fraction and always indicates the division operation. So, when I see both symbols used in the same equation, I figure the “/” is part of a fraction, though for clarity they still could have used parentheses.